diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/CHANGELOG.md b/sdk/resourcemanager/appcontainers/armappcontainers/CHANGELOG.md index 70677eae0c02..3dc0641e9487 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/CHANGELOG.md +++ b/sdk/resourcemanager/appcontainers/armappcontainers/CHANGELOG.md @@ -1,268 +1,11 @@ # Release History -## 2.0.0-beta.2 (2023-03-27) +## 1.1.0 (2023-04-07) ### Features Added - New struct `ClientFactory` which is a client factory used to create any client in this module -## 2.0.0-beta.1 (2022-10-06) -### Breaking Changes - -- Struct `CustomHostnameAnalysisResultProperties` has been removed -- Field `Name` of struct `CustomHostnameAnalysisResult` has been removed -- Field `SystemData` of struct `CustomHostnameAnalysisResult` has been removed -- Field `Type` of struct `CustomHostnameAnalysisResult` has been removed -- Field `Properties` of struct `CustomHostnameAnalysisResult` has been removed -- Field `ID` of struct `CustomHostnameAnalysisResult` has been removed - -### Features Added - -- New const `CategoryPremiumSKUMemoryOptimized` -- New const `ConnectedEnvironmentProvisioningStateScheduledForDelete` -- New const `ConnectedEnvironmentProvisioningStateSucceeded` -- New const `CategoryPremiumSKUComputeOptimized` -- New const `ConnectedEnvironmentProvisioningStateInitializationInProgress` -- New const `LogLevelWarn` -- New const `ConnectedEnvironmentProvisioningStateFailed` -- New const `LogLevelInfo` -- New const `SKUNamePremium` -- New const `IngressTransportMethodTCP` -- New const `ExtendedLocationTypesCustomLocation` -- New const `ManagedEnvironmentOutBoundTypeUserDefinedRouting` -- New const `SKUNameConsumption` -- New const `ConnectedEnvironmentProvisioningStateCanceled` -- New const `ConnectedEnvironmentProvisioningStateWaiting` -- New const `ConnectedEnvironmentProvisioningStateInfrastructureSetupComplete` -- New const `LogLevelDebug` -- New const `LogLevelError` -- New const `ApplicabilityLocationDefault` -- New const `CategoryPremiumSKUGeneralPurpose` -- New const `ActionAllow` -- New const `ConnectedEnvironmentProvisioningStateInfrastructureSetupInProgress` -- New const `ApplicabilityCustom` -- New const `ActionDeny` -- New const `ManagedEnvironmentOutBoundTypeLoadBalancer` -- New const `ContainerAppProvisioningStateDeleting` -- New type alias `ManagedEnvironmentOutBoundType` -- New type alias `Category` -- New type alias `ConnectedEnvironmentProvisioningState` -- New type alias `SKUName` -- New type alias `LogLevel` -- New type alias `ExtendedLocationTypes` -- New type alias `Action` -- New type alias `Applicability` -- New function `*ConnectedEnvironmentsDaprComponentsClient.CreateOrUpdate(context.Context, string, string, string, DaprComponent, *ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateOptions) (ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateResponse, error)` -- New function `*ConnectedEnvironmentsCertificatesClient.CreateOrUpdate(context.Context, string, string, string, *ConnectedEnvironmentsCertificatesClientCreateOrUpdateOptions) (ConnectedEnvironmentsCertificatesClientCreateOrUpdateResponse, error)` -- New function `NewConnectedEnvironmentsCertificatesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ConnectedEnvironmentsCertificatesClient, error)` -- New function `*ManagedEnvironmentsClient.NewListWorkloadProfileStatesPager(string, string, *ManagedEnvironmentsClientListWorkloadProfileStatesOptions) *runtime.Pager[ManagedEnvironmentsClientListWorkloadProfileStatesResponse]` -- New function `*ContainerAppsDiagnosticsClient.GetDetector(context.Context, string, string, string, *ContainerAppsDiagnosticsClientGetDetectorOptions) (ContainerAppsDiagnosticsClientGetDetectorResponse, error)` -- New function `*ConnectedEnvironmentsStoragesClient.CreateOrUpdate(context.Context, string, string, string, ConnectedEnvironmentStorage, *ConnectedEnvironmentsStoragesClientCreateOrUpdateOptions) (ConnectedEnvironmentsStoragesClientCreateOrUpdateResponse, error)` -- New function `PossibleApplicabilityValues() []Applicability` -- New function `NewManagedEnvironmentsDiagnosticsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagedEnvironmentsDiagnosticsClient, error)` -- New function `*ContainerAppsDiagnosticsClient.GetRoot(context.Context, string, string, *ContainerAppsDiagnosticsClientGetRootOptions) (ContainerAppsDiagnosticsClientGetRootResponse, error)` -- New function `*ManagedEnvironmentsDiagnosticsClient.GetRoot(context.Context, string, string, *ManagedEnvironmentsDiagnosticsClientGetRootOptions) (ManagedEnvironmentsDiagnosticsClientGetRootResponse, error)` -- New function `NewConnectedEnvironmentsDaprComponentsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ConnectedEnvironmentsDaprComponentsClient, error)` -- New function `*ConnectedEnvironmentsDaprComponentsClient.Delete(context.Context, string, string, string, *ConnectedEnvironmentsDaprComponentsClientDeleteOptions) (ConnectedEnvironmentsDaprComponentsClientDeleteResponse, error)` -- New function `NewBillingMetersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*BillingMetersClient, error)` -- New function `PossibleLogLevelValues() []LogLevel` -- New function `*ManagedEnvironmentDiagnosticsClient.ListDetectors(context.Context, string, string, *ManagedEnvironmentDiagnosticsClientListDetectorsOptions) (ManagedEnvironmentDiagnosticsClientListDetectorsResponse, error)` -- New function `*ConnectedEnvironmentsClient.BeginDelete(context.Context, string, string, *ConnectedEnvironmentsClientBeginDeleteOptions) (*runtime.Poller[ConnectedEnvironmentsClientDeleteResponse], error)` -- New function `*ManagedEnvironmentDiagnosticsClient.GetDetector(context.Context, string, string, string, *ManagedEnvironmentDiagnosticsClientGetDetectorOptions) (ManagedEnvironmentDiagnosticsClientGetDetectorResponse, error)` -- New function `*ConnectedEnvironmentsClient.NewListByResourceGroupPager(string, *ConnectedEnvironmentsClientListByResourceGroupOptions) *runtime.Pager[ConnectedEnvironmentsClientListByResourceGroupResponse]` -- New function `*BillingMetersClient.Get(context.Context, string, *BillingMetersClientGetOptions) (BillingMetersClientGetResponse, error)` -- New function `*ConnectedEnvironmentsStoragesClient.Delete(context.Context, string, string, string, *ConnectedEnvironmentsStoragesClientDeleteOptions) (ConnectedEnvironmentsStoragesClientDeleteResponse, error)` -- New function `*ContainerAppsDiagnosticsClient.NewListRevisionsPager(string, string, *ContainerAppsDiagnosticsClientListRevisionsOptions) *runtime.Pager[ContainerAppsDiagnosticsClientListRevisionsResponse]` -- New function `*AvailableWorkloadProfilesClient.NewGetPager(string, *AvailableWorkloadProfilesClientGetOptions) *runtime.Pager[AvailableWorkloadProfilesClientGetResponse]` -- New function `*ManagedEnvironmentsClient.GetAuthToken(context.Context, string, string, *ManagedEnvironmentsClientGetAuthTokenOptions) (ManagedEnvironmentsClientGetAuthTokenResponse, error)` -- New function `*ContainerAppsDiagnosticsClient.NewListDetectorsPager(string, string, *ContainerAppsDiagnosticsClientListDetectorsOptions) *runtime.Pager[ContainerAppsDiagnosticsClientListDetectorsResponse]` -- New function `*ContainerAppsClient.GetAuthToken(context.Context, string, string, *ContainerAppsClientGetAuthTokenOptions) (ContainerAppsClientGetAuthTokenResponse, error)` -- New function `*ConnectedEnvironmentsClient.NewListBySubscriptionPager(*ConnectedEnvironmentsClientListBySubscriptionOptions) *runtime.Pager[ConnectedEnvironmentsClientListBySubscriptionResponse]` -- New function `*ConnectedEnvironmentsDaprComponentsClient.Get(context.Context, string, string, string, *ConnectedEnvironmentsDaprComponentsClientGetOptions) (ConnectedEnvironmentsDaprComponentsClientGetResponse, error)` -- New function `*ConnectedEnvironmentsClient.Update(context.Context, string, string, *ConnectedEnvironmentsClientUpdateOptions) (ConnectedEnvironmentsClientUpdateResponse, error)` -- New function `PossibleCategoryValues() []Category` -- New function `PossibleConnectedEnvironmentProvisioningStateValues() []ConnectedEnvironmentProvisioningState` -- New function `*ConnectedEnvironmentsStoragesClient.List(context.Context, string, string, *ConnectedEnvironmentsStoragesClientListOptions) (ConnectedEnvironmentsStoragesClientListResponse, error)` -- New function `*ConnectedEnvironmentsCertificatesClient.NewListPager(string, string, *ConnectedEnvironmentsCertificatesClientListOptions) *runtime.Pager[ConnectedEnvironmentsCertificatesClientListResponse]` -- New function `PossibleManagedEnvironmentOutBoundTypeValues() []ManagedEnvironmentOutBoundType` -- New function `*ConnectedEnvironmentsStoragesClient.Get(context.Context, string, string, string, *ConnectedEnvironmentsStoragesClientGetOptions) (ConnectedEnvironmentsStoragesClientGetResponse, error)` -- New function `*ConnectedEnvironmentsCertificatesClient.Delete(context.Context, string, string, string, *ConnectedEnvironmentsCertificatesClientDeleteOptions) (ConnectedEnvironmentsCertificatesClientDeleteResponse, error)` -- New function `NewConnectedEnvironmentsStoragesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ConnectedEnvironmentsStoragesClient, error)` -- New function `*ConnectedEnvironmentsDaprComponentsClient.ListSecrets(context.Context, string, string, string, *ConnectedEnvironmentsDaprComponentsClientListSecretsOptions) (ConnectedEnvironmentsDaprComponentsClientListSecretsResponse, error)` -- New function `PossibleActionValues() []Action` -- New function `PossibleSKUNameValues() []SKUName` -- New function `*ContainerAppsDiagnosticsClient.GetRevision(context.Context, string, string, string, *ContainerAppsDiagnosticsClientGetRevisionOptions) (ContainerAppsDiagnosticsClientGetRevisionResponse, error)` -- New function `*ConnectedEnvironmentsDaprComponentsClient.NewListPager(string, string, *ConnectedEnvironmentsDaprComponentsClientListOptions) *runtime.Pager[ConnectedEnvironmentsDaprComponentsClientListResponse]` -- New function `*ConnectedEnvironmentsCertificatesClient.Get(context.Context, string, string, string, *ConnectedEnvironmentsCertificatesClientGetOptions) (ConnectedEnvironmentsCertificatesClientGetResponse, error)` -- New function `NewManagedEnvironmentDiagnosticsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagedEnvironmentDiagnosticsClient, error)` -- New function `NewConnectedEnvironmentsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ConnectedEnvironmentsClient, error)` -- New function `NewAvailableWorkloadProfilesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*AvailableWorkloadProfilesClient, error)` -- New function `NewContainerAppsDiagnosticsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ContainerAppsDiagnosticsClient, error)` -- New function `PossibleExtendedLocationTypesValues() []ExtendedLocationTypes` -- New function `*ConnectedEnvironmentsClient.CheckNameAvailability(context.Context, string, string, CheckNameAvailabilityRequest, *ConnectedEnvironmentsClientCheckNameAvailabilityOptions) (ConnectedEnvironmentsClientCheckNameAvailabilityResponse, error)` -- New function `*ConnectedEnvironmentsCertificatesClient.Update(context.Context, string, string, string, CertificatePatch, *ConnectedEnvironmentsCertificatesClientUpdateOptions) (ConnectedEnvironmentsCertificatesClientUpdateResponse, error)` -- New function `*ConnectedEnvironmentsClient.BeginCreateOrUpdate(context.Context, string, string, ConnectedEnvironment, *ConnectedEnvironmentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ConnectedEnvironmentsClientCreateOrUpdateResponse], error)` -- New function `*ConnectedEnvironmentsClient.Get(context.Context, string, string, *ConnectedEnvironmentsClientGetOptions) (ConnectedEnvironmentsClientGetResponse, error)` -- New struct `AvailableWorkloadProfile` -- New struct `AvailableWorkloadProfileProperties` -- New struct `AvailableWorkloadProfilesClient` -- New struct `AvailableWorkloadProfilesClientGetOptions` -- New struct `AvailableWorkloadProfilesClientGetResponse` -- New struct `AvailableWorkloadProfilesCollection` -- New struct `BaseContainer` -- New struct `BillingMeter` -- New struct `BillingMeterCollection` -- New struct `BillingMeterProperties` -- New struct `BillingMetersClient` -- New struct `BillingMetersClientGetOptions` -- New struct `BillingMetersClientGetResponse` -- New struct `ConnectedEnvironment` -- New struct `ConnectedEnvironmentCollection` -- New struct `ConnectedEnvironmentProperties` -- New struct `ConnectedEnvironmentStorage` -- New struct `ConnectedEnvironmentStorageProperties` -- New struct `ConnectedEnvironmentStoragesCollection` -- New struct `ConnectedEnvironmentsCertificatesClient` -- New struct `ConnectedEnvironmentsCertificatesClientCreateOrUpdateOptions` -- New struct `ConnectedEnvironmentsCertificatesClientCreateOrUpdateResponse` -- New struct `ConnectedEnvironmentsCertificatesClientDeleteOptions` -- New struct `ConnectedEnvironmentsCertificatesClientDeleteResponse` -- New struct `ConnectedEnvironmentsCertificatesClientGetOptions` -- New struct `ConnectedEnvironmentsCertificatesClientGetResponse` -- New struct `ConnectedEnvironmentsCertificatesClientListOptions` -- New struct `ConnectedEnvironmentsCertificatesClientListResponse` -- New struct `ConnectedEnvironmentsCertificatesClientUpdateOptions` -- New struct `ConnectedEnvironmentsCertificatesClientUpdateResponse` -- New struct `ConnectedEnvironmentsClient` -- New struct `ConnectedEnvironmentsClientBeginCreateOrUpdateOptions` -- New struct `ConnectedEnvironmentsClientBeginDeleteOptions` -- New struct `ConnectedEnvironmentsClientCheckNameAvailabilityOptions` -- New struct `ConnectedEnvironmentsClientCheckNameAvailabilityResponse` -- New struct `ConnectedEnvironmentsClientCreateOrUpdateResponse` -- New struct `ConnectedEnvironmentsClientDeleteResponse` -- New struct `ConnectedEnvironmentsClientGetOptions` -- New struct `ConnectedEnvironmentsClientGetResponse` -- New struct `ConnectedEnvironmentsClientListByResourceGroupOptions` -- New struct `ConnectedEnvironmentsClientListByResourceGroupResponse` -- New struct `ConnectedEnvironmentsClientListBySubscriptionOptions` -- New struct `ConnectedEnvironmentsClientListBySubscriptionResponse` -- New struct `ConnectedEnvironmentsClientUpdateOptions` -- New struct `ConnectedEnvironmentsClientUpdateResponse` -- New struct `ConnectedEnvironmentsDaprComponentsClient` -- New struct `ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateOptions` -- New struct `ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateResponse` -- New struct `ConnectedEnvironmentsDaprComponentsClientDeleteOptions` -- New struct `ConnectedEnvironmentsDaprComponentsClientDeleteResponse` -- New struct `ConnectedEnvironmentsDaprComponentsClientGetOptions` -- New struct `ConnectedEnvironmentsDaprComponentsClientGetResponse` -- New struct `ConnectedEnvironmentsDaprComponentsClientListOptions` -- New struct `ConnectedEnvironmentsDaprComponentsClientListResponse` -- New struct `ConnectedEnvironmentsDaprComponentsClientListSecretsOptions` -- New struct `ConnectedEnvironmentsDaprComponentsClientListSecretsResponse` -- New struct `ConnectedEnvironmentsStoragesClient` -- New struct `ConnectedEnvironmentsStoragesClientCreateOrUpdateOptions` -- New struct `ConnectedEnvironmentsStoragesClientCreateOrUpdateResponse` -- New struct `ConnectedEnvironmentsStoragesClientDeleteOptions` -- New struct `ConnectedEnvironmentsStoragesClientDeleteResponse` -- New struct `ConnectedEnvironmentsStoragesClientGetOptions` -- New struct `ConnectedEnvironmentsStoragesClientGetResponse` -- New struct `ConnectedEnvironmentsStoragesClientListOptions` -- New struct `ConnectedEnvironmentsStoragesClientListResponse` -- New struct `ContainerAppAuthToken` -- New struct `ContainerAppAuthTokenProperties` -- New struct `ContainerAppsClientGetAuthTokenOptions` -- New struct `ContainerAppsClientGetAuthTokenResponse` -- New struct `ContainerAppsDiagnosticsClient` -- New struct `ContainerAppsDiagnosticsClientGetDetectorOptions` -- New struct `ContainerAppsDiagnosticsClientGetDetectorResponse` -- New struct `ContainerAppsDiagnosticsClientGetRevisionOptions` -- New struct `ContainerAppsDiagnosticsClientGetRevisionResponse` -- New struct `ContainerAppsDiagnosticsClientGetRootOptions` -- New struct `ContainerAppsDiagnosticsClientGetRootResponse` -- New struct `ContainerAppsDiagnosticsClientListDetectorsOptions` -- New struct `ContainerAppsDiagnosticsClientListDetectorsResponse` -- New struct `ContainerAppsDiagnosticsClientListRevisionsOptions` -- New struct `ContainerAppsDiagnosticsClientListRevisionsResponse` -- New struct `CustomDomainConfiguration` -- New struct `CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo` -- New struct `CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem` -- New struct `DaprSecret` -- New struct `DiagnosticDataProviderMetadata` -- New struct `DiagnosticDataProviderMetadataPropertyBagItem` -- New struct `DiagnosticDataTableResponseColumn` -- New struct `DiagnosticDataTableResponseObject` -- New struct `DiagnosticRendering` -- New struct `DiagnosticSupportTopic` -- New struct `Diagnostics` -- New struct `DiagnosticsCollection` -- New struct `DiagnosticsDataAPIResponse` -- New struct `DiagnosticsDefinition` -- New struct `DiagnosticsProperties` -- New struct `DiagnosticsStatus` -- New struct `EnvironmentAuthToken` -- New struct `EnvironmentAuthTokenProperties` -- New struct `EnvironmentSKUProperties` -- New struct `ErrorAdditionalInfo` -- New struct `ErrorDetail` -- New struct `ErrorResponse` -- New struct `ExtendedLocation` -- New struct `IPSecurityRestrictionRule` -- New struct `InitContainer` -- New struct `ManagedEnvironmentDiagnosticsClient` -- New struct `ManagedEnvironmentDiagnosticsClientGetDetectorOptions` -- New struct `ManagedEnvironmentDiagnosticsClientGetDetectorResponse` -- New struct `ManagedEnvironmentDiagnosticsClientListDetectorsOptions` -- New struct `ManagedEnvironmentDiagnosticsClientListDetectorsResponse` -- New struct `ManagedEnvironmentOutboundSettings` -- New struct `ManagedEnvironmentsClientGetAuthTokenOptions` -- New struct `ManagedEnvironmentsClientGetAuthTokenResponse` -- New struct `ManagedEnvironmentsClientListWorkloadProfileStatesOptions` -- New struct `ManagedEnvironmentsClientListWorkloadProfileStatesResponse` -- New struct `ManagedEnvironmentsDiagnosticsClient` -- New struct `ManagedEnvironmentsDiagnosticsClientGetRootOptions` -- New struct `ManagedEnvironmentsDiagnosticsClientGetRootResponse` -- New struct `TCPScaleRule` -- New struct `WorkloadProfile` -- New struct `WorkloadProfileStates` -- New struct `WorkloadProfileStatesCollection` -- New struct `WorkloadProfileStatesProperties` -- New field `ConflictingContainerAppResourceID` in struct `CustomHostnameAnalysisResult` -- New field `CustomDomainVerificationFailureInfo` in struct `CustomHostnameAnalysisResult` -- New field `AlternateTxtRecords` in struct `CustomHostnameAnalysisResult` -- New field `HasConflictOnManagedEnvironment` in struct `CustomHostnameAnalysisResult` -- New field `TxtRecords` in struct `CustomHostnameAnalysisResult` -- New field `CustomDomainVerificationTest` in struct `CustomHostnameAnalysisResult` -- New field `ConflictWithEnvironmentCustomDomain` in struct `CustomHostnameAnalysisResult` -- New field `AlternateCNameRecords` in struct `CustomHostnameAnalysisResult` -- New field `CNameRecords` in struct `CustomHostnameAnalysisResult` -- New field `HostName` in struct `CustomHostnameAnalysisResult` -- New field `IsHostnameAlreadyVerified` in struct `CustomHostnameAnalysisResult` -- New field `ARecords` in struct `CustomHostnameAnalysisResult` -- New field `SubjectAlternativeNames` in struct `CertificateProperties` -- New field `ExecEndpoint` in struct `ReplicaContainer` -- New field `LogStreamEndpoint` in struct `ReplicaContainer` -- New field `MaxInactiveRevisions` in struct `Configuration` -- New field `HTTPMaxRequestSize` in struct `Dapr` -- New field `HTTPReadBufferSize` in struct `Dapr` -- New field `LogLevel` in struct `Dapr` -- New field `EnableAPILogging` in struct `Dapr` -- New field `SKU` in struct `ManagedEnvironment` -- New field `ExtendedLocation` in struct `ContainerApp` -- New field `WorkloadProfiles` in struct `ManagedEnvironmentProperties` -- New field `CustomDomainConfiguration` in struct `ManagedEnvironmentProperties` -- New field `EventStreamEndpoint` in struct `ManagedEnvironmentProperties` -- New field `TCP` in struct `ScaleRule` -- New field `ExposedPort` in struct `Ingress` -- New field `IPSecurityRestrictions` in struct `Ingress` -- New field `EnvironmentID` in struct `ContainerAppProperties` -- New field `WorkloadProfileType` in struct `ContainerAppProperties` -- New field `EventStreamEndpoint` in struct `ContainerAppProperties` -- New field `SecretStoreComponent` in struct `DaprComponentProperties` -- New field `InitContainers` in struct `Template` -- New field `OutboundSettings` in struct `VnetConfiguration` -- New field `LastActiveTime` in struct `RevisionProperties` - - ## 1.0.0 (2022-05-25) The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/autorest.md b/sdk/resourcemanager/appcontainers/armappcontainers/autorest.md index 89ec7aff9a11..9bbf61f84709 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/autorest.md +++ b/sdk/resourcemanager/appcontainers/armappcontainers/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 2.0.0-beta.2 +module-version: 1.1.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/availableworkloadprofiles_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/availableworkloadprofiles_client.go deleted file mode 100644 index 07b61764fd74..000000000000 --- a/sdk/resourcemanager/appcontainers/armappcontainers/availableworkloadprofiles_client.go +++ /dev/null @@ -1,110 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappcontainers - -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" -) - -// AvailableWorkloadProfilesClient contains the methods for the AvailableWorkloadProfiles group. -// Don't use this type directly, use NewAvailableWorkloadProfilesClient() instead. -type AvailableWorkloadProfilesClient struct { - internal *arm.Client - subscriptionID string -} - -// NewAvailableWorkloadProfilesClient creates a new instance of AvailableWorkloadProfilesClient with the specified values. -// - subscriptionID - The ID of the target subscription. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewAvailableWorkloadProfilesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableWorkloadProfilesClient, error) { - cl, err := arm.NewClient(moduleName+".AvailableWorkloadProfilesClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &AvailableWorkloadProfilesClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// NewGetPager - Get all available workload profiles for a location. -// -// Generated from API version 2022-06-01-preview -// - location - The name of Azure region. -// - options - AvailableWorkloadProfilesClientGetOptions contains the optional parameters for the AvailableWorkloadProfilesClient.NewGetPager -// method. -func (client *AvailableWorkloadProfilesClient) NewGetPager(location string, options *AvailableWorkloadProfilesClientGetOptions) *runtime.Pager[AvailableWorkloadProfilesClientGetResponse] { - return runtime.NewPager(runtime.PagingHandler[AvailableWorkloadProfilesClientGetResponse]{ - More: func(page AvailableWorkloadProfilesClientGetResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *AvailableWorkloadProfilesClientGetResponse) (AvailableWorkloadProfilesClientGetResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AvailableWorkloadProfilesClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AvailableWorkloadProfilesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AvailableWorkloadProfilesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) - }, - }) -} - -// getCreateRequest creates the Get request. -func (client *AvailableWorkloadProfilesClient) getCreateRequest(ctx context.Context, location string, options *AvailableWorkloadProfilesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}/availableManagedEnvironmentsWorkloadProfileTypes" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - 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", "2022-06-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 *AvailableWorkloadProfilesClient) getHandleResponse(resp *http.Response) (AvailableWorkloadProfilesClientGetResponse, error) { - result := AvailableWorkloadProfilesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AvailableWorkloadProfilesCollection); err != nil { - return AvailableWorkloadProfilesClientGetResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/availableworkloadprofiles_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/availableworkloadprofiles_client_example_test.go deleted file mode 100644 index 00cb426fe189..000000000000 --- a/sdk/resourcemanager/appcontainers/armappcontainers/availableworkloadprofiles_client_example_test.go +++ /dev/null @@ -1,163 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappcontainers_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AvailableWorkloadProfiles_Get.json -func ExampleAvailableWorkloadProfilesClient_NewGetPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewAvailableWorkloadProfilesClient().NewGetPager("East US", 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.AvailableWorkloadProfilesCollection = armappcontainers.AvailableWorkloadProfilesCollection{ - // Value: []*armappcontainers.AvailableWorkloadProfile{ - // { - // Name: to.Ptr("GeneralCompute-1"), - // Type: to.Ptr("Microsoft.App/availableManagedEnvironmentsWorkloadProfileTypes"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.App/availableManagedEnvironmentsWorkloadProfileTypes/GeneralCompute-1"), - // Location: to.Ptr("East US"), - // Properties: &armappcontainers.AvailableWorkloadProfileProperties{ - // Applicability: to.Ptr(armappcontainers.ApplicabilityLocationDefault), - // BillingMeterCategory: to.Ptr(armappcontainers.Category("PremiumSkuGeneralCompute")), - // Cores: to.Ptr[int32](4), - // DisplayName: to.Ptr("General Compute 1"), - // MemoryGiB: to.Ptr[int32](16), - // }, - // }, - // { - // Name: to.Ptr("GeneralCompute-2"), - // Type: to.Ptr("Microsoft.App/availableManagedEnvironmentsWorkloadProfileTypes"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.App/availableManagedEnvironmentsWorkloadProfileTypes/GeneralCompute-2"), - // Location: to.Ptr("East US"), - // Properties: &armappcontainers.AvailableWorkloadProfileProperties{ - // Applicability: to.Ptr(armappcontainers.ApplicabilityCustom), - // BillingMeterCategory: to.Ptr(armappcontainers.Category("PremiumSkuGeneralCompute")), - // Cores: to.Ptr[int32](8), - // DisplayName: to.Ptr("General Compute 2"), - // MemoryGiB: to.Ptr[int32](32), - // }, - // }, - // { - // Name: to.Ptr("GeneralCompute-3"), - // Type: to.Ptr("Microsoft.App/availableManagedEnvironmentsWorkloadProfileTypes"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.App/availableManagedEnvironmentsWorkloadProfileTypes/GeneralCompute-3"), - // Location: to.Ptr("East US"), - // Properties: &armappcontainers.AvailableWorkloadProfileProperties{ - // Applicability: to.Ptr(armappcontainers.ApplicabilityCustom), - // BillingMeterCategory: to.Ptr(armappcontainers.Category("PremiumSkuGeneralCompute")), - // Cores: to.Ptr[int32](16), - // DisplayName: to.Ptr("General Compute 3"), - // MemoryGiB: to.Ptr[int32](64), - // }, - // }, - // { - // Name: to.Ptr("MemoryOptimized-1"), - // Type: to.Ptr("Microsoft.App/availableManagedEnvironmentsWorkloadProfileTypes"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.App/availableManagedEnvironmentsWorkloadProfileTypes/MemoryOptimized-1"), - // Location: to.Ptr("East US"), - // Properties: &armappcontainers.AvailableWorkloadProfileProperties{ - // Applicability: to.Ptr(armappcontainers.ApplicabilityCustom), - // BillingMeterCategory: to.Ptr(armappcontainers.CategoryPremiumSKUMemoryOptimized), - // Cores: to.Ptr[int32](4), - // DisplayName: to.Ptr("Memory Optimized 1"), - // MemoryGiB: to.Ptr[int32](32), - // }, - // }, - // { - // Name: to.Ptr("MemoryOptimized-1"), - // Type: to.Ptr("Microsoft.App/availableManagedEnvironmentsWorkloadProfileTypes"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.App/availableManagedEnvironmentsWorkloadProfileTypes/MemoryOptimized-1"), - // Location: to.Ptr("East US"), - // Properties: &armappcontainers.AvailableWorkloadProfileProperties{ - // Applicability: to.Ptr(armappcontainers.ApplicabilityCustom), - // BillingMeterCategory: to.Ptr(armappcontainers.CategoryPremiumSKUMemoryOptimized), - // Cores: to.Ptr[int32](8), - // DisplayName: to.Ptr("Memory Optimized 2"), - // MemoryGiB: to.Ptr[int32](64), - // }, - // }, - // { - // Name: to.Ptr("MemoryOptimized-1"), - // Type: to.Ptr("Microsoft.App/availableManagedEnvironmentsWorkloadProfileTypes"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.App/availableManagedEnvironmentsWorkloadProfileTypes/MemoryOptimized-1"), - // Location: to.Ptr("East US"), - // Properties: &armappcontainers.AvailableWorkloadProfileProperties{ - // Applicability: to.Ptr(armappcontainers.ApplicabilityCustom), - // BillingMeterCategory: to.Ptr(armappcontainers.CategoryPremiumSKUMemoryOptimized), - // Cores: to.Ptr[int32](16), - // DisplayName: to.Ptr("Memory Optimized 3"), - // MemoryGiB: to.Ptr[int32](128), - // }, - // }, - // { - // Name: to.Ptr("CPUOptimized-1"), - // Type: to.Ptr("Microsoft.App/availableManagedEnvironmentsWorkloadProfileTypes"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.App/availableManagedEnvironmentsWorkloadProfileTypes/CPUOptimized-1"), - // Location: to.Ptr("East US"), - // Properties: &armappcontainers.AvailableWorkloadProfileProperties{ - // Applicability: to.Ptr(armappcontainers.ApplicabilityCustom), - // BillingMeterCategory: to.Ptr(armappcontainers.CategoryPremiumSKUComputeOptimized), - // Cores: to.Ptr[int32](4), - // DisplayName: to.Ptr("CPU Optimized 1"), - // MemoryGiB: to.Ptr[int32](8), - // }, - // }, - // { - // Name: to.Ptr("CPUOptimized-2"), - // Type: to.Ptr("Microsoft.App/availableManagedEnvironmentsWorkloadProfileTypes"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.App/availableManagedEnvironmentsWorkloadProfileTypes/CPUOptimized-2"), - // Location: to.Ptr("East US"), - // Properties: &armappcontainers.AvailableWorkloadProfileProperties{ - // Applicability: to.Ptr(armappcontainers.ApplicabilityCustom), - // BillingMeterCategory: to.Ptr(armappcontainers.CategoryPremiumSKUComputeOptimized), - // Cores: to.Ptr[int32](8), - // DisplayName: to.Ptr("CPU Optimized 2"), - // MemoryGiB: to.Ptr[int32](16), - // }, - // }, - // { - // Name: to.Ptr("CPUOptimized-3"), - // Type: to.Ptr("Microsoft.App/availableManagedEnvironmentsWorkloadProfileTypes"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.App/availableManagedEnvironmentsWorkloadProfileTypes/CPUOptimized-3"), - // Location: to.Ptr("East US"), - // Properties: &armappcontainers.AvailableWorkloadProfileProperties{ - // Applicability: to.Ptr(armappcontainers.ApplicabilityCustom), - // BillingMeterCategory: to.Ptr(armappcontainers.CategoryPremiumSKUComputeOptimized), - // Cores: to.Ptr[int32](16), - // DisplayName: to.Ptr("CPU Optimized 3"), - // MemoryGiB: to.Ptr[int32](32), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/billingmeters_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/billingmeters_client.go deleted file mode 100644 index 75898af9587d..000000000000 --- a/sdk/resourcemanager/appcontainers/armappcontainers/billingmeters_client.go +++ /dev/null @@ -1,97 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappcontainers - -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" -) - -// BillingMetersClient contains the methods for the BillingMeters group. -// Don't use this type directly, use NewBillingMetersClient() instead. -type BillingMetersClient struct { - internal *arm.Client - subscriptionID string -} - -// NewBillingMetersClient creates a new instance of BillingMetersClient with the specified values. -// - subscriptionID - The ID of the target subscription. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewBillingMetersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BillingMetersClient, error) { - cl, err := arm.NewClient(moduleName+".BillingMetersClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &BillingMetersClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// Get - Get all billingMeters for a location. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - location - The name of Azure region. -// - options - BillingMetersClientGetOptions contains the optional parameters for the BillingMetersClient.Get method. -func (client *BillingMetersClient) Get(ctx context.Context, location string, options *BillingMetersClientGetOptions) (BillingMetersClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, location, options) - if err != nil { - return BillingMetersClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return BillingMetersClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BillingMetersClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *BillingMetersClient) getCreateRequest(ctx context.Context, location string, options *BillingMetersClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}/billingMeters" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - 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", "2022-06-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 *BillingMetersClient) getHandleResponse(resp *http.Response) (BillingMetersClientGetResponse, error) { - result := BillingMetersClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BillingMeterCollection); err != nil { - return BillingMetersClientGetResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/billingmeters_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/billingmeters_client_example_test.go deleted file mode 100644 index 348bb04c111b..000000000000 --- a/sdk/resourcemanager/appcontainers/armappcontainers/billingmeters_client_example_test.go +++ /dev/null @@ -1,107 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappcontainers_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/BillingMeters_Get.json -func ExampleBillingMetersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBillingMetersClient().Get(ctx, "East US", 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.BillingMeterCollection = armappcontainers.BillingMeterCollection{ - // Value: []*armappcontainers.BillingMeter{ - // { - // Name: to.Ptr("PremiumSKUGeneralPurposeCPU"), - // Type: to.Ptr("Microsoft.App/billingMeters"), - // ID: to.Ptr("/subscriptions/55f240e3-3d66-44f6-8358-4e4f3d7a2e51/providers/Microsoft.App/PremiumSKUGeneralPurposeCPU"), - // Location: to.Ptr("East US"), - // Properties: &armappcontainers.BillingMeterProperties{ - // Category: to.Ptr(armappcontainers.CategoryPremiumSKUGeneralPurpose), - // DisplayName: to.Ptr("Premium SKU General Purpose Cores per Second"), - // MeterType: to.Ptr("CPU"), - // }, - // }, - // { - // Name: to.Ptr("PremiumSKUGeneralPurposeMemory"), - // Type: to.Ptr("Microsoft.App/billingMeters"), - // ID: to.Ptr("/subscriptions/55f240e3-3d66-44f6-8358-4e4f3d7a2e51/providers/Microsoft.App/PremiumSKUGeneralPurposeMemory"), - // Location: to.Ptr("East US"), - // Properties: &armappcontainers.BillingMeterProperties{ - // Category: to.Ptr(armappcontainers.CategoryPremiumSKUGeneralPurpose), - // DisplayName: to.Ptr("Premium SKU General Purpose Memory GiB per Second"), - // MeterType: to.Ptr("Memory"), - // }, - // }, - // { - // Name: to.Ptr("PremiumSKUMemoryOptimizedCPU"), - // Type: to.Ptr("Microsoft.App/billingMeters"), - // ID: to.Ptr("/subscriptions/55f240e3-3d66-44f6-8358-4e4f3d7a2e51/providers/Microsoft.App/PremiumSKUMemoryOptimizedCPU"), - // Location: to.Ptr("East US"), - // Properties: &armappcontainers.BillingMeterProperties{ - // Category: to.Ptr(armappcontainers.CategoryPremiumSKUMemoryOptimized), - // DisplayName: to.Ptr("Premium SKU Memory Optimized Cores per Second"), - // MeterType: to.Ptr("CPU"), - // }, - // }, - // { - // Name: to.Ptr("PremiumSkuMemoryOptimizedMemory"), - // Type: to.Ptr("Microsoft.App/billingMeters"), - // ID: to.Ptr("/subscriptions/55f240e3-3d66-44f6-8358-4e4f3d7a2e51/providers/Microsoft.App/PremiumSkuMemoryOptimizedMemory"), - // Location: to.Ptr("East US"), - // Properties: &armappcontainers.BillingMeterProperties{ - // Category: to.Ptr(armappcontainers.CategoryPremiumSKUMemoryOptimized), - // DisplayName: to.Ptr("Premium SKU Memory Optimized Memory GiB per Second"), - // MeterType: to.Ptr("Memory"), - // }, - // }, - // { - // Name: to.Ptr("PremiumSKUComputeOptimizedCPU"), - // Type: to.Ptr("Microsoft.App/billingMeters"), - // ID: to.Ptr("/subscriptions/55f240e3-3d66-44f6-8358-4e4f3d7a2e51/providers/Microsoft.App/PremiumSKUComputeOptimizedCPU"), - // Location: to.Ptr("East US"), - // Properties: &armappcontainers.BillingMeterProperties{ - // Category: to.Ptr(armappcontainers.CategoryPremiumSKUComputeOptimized), - // DisplayName: to.Ptr("Premium SKU Compute Optimized Cores per Second"), - // MeterType: to.Ptr("CPU"), - // }, - // }, - // { - // Name: to.Ptr("PremiumSKUGeneralComputeMemory"), - // Type: to.Ptr("Microsoft.App/billingMeters"), - // ID: to.Ptr("/subscriptions/55f240e3-3d66-44f6-8358-4e4f3d7a2e51/providers/Microsoft.App/PremiumSKUGeneralComputeMemory"), - // Location: to.Ptr("East US"), - // Properties: &armappcontainers.BillingMeterProperties{ - // Category: to.Ptr(armappcontainers.CategoryPremiumSKUComputeOptimized), - // DisplayName: to.Ptr("Premium SKU Compute Optimized Memory GiB per Second"), - // MeterType: to.Ptr("Memory"), - // }, - // }}, - // } -} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/certificates_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/certificates_client.go index 852606a21877..12aefe799a7c 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/certificates_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/certificates_client.go @@ -47,7 +47,7 @@ func NewCertificatesClient(subscriptionID string, credential azcore.TokenCredent // CreateOrUpdate - Create or Update a Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - certificateName - Name of the Certificate. @@ -92,7 +92,7 @@ func (client *CertificatesClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.CertificateEnvelope != nil { @@ -113,7 +113,7 @@ func (client *CertificatesClient) createOrUpdateHandleResponse(resp *http.Respon // Delete - Deletes the specified Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - certificateName - Name of the Certificate. @@ -157,7 +157,7 @@ func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -166,7 +166,7 @@ func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resou // Get - Get the specified Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - certificateName - Name of the Certificate. @@ -210,7 +210,7 @@ func (client *CertificatesClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -227,7 +227,7 @@ func (client *CertificatesClient) getHandleResponse(resp *http.Response) (Certif // NewListPager - Get the Certificates in a given managed environment. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - options - CertificatesClientListOptions contains the optional parameters for the CertificatesClient.NewListPager method. @@ -279,7 +279,7 @@ func (client *CertificatesClient) listCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -297,7 +297,7 @@ func (client *CertificatesClient) listHandleResponse(resp *http.Response) (Certi // Update - Patches a certificate. Currently only patching of tags is supported // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - certificateName - Name of the Certificate. @@ -342,7 +342,7 @@ func (client *CertificatesClient) updateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, certificateEnvelope) diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/certificates_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/certificates_client_example_test.go index 70375b34d213..d57306ea7712 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/certificates_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/certificates_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/appcontainers/armappcontainers/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_ListByManagedEnvironment.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_ListByManagedEnvironment.json func ExampleCertificatesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -43,44 +43,40 @@ func ExampleCertificatesClient_NewListPager() { // page.CertificateCollection = armappcontainers.CertificateCollection{ // Value: []*armappcontainers.Certificate{ // { - // Name: to.Ptr("certificate-firendly-name"), + // Name: to.Ptr("certificate-firendly-name1"), // Type: to.Ptr("Microsoft.App/ManagedEnvironments/Certificates"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificate-firendly-name"), + // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-firendly-name1"), // Location: to.Ptr("East US"), // Properties: &armappcontainers.CertificateProperties{ // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-06T04:00:00Z"); return t}()), // IssueDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-06T04:00:00Z"); return t}()), // Issuer: to.Ptr("Issuer Name"), // ProvisioningState: to.Ptr(armappcontainers.CertificateProvisioningStateSucceeded), - // SubjectAlternativeNames: []*string{ - // to.Ptr("CN=my-subject-name.com")}, - // SubjectName: to.Ptr("my-subject-name.company.country.net"), - // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), - // Valid: to.Ptr(true), - // }, + // SubjectName: to.Ptr("my-subject-name1.contoso.com"), + // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), + // Valid: to.Ptr(true), // }, - // { - // Name: to.Ptr("certificate-firendly-name"), - // Type: to.Ptr("Microsoft.App/ManagedEnvironments/Certificates"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificate-firendly-name"), - // Location: to.Ptr("East US"), - // Properties: &armappcontainers.CertificateProperties{ - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-06T04:00:00Z"); return t}()), - // IssueDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-06T04:00:00Z"); return t}()), - // Issuer: to.Ptr("Issuer Name"), - // ProvisioningState: to.Ptr(armappcontainers.CertificateProvisioningStateSucceeded), - // SubjectAlternativeNames: []*string{ - // to.Ptr("CN=my-subject-name.com")}, - // SubjectName: to.Ptr("my-subject-name.company.country.net"), - // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), - // Valid: to.Ptr(true), - // }, - // }}, - // } + // }, + // { + // Name: to.Ptr("certificate-firendly-name2"), + // Type: to.Ptr("Microsoft.App/ManagedEnvironments/Certificates"), + // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-firendly-name2"), + // Location: to.Ptr("East US"), + // Properties: &armappcontainers.CertificateProperties{ + // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-06T04:00:00Z"); return t}()), + // IssueDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-06T04:00:00Z"); return t}()), + // Issuer: to.Ptr("Issuer Name"), + // ProvisioningState: to.Ptr(armappcontainers.CertificateProvisioningStateSucceeded), + // SubjectName: to.Ptr("my-subject-name2.contoso.com"), + // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), + // Valid: to.Ptr(true), + // }, + // }}, + // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_Get.json func ExampleCertificatesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -101,23 +97,21 @@ func ExampleCertificatesClient_Get() { // res.Certificate = armappcontainers.Certificate{ // Name: to.Ptr("certificate-firendly-name"), // Type: to.Ptr("Microsoft.App/ManagedEnvironments/Certificates"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificate-firendly-name"), + // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-firendly-name"), // Location: to.Ptr("East US"), // Properties: &armappcontainers.CertificateProperties{ // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-06T04:00:00Z"); return t}()), // IssueDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-06T04:00:00Z"); return t}()), // Issuer: to.Ptr("Issuer Name"), // ProvisioningState: to.Ptr(armappcontainers.CertificateProvisioningStateSucceeded), - // SubjectAlternativeNames: []*string{ - // to.Ptr("CN=my-subject-name.com")}, - // SubjectName: to.Ptr("my-subject-name.company.country.net"), - // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), - // Valid: to.Ptr(true), - // }, - // } + // SubjectName: to.Ptr("my-subject-name.contoso.com"), + // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), + // Valid: to.Ptr(true), + // }, + // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_CreateOrUpdate.json func ExampleCertificatesClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -144,23 +138,21 @@ func ExampleCertificatesClient_CreateOrUpdate() { // 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.Certificate = armappcontainers.Certificate{ // Type: to.Ptr("Microsoft.App/ManagedEnvironments/Certificates"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificate-firendly-name"), + // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-firendly-name"), // Location: to.Ptr("East US"), // Properties: &armappcontainers.CertificateProperties{ // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-06T04:00:00Z"); return t}()), // IssueDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-06T04:00:00Z"); return t}()), // Issuer: to.Ptr("Issuer Name"), // ProvisioningState: to.Ptr(armappcontainers.CertificateProvisioningStateSucceeded), - // SubjectAlternativeNames: []*string{ - // to.Ptr("CN=my-subject-name.com")}, - // SubjectName: to.Ptr("my-subject-name.company.country.net"), - // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), - // Valid: to.Ptr(true), - // }, - // } + // SubjectName: to.Ptr("my-subject-name.contoso.com"), + // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), + // Valid: to.Ptr(true), + // }, + // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_Delete.json func ExampleCertificatesClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -177,7 +169,7 @@ func ExampleCertificatesClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_Patch.json func ExampleCertificatesClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -202,7 +194,7 @@ func ExampleCertificatesClient_Update() { // 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.Certificate = armappcontainers.Certificate{ // Type: to.Ptr("Microsoft.App/ManagedEnvironments/Certificates"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificate-firendly-name"), + // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-firendly-name"), // Location: to.Ptr("East US"), // Tags: map[string]*string{ // "tag1": to.Ptr("value1"), @@ -213,11 +205,9 @@ func ExampleCertificatesClient_Update() { // IssueDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-06T04:00:00Z"); return t}()), // Issuer: to.Ptr("Issuer Name"), // ProvisioningState: to.Ptr(armappcontainers.CertificateProvisioningStateSucceeded), - // SubjectAlternativeNames: []*string{ - // to.Ptr("CN=my-subject-name.com")}, - // SubjectName: to.Ptr("my-subject-name.company.country.net"), - // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), - // Valid: to.Ptr(true), - // }, - // } + // SubjectName: to.Ptr("my-subject-name.contoso.com"), + // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), + // Valid: to.Ptr(true), + // }, + // } } diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/client_factory.go b/sdk/resourcemanager/appcontainers/armappcontainers/client_factory.go index caba40157c89..cf00001920dc 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/client_factory.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/client_factory.go @@ -63,21 +63,6 @@ func (c *ClientFactory) NewDaprComponentsClient() *DaprComponentsClient { return subClient } -func (c *ClientFactory) NewContainerAppsDiagnosticsClient() *ContainerAppsDiagnosticsClient { - subClient, _ := NewContainerAppsDiagnosticsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewManagedEnvironmentDiagnosticsClient() *ManagedEnvironmentDiagnosticsClient { - subClient, _ := NewManagedEnvironmentDiagnosticsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewManagedEnvironmentsDiagnosticsClient() *ManagedEnvironmentsDiagnosticsClient { - subClient, _ := NewManagedEnvironmentsDiagnosticsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - func (c *ClientFactory) NewOperationsClient() *OperationsClient { subClient, _ := NewOperationsClient(c.credential, c.options) return subClient @@ -107,33 +92,3 @@ func (c *ClientFactory) NewContainerAppsSourceControlsClient() *ContainerAppsSou subClient, _ := NewContainerAppsSourceControlsClient(c.subscriptionID, c.credential, c.options) return subClient } - -func (c *ClientFactory) NewConnectedEnvironmentsClient() *ConnectedEnvironmentsClient { - subClient, _ := NewConnectedEnvironmentsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewConnectedEnvironmentsCertificatesClient() *ConnectedEnvironmentsCertificatesClient { - subClient, _ := NewConnectedEnvironmentsCertificatesClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewConnectedEnvironmentsDaprComponentsClient() *ConnectedEnvironmentsDaprComponentsClient { - subClient, _ := NewConnectedEnvironmentsDaprComponentsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewConnectedEnvironmentsStoragesClient() *ConnectedEnvironmentsStoragesClient { - subClient, _ := NewConnectedEnvironmentsStoragesClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAvailableWorkloadProfilesClient() *AvailableWorkloadProfilesClient { - subClient, _ := NewAvailableWorkloadProfilesClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewBillingMetersClient() *BillingMetersClient { - subClient, _ := NewBillingMetersClient(c.subscriptionID, c.credential, c.options) - return subClient -} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironments_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironments_client.go deleted file mode 100644 index 1121cea79216..000000000000 --- a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironments_client.go +++ /dev/null @@ -1,476 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappcontainers - -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" -) - -// ConnectedEnvironmentsClient contains the methods for the ConnectedEnvironments group. -// Don't use this type directly, use NewConnectedEnvironmentsClient() instead. -type ConnectedEnvironmentsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewConnectedEnvironmentsClient creates a new instance of ConnectedEnvironmentsClient with the specified values. -// - subscriptionID - The ID of the target subscription. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewConnectedEnvironmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectedEnvironmentsClient, error) { - cl, err := arm.NewClient(moduleName+".ConnectedEnvironmentsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &ConnectedEnvironmentsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// CheckNameAvailability - Checks if resource connectedEnvironmentName is available. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - connectedEnvironmentName - Name of the Managed Environment. -// - checkNameAvailabilityRequest - The check connectedEnvironmentName availability request. -// - options - ConnectedEnvironmentsClientCheckNameAvailabilityOptions contains the optional parameters for the ConnectedEnvironmentsClient.CheckNameAvailability -// method. -func (client *ConnectedEnvironmentsClient) CheckNameAvailability(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, checkNameAvailabilityRequest CheckNameAvailabilityRequest, options *ConnectedEnvironmentsClientCheckNameAvailabilityOptions) (ConnectedEnvironmentsClientCheckNameAvailabilityResponse, error) { - req, err := client.checkNameAvailabilityCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, checkNameAvailabilityRequest, options) - if err != nil { - return ConnectedEnvironmentsClientCheckNameAvailabilityResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ConnectedEnvironmentsClientCheckNameAvailabilityResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) - } - return client.checkNameAvailabilityHandleResponse(resp) -} - -// checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. -func (client *ConnectedEnvironmentsClient) checkNameAvailabilityCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, checkNameAvailabilityRequest CheckNameAvailabilityRequest, options *ConnectedEnvironmentsClientCheckNameAvailabilityOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/checkNameAvailability" - 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 connectedEnvironmentName == "" { - return nil, errors.New("parameter connectedEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectedEnvironmentName}", url.PathEscape(connectedEnvironmentName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, checkNameAvailabilityRequest) -} - -// checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. -func (client *ConnectedEnvironmentsClient) checkNameAvailabilityHandleResponse(resp *http.Response) (ConnectedEnvironmentsClientCheckNameAvailabilityResponse, error) { - result := ConnectedEnvironmentsClientCheckNameAvailabilityResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CheckNameAvailabilityResponse); err != nil { - return ConnectedEnvironmentsClientCheckNameAvailabilityResponse{}, err - } - return result, nil -} - -// BeginCreateOrUpdate - Creates or updates an connectedEnvironment. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - connectedEnvironmentName - Name of the connectedEnvironment. -// - environmentEnvelope - Configuration details of the connectedEnvironment. -// - options - ConnectedEnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConnectedEnvironmentsClient.BeginCreateOrUpdate -// method. -func (client *ConnectedEnvironmentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, environmentEnvelope ConnectedEnvironment, options *ConnectedEnvironmentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ConnectedEnvironmentsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, connectedEnvironmentName, environmentEnvelope, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ConnectedEnvironmentsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[ConnectedEnvironmentsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// CreateOrUpdate - Creates or updates an connectedEnvironment. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -func (client *ConnectedEnvironmentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, environmentEnvelope ConnectedEnvironment, options *ConnectedEnvironmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, environmentEnvelope, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ConnectedEnvironmentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, environmentEnvelope ConnectedEnvironment, options *ConnectedEnvironmentsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}" - 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 connectedEnvironmentName == "" { - return nil, errors.New("parameter connectedEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectedEnvironmentName}", url.PathEscape(connectedEnvironmentName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, environmentEnvelope) -} - -// BeginDelete - Delete an connectedEnvironment. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - connectedEnvironmentName - Name of the connectedEnvironment. -// - options - ConnectedEnvironmentsClientBeginDeleteOptions contains the optional parameters for the ConnectedEnvironmentsClient.BeginDelete -// method. -func (client *ConnectedEnvironmentsClient) BeginDelete(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsClientBeginDeleteOptions) (*runtime.Poller[ConnectedEnvironmentsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, connectedEnvironmentName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ConnectedEnvironmentsClientDeleteResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[ConnectedEnvironmentsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Delete - Delete an connectedEnvironment. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -func (client *ConnectedEnvironmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ConnectedEnvironmentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}" - 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 connectedEnvironmentName == "" { - return nil, errors.New("parameter connectedEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectedEnvironmentName}", url.PathEscape(connectedEnvironmentName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the properties of an connectedEnvironment. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - connectedEnvironmentName - Name of the connectedEnvironment. -// - options - ConnectedEnvironmentsClientGetOptions contains the optional parameters for the ConnectedEnvironmentsClient.Get -// method. -func (client *ConnectedEnvironmentsClient) Get(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsClientGetOptions) (ConnectedEnvironmentsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, options) - if err != nil { - return ConnectedEnvironmentsClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ConnectedEnvironmentsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ConnectedEnvironmentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}" - 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 connectedEnvironmentName == "" { - return nil, errors.New("parameter connectedEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectedEnvironmentName}", url.PathEscape(connectedEnvironmentName)) - 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", "2022-06-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 *ConnectedEnvironmentsClient) getHandleResponse(resp *http.Response) (ConnectedEnvironmentsClientGetResponse, error) { - result := ConnectedEnvironmentsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ConnectedEnvironment); err != nil { - return ConnectedEnvironmentsClientGetResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Get all connectedEnvironments in a resource group. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - options - ConnectedEnvironmentsClientListByResourceGroupOptions contains the optional parameters for the ConnectedEnvironmentsClient.NewListByResourceGroupPager -// method. -func (client *ConnectedEnvironmentsClient) NewListByResourceGroupPager(resourceGroupName string, options *ConnectedEnvironmentsClientListByResourceGroupOptions) *runtime.Pager[ConnectedEnvironmentsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[ConnectedEnvironmentsClientListByResourceGroupResponse]{ - More: func(page ConnectedEnvironmentsClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ConnectedEnvironmentsClientListByResourceGroupResponse) (ConnectedEnvironmentsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ConnectedEnvironmentsClientListByResourceGroupResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ConnectedEnvironmentsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *ConnectedEnvironmentsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ConnectedEnvironmentsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments" - 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", "2022-06-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 *ConnectedEnvironmentsClient) listByResourceGroupHandleResponse(resp *http.Response) (ConnectedEnvironmentsClientListByResourceGroupResponse, error) { - result := ConnectedEnvironmentsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ConnectedEnvironmentCollection); err != nil { - return ConnectedEnvironmentsClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListBySubscriptionPager - Get all connectedEnvironments for a subscription. -// -// Generated from API version 2022-06-01-preview -// - options - ConnectedEnvironmentsClientListBySubscriptionOptions contains the optional parameters for the ConnectedEnvironmentsClient.NewListBySubscriptionPager -// method. -func (client *ConnectedEnvironmentsClient) NewListBySubscriptionPager(options *ConnectedEnvironmentsClientListBySubscriptionOptions) *runtime.Pager[ConnectedEnvironmentsClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[ConnectedEnvironmentsClientListBySubscriptionResponse]{ - More: func(page ConnectedEnvironmentsClientListBySubscriptionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ConnectedEnvironmentsClientListBySubscriptionResponse) (ConnectedEnvironmentsClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ConnectedEnvironmentsClientListBySubscriptionResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ConnectedEnvironmentsClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } - return client.listBySubscriptionHandleResponse(resp) - }, - }) -} - -// listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *ConnectedEnvironmentsClient) listBySubscriptionCreateRequest(ctx context.Context, options *ConnectedEnvironmentsClientListBySubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.App/connectedEnvironments" - 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", "2022-06-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 *ConnectedEnvironmentsClient) listBySubscriptionHandleResponse(resp *http.Response) (ConnectedEnvironmentsClientListBySubscriptionResponse, error) { - result := ConnectedEnvironmentsClientListBySubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ConnectedEnvironmentCollection); err != nil { - return ConnectedEnvironmentsClientListBySubscriptionResponse{}, err - } - return result, nil -} - -// Update - Patches a Managed Environment. Only patching of tags is supported currently -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - connectedEnvironmentName - Name of the connectedEnvironment. -// - options - ConnectedEnvironmentsClientUpdateOptions contains the optional parameters for the ConnectedEnvironmentsClient.Update -// method. -func (client *ConnectedEnvironmentsClient) Update(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsClientUpdateOptions) (ConnectedEnvironmentsClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, options) - if err != nil { - return ConnectedEnvironmentsClientUpdateResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ConnectedEnvironmentsClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *ConnectedEnvironmentsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}" - 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 connectedEnvironmentName == "" { - return nil, errors.New("parameter connectedEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectedEnvironmentName}", url.PathEscape(connectedEnvironmentName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// updateHandleResponse handles the Update response. -func (client *ConnectedEnvironmentsClient) updateHandleResponse(resp *http.Response) (ConnectedEnvironmentsClientUpdateResponse, error) { - result := ConnectedEnvironmentsClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ConnectedEnvironment); err != nil { - return ConnectedEnvironmentsClientUpdateResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironments_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironments_client_example_test.go deleted file mode 100644 index 803807094c42..000000000000 --- a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironments_client_example_test.go +++ /dev/null @@ -1,357 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappcontainers_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_ListBySubscription.json -func ExampleConnectedEnvironmentsClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewConnectedEnvironmentsClient().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.ConnectedEnvironmentCollection = armappcontainers.ConnectedEnvironmentCollection{ - // Value: []*armappcontainers.ConnectedEnvironment{ - // { - // Name: to.Ptr("sample1"), - // Type: to.Ptr("Microsoft.App/connectedEnvironments"), - // ID: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/connectedEnvironments/sample1"), - // Location: to.Ptr("North Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armappcontainers.ConnectedEnvironmentProperties{ - // CustomDomainConfiguration: &armappcontainers.CustomDomainConfiguration{ - // CustomDomainVerificationID: to.Ptr("custom domain verification id"), - // DNSSuffix: to.Ptr("www.my-name.com"), - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-06T04:00:00Z"); return t}()), - // SubjectName: to.Ptr("CN=www.my-name.com"), - // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), - // }, - // DefaultDomain: to.Ptr("sample1.k4apps.io"), - // ProvisioningState: to.Ptr(armappcontainers.ConnectedEnvironmentProvisioningStateSucceeded), - // StaticIP: to.Ptr("20.42.33.145"), - // }, - // }, - // { - // Name: to.Ptr("sample2"), - // Type: to.Ptr("Microsoft.App/connectedEnvironments"), - // ID: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/DemoRG/providers/Microsoft.App/connectedEnvironments/sample2"), - // Location: to.Ptr("North Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armappcontainers.ConnectedEnvironmentProperties{ - // CustomDomainConfiguration: &armappcontainers.CustomDomainConfiguration{ - // CustomDomainVerificationID: to.Ptr("custom domain verification id"), - // DNSSuffix: to.Ptr("www.my-name2.com"), - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-06T04:00:00Z"); return t}()), - // SubjectName: to.Ptr("CN=www.my-name2.com"), - // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), - // }, - // DefaultDomain: to.Ptr("sample2.k4apps.io"), - // ProvisioningState: to.Ptr(armappcontainers.ConnectedEnvironmentProvisioningStateSucceeded), - // StaticIP: to.Ptr("52.142.21.61"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json -func ExampleConnectedEnvironmentsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewConnectedEnvironmentsClient().NewListByResourceGroupPager("examplerg", 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.ConnectedEnvironmentCollection = armappcontainers.ConnectedEnvironmentCollection{ - // Value: []*armappcontainers.ConnectedEnvironment{ - // { - // Name: to.Ptr("sample1"), - // Type: to.Ptr("Microsoft.App/connectedEnvironments"), - // ID: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/connectedEnvironments/sample1"), - // Location: to.Ptr("North Central US"), - // Tags: map[string]*string{ - // }, - // ExtendedLocation: &armappcontainers.ExtendedLocation{ - // Name: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation"), - // Type: to.Ptr(armappcontainers.ExtendedLocationTypesCustomLocation), - // }, - // Properties: &armappcontainers.ConnectedEnvironmentProperties{ - // CustomDomainConfiguration: &armappcontainers.CustomDomainConfiguration{ - // CustomDomainVerificationID: to.Ptr("custom domain verification id"), - // DNSSuffix: to.Ptr("www.my-name.com"), - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-06T04:00:00Z"); return t}()), - // SubjectName: to.Ptr("CN=www.my-name.com"), - // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), - // }, - // DefaultDomain: to.Ptr("sample1.k4apps.io"), - // ProvisioningState: to.Ptr(armappcontainers.ConnectedEnvironmentProvisioningStateSucceeded), - // StaticIP: to.Ptr("20.42.33.145"), - // }, - // }, - // { - // Name: to.Ptr("sample2"), - // Type: to.Ptr("Microsoft.App/connectedEnvironments"), - // ID: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/connectedEnvironments/sample2"), - // Location: to.Ptr("North Central US"), - // Tags: map[string]*string{ - // }, - // ExtendedLocation: &armappcontainers.ExtendedLocation{ - // Name: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation"), - // Type: to.Ptr(armappcontainers.ExtendedLocationTypesCustomLocation), - // }, - // Properties: &armappcontainers.ConnectedEnvironmentProperties{ - // CustomDomainConfiguration: &armappcontainers.CustomDomainConfiguration{ - // CustomDomainVerificationID: to.Ptr("custom domain verification id"), - // DNSSuffix: to.Ptr("www.my-name2.com"), - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-06T04:00:00Z"); return t}()), - // SubjectName: to.Ptr("CN=www.my-name2.com"), - // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), - // }, - // DefaultDomain: to.Ptr("sample2.k4apps.io"), - // ProvisioningState: to.Ptr(armappcontainers.ConnectedEnvironmentProvisioningStateSucceeded), - // StaticIP: to.Ptr("52.142.21.61"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Get.json -func ExampleConnectedEnvironmentsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewConnectedEnvironmentsClient().Get(ctx, "examplerg", "examplekenv", 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.ConnectedEnvironment = armappcontainers.ConnectedEnvironment{ - // Name: to.Ptr("examplekenv"), - // Type: to.Ptr("Microsoft.App/kubeEnvironments"), - // ID: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/kubeEnvironments/examplekenv"), - // Location: to.Ptr("North Central US"), - // Tags: map[string]*string{ - // }, - // ExtendedLocation: &armappcontainers.ExtendedLocation{ - // Name: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation"), - // Type: to.Ptr(armappcontainers.ExtendedLocationTypesCustomLocation), - // }, - // Properties: &armappcontainers.ConnectedEnvironmentProperties{ - // CustomDomainConfiguration: &armappcontainers.CustomDomainConfiguration{ - // CustomDomainVerificationID: to.Ptr("custom domain verification id"), - // DNSSuffix: to.Ptr("www.my-name.com"), - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-06T04:00:00Z"); return t}()), - // SubjectName: to.Ptr("CN=www.my-name.com"), - // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), - // }, - // DefaultDomain: to.Ptr("examplekenv.k4apps.io"), - // ProvisioningState: to.Ptr(armappcontainers.ConnectedEnvironmentProvisioningStateSucceeded), - // StaticIP: to.Ptr("20.42.33.145"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json -func ExampleConnectedEnvironmentsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewConnectedEnvironmentsClient().BeginCreateOrUpdate(ctx, "examplerg", "testenv", armappcontainers.ConnectedEnvironment{ - Location: to.Ptr("East US"), - Properties: &armappcontainers.ConnectedEnvironmentProperties{ - CustomDomainConfiguration: &armappcontainers.CustomDomainConfiguration{ - CertificatePassword: []byte("private key password"), - CertificateValue: []byte("PFX-or-PEM-blob"), - DNSSuffix: to.Ptr("www.my-name.com"), - }, - DaprAIConnectionString: to.Ptr("InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/"), - StaticIP: to.Ptr("1.2.3.4"), - }, - }, 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.ConnectedEnvironment = armappcontainers.ConnectedEnvironment{ - // Name: to.Ptr("testenv"), - // Type: to.Ptr("Microsoft.App/connectedEnvironments"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/connectedEnvironments/testenv"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // }, - // ExtendedLocation: &armappcontainers.ExtendedLocation{ - // Name: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation"), - // Type: to.Ptr(armappcontainers.ExtendedLocationTypesCustomLocation), - // }, - // Properties: &armappcontainers.ConnectedEnvironmentProperties{ - // CustomDomainConfiguration: &armappcontainers.CustomDomainConfiguration{ - // CustomDomainVerificationID: to.Ptr("custom domain verification id"), - // DNSSuffix: to.Ptr("www.my-name.com"), - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-06T04:00:00Z"); return t}()), - // SubjectName: to.Ptr("CN=www.my-name.com"), - // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), - // }, - // DefaultDomain: to.Ptr("testenv.k4apps.io"), - // ProvisioningState: to.Ptr(armappcontainers.ConnectedEnvironmentProvisioningStateSucceeded), - // StaticIP: to.Ptr("1.2.3.4"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Delete.json -func ExampleConnectedEnvironmentsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewConnectedEnvironmentsClient().BeginDelete(ctx, "examplerg", "examplekenv", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Patch.json -func ExampleConnectedEnvironmentsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewConnectedEnvironmentsClient().Update(ctx, "examplerg", "testenv", 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.ConnectedEnvironment = armappcontainers.ConnectedEnvironment{ - // Name: to.Ptr("testenv"), - // Type: to.Ptr("Microsoft.App/connectedEnvironments"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/connectedEnvironments/testenv"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // "tag1": to.Ptr("value1"), - // "tag2": to.Ptr("value2"), - // }, - // Properties: &armappcontainers.ConnectedEnvironmentProperties{ - // CustomDomainConfiguration: &armappcontainers.CustomDomainConfiguration{ - // CustomDomainVerificationID: to.Ptr("custom domain verification id"), - // DNSSuffix: to.Ptr("www.my-name.com"), - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-06T04:00:00Z"); return t}()), - // SubjectName: to.Ptr("CN=www.my-name.com"), - // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), - // }, - // DefaultDomain: to.Ptr("testenv.k4apps.io"), - // ProvisioningState: to.Ptr(armappcontainers.ConnectedEnvironmentProvisioningStateSucceeded), - // StaticIP: to.Ptr("20.42.33.145"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json -func ExampleConnectedEnvironmentsClient_CheckNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewConnectedEnvironmentsClient().CheckNameAvailability(ctx, "examplerg", "testcontainerenv", armappcontainers.CheckNameAvailabilityRequest{ - Name: to.Ptr("testcertificatename"), - Type: to.Ptr("Microsoft.App/connectedEnvironments/certificates"), - }, 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.CheckNameAvailabilityResponse = armappcontainers.CheckNameAvailabilityResponse{ - // Message: to.Ptr(""), - // NameAvailable: to.Ptr(true), - // Reason: to.Ptr(armappcontainers.CheckNameAvailabilityReason("None")), - // } -} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentscertificates_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentscertificates_client.go deleted file mode 100644 index 9a272f14c499..000000000000 --- a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentscertificates_client.go +++ /dev/null @@ -1,362 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappcontainers - -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" -) - -// ConnectedEnvironmentsCertificatesClient contains the methods for the ConnectedEnvironmentsCertificates group. -// Don't use this type directly, use NewConnectedEnvironmentsCertificatesClient() instead. -type ConnectedEnvironmentsCertificatesClient struct { - internal *arm.Client - subscriptionID string -} - -// NewConnectedEnvironmentsCertificatesClient creates a new instance of ConnectedEnvironmentsCertificatesClient with the specified values. -// - subscriptionID - The ID of the target subscription. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewConnectedEnvironmentsCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectedEnvironmentsCertificatesClient, error) { - cl, err := arm.NewClient(moduleName+".ConnectedEnvironmentsCertificatesClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &ConnectedEnvironmentsCertificatesClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// CreateOrUpdate - Create or Update a Certificate. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - connectedEnvironmentName - Name of the Connected Environment. -// - certificateName - Name of the Certificate. -// - options - ConnectedEnvironmentsCertificatesClientCreateOrUpdateOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.CreateOrUpdate -// method. -func (client *ConnectedEnvironmentsCertificatesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, certificateName string, options *ConnectedEnvironmentsCertificatesClientCreateOrUpdateOptions) (ConnectedEnvironmentsCertificatesClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, certificateName, options) - if err != nil { - return ConnectedEnvironmentsCertificatesClientCreateOrUpdateResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ConnectedEnvironmentsCertificatesClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsCertificatesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ConnectedEnvironmentsCertificatesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, certificateName string, options *ConnectedEnvironmentsCertificatesClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}" - 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 connectedEnvironmentName == "" { - return nil, errors.New("parameter connectedEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectedEnvironmentName}", url.PathEscape(connectedEnvironmentName)) - if certificateName == "" { - return nil, errors.New("parameter certificateName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{certificateName}", url.PathEscape(certificateName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.CertificateEnvelope != nil { - return req, runtime.MarshalAsJSON(req, *options.CertificateEnvelope) - } - return req, nil -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *ConnectedEnvironmentsCertificatesClient) createOrUpdateHandleResponse(resp *http.Response) (ConnectedEnvironmentsCertificatesClientCreateOrUpdateResponse, error) { - result := ConnectedEnvironmentsCertificatesClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Certificate); err != nil { - return ConnectedEnvironmentsCertificatesClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Deletes the specified Certificate. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - connectedEnvironmentName - Name of the Connected Environment. -// - certificateName - Name of the Certificate. -// - options - ConnectedEnvironmentsCertificatesClientDeleteOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.Delete -// method. -func (client *ConnectedEnvironmentsCertificatesClient) Delete(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, certificateName string, options *ConnectedEnvironmentsCertificatesClientDeleteOptions) (ConnectedEnvironmentsCertificatesClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, certificateName, options) - if err != nil { - return ConnectedEnvironmentsCertificatesClientDeleteResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ConnectedEnvironmentsCertificatesClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ConnectedEnvironmentsCertificatesClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return ConnectedEnvironmentsCertificatesClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ConnectedEnvironmentsCertificatesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, certificateName string, options *ConnectedEnvironmentsCertificatesClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}" - 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 connectedEnvironmentName == "" { - return nil, errors.New("parameter connectedEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectedEnvironmentName}", url.PathEscape(connectedEnvironmentName)) - if certificateName == "" { - return nil, errors.New("parameter certificateName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{certificateName}", url.PathEscape(certificateName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the specified Certificate. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - connectedEnvironmentName - Name of the Connected Environment. -// - certificateName - Name of the Certificate. -// - options - ConnectedEnvironmentsCertificatesClientGetOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.Get -// method. -func (client *ConnectedEnvironmentsCertificatesClient) Get(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, certificateName string, options *ConnectedEnvironmentsCertificatesClientGetOptions) (ConnectedEnvironmentsCertificatesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, certificateName, options) - if err != nil { - return ConnectedEnvironmentsCertificatesClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ConnectedEnvironmentsCertificatesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsCertificatesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ConnectedEnvironmentsCertificatesClient) getCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, certificateName string, options *ConnectedEnvironmentsCertificatesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}" - 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 connectedEnvironmentName == "" { - return nil, errors.New("parameter connectedEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectedEnvironmentName}", url.PathEscape(connectedEnvironmentName)) - if certificateName == "" { - return nil, errors.New("parameter certificateName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{certificateName}", url.PathEscape(certificateName)) - 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", "2022-06-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 *ConnectedEnvironmentsCertificatesClient) getHandleResponse(resp *http.Response) (ConnectedEnvironmentsCertificatesClientGetResponse, error) { - result := ConnectedEnvironmentsCertificatesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Certificate); err != nil { - return ConnectedEnvironmentsCertificatesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Get the Certificates in a given connected environment. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - connectedEnvironmentName - Name of the Connected Environment. -// - options - ConnectedEnvironmentsCertificatesClientListOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.NewListPager -// method. -func (client *ConnectedEnvironmentsCertificatesClient) NewListPager(resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsCertificatesClientListOptions) *runtime.Pager[ConnectedEnvironmentsCertificatesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ConnectedEnvironmentsCertificatesClientListResponse]{ - More: func(page ConnectedEnvironmentsCertificatesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ConnectedEnvironmentsCertificatesClientListResponse) (ConnectedEnvironmentsCertificatesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ConnectedEnvironmentsCertificatesClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ConnectedEnvironmentsCertificatesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsCertificatesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ConnectedEnvironmentsCertificatesClient) listCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsCertificatesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates" - 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 connectedEnvironmentName == "" { - return nil, errors.New("parameter connectedEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectedEnvironmentName}", url.PathEscape(connectedEnvironmentName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ConnectedEnvironmentsCertificatesClient) listHandleResponse(resp *http.Response) (ConnectedEnvironmentsCertificatesClientListResponse, error) { - result := ConnectedEnvironmentsCertificatesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CertificateCollection); err != nil { - return ConnectedEnvironmentsCertificatesClientListResponse{}, err - } - return result, nil -} - -// Update - Patches a certificate. Currently only patching of tags is supported -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - connectedEnvironmentName - Name of the Connected Environment. -// - certificateName - Name of the Certificate. -// - certificateEnvelope - Properties of a certificate that need to be updated -// - options - ConnectedEnvironmentsCertificatesClientUpdateOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.Update -// method. -func (client *ConnectedEnvironmentsCertificatesClient) Update(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, certificateName string, certificateEnvelope CertificatePatch, options *ConnectedEnvironmentsCertificatesClientUpdateOptions) (ConnectedEnvironmentsCertificatesClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, options) - if err != nil { - return ConnectedEnvironmentsCertificatesClientUpdateResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ConnectedEnvironmentsCertificatesClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsCertificatesClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *ConnectedEnvironmentsCertificatesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, certificateName string, certificateEnvelope CertificatePatch, options *ConnectedEnvironmentsCertificatesClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}" - 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 connectedEnvironmentName == "" { - return nil, errors.New("parameter connectedEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectedEnvironmentName}", url.PathEscape(connectedEnvironmentName)) - if certificateName == "" { - return nil, errors.New("parameter certificateName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{certificateName}", url.PathEscape(certificateName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, certificateEnvelope) -} - -// updateHandleResponse handles the Update response. -func (client *ConnectedEnvironmentsCertificatesClient) updateHandleResponse(resp *http.Response) (ConnectedEnvironmentsCertificatesClientUpdateResponse, error) { - result := ConnectedEnvironmentsCertificatesClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Certificate); err != nil { - return ConnectedEnvironmentsCertificatesClientUpdateResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentscertificates_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentscertificates_client_example_test.go deleted file mode 100644 index aca47f569b3d..000000000000 --- a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentscertificates_client_example_test.go +++ /dev/null @@ -1,223 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappcontainers_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json -func ExampleConnectedEnvironmentsCertificatesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewConnectedEnvironmentsCertificatesClient().NewListPager("examplerg", "testcontainerenv", 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.CertificateCollection = armappcontainers.CertificateCollection{ - // Value: []*armappcontainers.Certificate{ - // { - // Name: to.Ptr("certificate-firendly-name"), - // Type: to.Ptr("Microsoft.App/ConnectedEnvironments/Certificates"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/connectedEnvironments/testcontainerenv/certificate-firendly-name"), - // Location: to.Ptr("East US"), - // Properties: &armappcontainers.CertificateProperties{ - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-06T04:00:00Z"); return t}()), - // IssueDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-06T04:00:00Z"); return t}()), - // Issuer: to.Ptr("Issuer Name"), - // ProvisioningState: to.Ptr(armappcontainers.CertificateProvisioningStateSucceeded), - // SubjectAlternativeNames: []*string{ - // to.Ptr("CN=my-subject-name.com")}, - // SubjectName: to.Ptr("my-subject-name.company.country.net"), - // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), - // Valid: to.Ptr(true), - // }, - // }, - // { - // Name: to.Ptr("certificate-firendly-name"), - // Type: to.Ptr("Microsoft.App/ConnectedEnvironments/Certificates"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/connectedEnvironments/testcontainerenv/certificate-firendly-name"), - // Location: to.Ptr("East US"), - // Properties: &armappcontainers.CertificateProperties{ - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-06T04:00:00Z"); return t}()), - // IssueDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-06T04:00:00Z"); return t}()), - // Issuer: to.Ptr("Issuer Name"), - // ProvisioningState: to.Ptr(armappcontainers.CertificateProvisioningStateSucceeded), - // SubjectAlternativeNames: []*string{ - // to.Ptr("CN=my-subject-name.com")}, - // SubjectName: to.Ptr("my-subject-name.company.country.net"), - // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), - // Valid: to.Ptr(true), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json -func ExampleConnectedEnvironmentsCertificatesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewConnectedEnvironmentsCertificatesClient().Get(ctx, "examplerg", "testcontainerenv", "certificate-firendly-name", 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.Certificate = armappcontainers.Certificate{ - // Name: to.Ptr("certificate-firendly-name"), - // Type: to.Ptr("Microsoft.App/ConnectedEnvironments/Certificates"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/connectedEnvironments/testcontainerenv/certificate-firendly-name"), - // Location: to.Ptr("East US"), - // Properties: &armappcontainers.CertificateProperties{ - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-06T04:00:00Z"); return t}()), - // IssueDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-06T04:00:00Z"); return t}()), - // Issuer: to.Ptr("Issuer Name"), - // ProvisioningState: to.Ptr(armappcontainers.CertificateProvisioningStateSucceeded), - // SubjectAlternativeNames: []*string{ - // to.Ptr("CN=my-subject-name.com")}, - // SubjectName: to.Ptr("my-subject-name.company.country.net"), - // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), - // Valid: to.Ptr(true), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json -func ExampleConnectedEnvironmentsCertificatesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewConnectedEnvironmentsCertificatesClient().CreateOrUpdate(ctx, "examplerg", "testcontainerenv", "certificate-firendly-name", &armappcontainers.ConnectedEnvironmentsCertificatesClientCreateOrUpdateOptions{CertificateEnvelope: &armappcontainers.Certificate{ - Location: to.Ptr("East US"), - Properties: &armappcontainers.CertificateProperties{ - Password: to.Ptr("private key password"), - Value: []byte("PFX-or-PEM-blob"), - }, - }, - }) - 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.Certificate = armappcontainers.Certificate{ - // Type: to.Ptr("Microsoft.App/ConnectedEnvironments/Certificates"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/connectedEnvironments/testcontainerenv/certificate-firendly-name"), - // Location: to.Ptr("East US"), - // Properties: &armappcontainers.CertificateProperties{ - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-06T04:00:00Z"); return t}()), - // IssueDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-06T04:00:00Z"); return t}()), - // Issuer: to.Ptr("Issuer Name"), - // ProvisioningState: to.Ptr(armappcontainers.CertificateProvisioningStateSucceeded), - // SubjectAlternativeNames: []*string{ - // to.Ptr("CN=my-subject-name.com")}, - // SubjectName: to.Ptr("my-subject-name.company.country.net"), - // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), - // Valid: to.Ptr(true), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json -func ExampleConnectedEnvironmentsCertificatesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewConnectedEnvironmentsCertificatesClient().Delete(ctx, "examplerg", "testcontainerenv", "certificate-firendly-name", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json -func ExampleConnectedEnvironmentsCertificatesClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewConnectedEnvironmentsCertificatesClient().Update(ctx, "examplerg", "testcontainerenv", "certificate-firendly-name", armappcontainers.CertificatePatch{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, 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.Certificate = armappcontainers.Certificate{ - // Type: to.Ptr("Microsoft.App/ConnectedEnvironments/Certificates"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/connectedEnvironments/testcontainerenv/certificate-firendly-name"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // "tag1": to.Ptr("value1"), - // "tag2": to.Ptr("value2"), - // }, - // Properties: &armappcontainers.CertificateProperties{ - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-06T04:00:00Z"); return t}()), - // IssueDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-06T04:00:00Z"); return t}()), - // Issuer: to.Ptr("Issuer Name"), - // ProvisioningState: to.Ptr(armappcontainers.CertificateProvisioningStateSucceeded), - // SubjectAlternativeNames: []*string{ - // to.Ptr("CN=my-subject-name.com")}, - // SubjectName: to.Ptr("my-subject-name.company.country.net"), - // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), - // Valid: to.Ptr(true), - // }, - // } -} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsdaprcomponents_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsdaprcomponents_client.go deleted file mode 100644 index 9ec3e2877475..000000000000 --- a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsdaprcomponents_client.go +++ /dev/null @@ -1,359 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappcontainers - -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" -) - -// ConnectedEnvironmentsDaprComponentsClient contains the methods for the ConnectedEnvironmentsDaprComponents group. -// Don't use this type directly, use NewConnectedEnvironmentsDaprComponentsClient() instead. -type ConnectedEnvironmentsDaprComponentsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewConnectedEnvironmentsDaprComponentsClient creates a new instance of ConnectedEnvironmentsDaprComponentsClient with the specified values. -// - subscriptionID - The ID of the target subscription. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewConnectedEnvironmentsDaprComponentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectedEnvironmentsDaprComponentsClient, error) { - cl, err := arm.NewClient(moduleName+".ConnectedEnvironmentsDaprComponentsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &ConnectedEnvironmentsDaprComponentsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// CreateOrUpdate - Creates or updates a Dapr Component in a connected environment. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - connectedEnvironmentName - Name of the connected environment. -// - componentName - Name of the Dapr Component. -// - daprComponentEnvelope - Configuration details of the Dapr Component. -// - options - ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.CreateOrUpdate -// method. -func (client *ConnectedEnvironmentsDaprComponentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, componentName string, daprComponentEnvelope DaprComponent, options *ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateOptions) (ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope, options) - if err != nil { - return ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ConnectedEnvironmentsDaprComponentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, componentName string, daprComponentEnvelope DaprComponent, options *ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}" - 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 connectedEnvironmentName == "" { - return nil, errors.New("parameter connectedEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectedEnvironmentName}", url.PathEscape(connectedEnvironmentName)) - if componentName == "" { - return nil, errors.New("parameter componentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, daprComponentEnvelope) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *ConnectedEnvironmentsDaprComponentsClient) createOrUpdateHandleResponse(resp *http.Response) (ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateResponse, error) { - result := ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DaprComponent); err != nil { - return ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Delete a Dapr Component from a connected environment. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - connectedEnvironmentName - Name of the connected environment. -// - componentName - Name of the Dapr Component. -// - options - ConnectedEnvironmentsDaprComponentsClientDeleteOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.Delete -// method. -func (client *ConnectedEnvironmentsDaprComponentsClient) Delete(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, componentName string, options *ConnectedEnvironmentsDaprComponentsClientDeleteOptions) (ConnectedEnvironmentsDaprComponentsClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, componentName, options) - if err != nil { - return ConnectedEnvironmentsDaprComponentsClientDeleteResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ConnectedEnvironmentsDaprComponentsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ConnectedEnvironmentsDaprComponentsClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return ConnectedEnvironmentsDaprComponentsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ConnectedEnvironmentsDaprComponentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, componentName string, options *ConnectedEnvironmentsDaprComponentsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}" - 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 connectedEnvironmentName == "" { - return nil, errors.New("parameter connectedEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectedEnvironmentName}", url.PathEscape(connectedEnvironmentName)) - if componentName == "" { - return nil, errors.New("parameter componentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get a dapr component. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - connectedEnvironmentName - Name of the connected environment. -// - componentName - Name of the Dapr Component. -// - options - ConnectedEnvironmentsDaprComponentsClientGetOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.Get -// method. -func (client *ConnectedEnvironmentsDaprComponentsClient) Get(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, componentName string, options *ConnectedEnvironmentsDaprComponentsClientGetOptions) (ConnectedEnvironmentsDaprComponentsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, componentName, options) - if err != nil { - return ConnectedEnvironmentsDaprComponentsClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ConnectedEnvironmentsDaprComponentsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsDaprComponentsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ConnectedEnvironmentsDaprComponentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, componentName string, options *ConnectedEnvironmentsDaprComponentsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}" - 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 connectedEnvironmentName == "" { - return nil, errors.New("parameter connectedEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectedEnvironmentName}", url.PathEscape(connectedEnvironmentName)) - if componentName == "" { - return nil, errors.New("parameter componentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) - 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", "2022-06-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 *ConnectedEnvironmentsDaprComponentsClient) getHandleResponse(resp *http.Response) (ConnectedEnvironmentsDaprComponentsClientGetResponse, error) { - result := ConnectedEnvironmentsDaprComponentsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DaprComponent); err != nil { - return ConnectedEnvironmentsDaprComponentsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Get the Dapr Components for a connected environment. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - connectedEnvironmentName - Name of the connected environment. -// - options - ConnectedEnvironmentsDaprComponentsClientListOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.NewListPager -// method. -func (client *ConnectedEnvironmentsDaprComponentsClient) NewListPager(resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsDaprComponentsClientListOptions) *runtime.Pager[ConnectedEnvironmentsDaprComponentsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ConnectedEnvironmentsDaprComponentsClientListResponse]{ - More: func(page ConnectedEnvironmentsDaprComponentsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ConnectedEnvironmentsDaprComponentsClientListResponse) (ConnectedEnvironmentsDaprComponentsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ConnectedEnvironmentsDaprComponentsClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ConnectedEnvironmentsDaprComponentsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsDaprComponentsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ConnectedEnvironmentsDaprComponentsClient) listCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsDaprComponentsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents" - 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 connectedEnvironmentName == "" { - return nil, errors.New("parameter connectedEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectedEnvironmentName}", url.PathEscape(connectedEnvironmentName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ConnectedEnvironmentsDaprComponentsClient) listHandleResponse(resp *http.Response) (ConnectedEnvironmentsDaprComponentsClientListResponse, error) { - result := ConnectedEnvironmentsDaprComponentsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DaprComponentsCollection); err != nil { - return ConnectedEnvironmentsDaprComponentsClientListResponse{}, err - } - return result, nil -} - -// ListSecrets - List secrets for a dapr component -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - connectedEnvironmentName - Name of the connected environment. -// - componentName - Name of the Dapr Component. -// - options - ConnectedEnvironmentsDaprComponentsClientListSecretsOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.ListSecrets -// method. -func (client *ConnectedEnvironmentsDaprComponentsClient) ListSecrets(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, componentName string, options *ConnectedEnvironmentsDaprComponentsClientListSecretsOptions) (ConnectedEnvironmentsDaprComponentsClientListSecretsResponse, error) { - req, err := client.listSecretsCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, componentName, options) - if err != nil { - return ConnectedEnvironmentsDaprComponentsClientListSecretsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ConnectedEnvironmentsDaprComponentsClientListSecretsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsDaprComponentsClientListSecretsResponse{}, runtime.NewResponseError(resp) - } - return client.listSecretsHandleResponse(resp) -} - -// listSecretsCreateRequest creates the ListSecrets request. -func (client *ConnectedEnvironmentsDaprComponentsClient) listSecretsCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, componentName string, options *ConnectedEnvironmentsDaprComponentsClientListSecretsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}/listSecrets" - 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 connectedEnvironmentName == "" { - return nil, errors.New("parameter connectedEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectedEnvironmentName}", url.PathEscape(connectedEnvironmentName)) - if componentName == "" { - return nil, errors.New("parameter componentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSecretsHandleResponse handles the ListSecrets response. -func (client *ConnectedEnvironmentsDaprComponentsClient) listSecretsHandleResponse(resp *http.Response) (ConnectedEnvironmentsDaprComponentsClientListSecretsResponse, error) { - result := ConnectedEnvironmentsDaprComponentsClientListSecretsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DaprSecretsCollection); err != nil { - return ConnectedEnvironmentsDaprComponentsClientListSecretsResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsdaprcomponents_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsdaprcomponents_client_example_test.go deleted file mode 100644 index 4ee95be2f38e..000000000000 --- a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsdaprcomponents_client_example_test.go +++ /dev/null @@ -1,272 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappcontainers_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json -func ExampleConnectedEnvironmentsDaprComponentsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewConnectedEnvironmentsDaprComponentsClient().NewListPager("examplerg", "myenvironment", 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.DaprComponentsCollection = armappcontainers.DaprComponentsCollection{ - // Value: []*armappcontainers.DaprComponent{ - // { - // Name: to.Ptr("reddog"), - // Type: to.Ptr("Microsoft.App/connectedEnvironments/daprcomponents"), - // ID: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/connectedEnvironments/myenvironment/daprcomponents/reddog"), - // Properties: &armappcontainers.DaprComponentProperties{ - // ComponentType: to.Ptr("state.azure.cosmosdb"), - // IgnoreErrors: to.Ptr(false), - // InitTimeout: to.Ptr("50s"), - // Metadata: []*armappcontainers.DaprMetadata{ - // { - // Name: to.Ptr("url"), - // Value: to.Ptr(""), - // }, - // { - // Name: to.Ptr("database"), - // Value: to.Ptr("itemsDB"), - // }, - // { - // Name: to.Ptr("collection"), - // Value: to.Ptr("items"), - // }, - // { - // Name: to.Ptr("masterkey"), - // SecretRef: to.Ptr("masterkey"), - // }}, - // Scopes: []*string{ - // to.Ptr("container-app-1"), - // to.Ptr("container-app-2")}, - // Secrets: []*armappcontainers.Secret{ - // { - // Name: to.Ptr("masterkey"), - // }}, - // Version: to.Ptr("v1"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json -func ExampleConnectedEnvironmentsDaprComponentsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewConnectedEnvironmentsDaprComponentsClient().Get(ctx, "examplerg", "myenvironment", "reddog", 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.DaprComponent = armappcontainers.DaprComponent{ - // Name: to.Ptr("reddog"), - // Type: to.Ptr("Microsoft.App/connectedEnvironments/daprcomponents"), - // ID: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/connectedEnvironments/jlaw-demo1/daprcomponents/reddog"), - // Properties: &armappcontainers.DaprComponentProperties{ - // ComponentType: to.Ptr("state.azure.cosmosdb"), - // IgnoreErrors: to.Ptr(false), - // InitTimeout: to.Ptr("50s"), - // Metadata: []*armappcontainers.DaprMetadata{ - // { - // Name: to.Ptr("url"), - // Value: to.Ptr(""), - // }, - // { - // Name: to.Ptr("database"), - // Value: to.Ptr("itemsDB"), - // }, - // { - // Name: to.Ptr("collection"), - // Value: to.Ptr("items"), - // }, - // { - // Name: to.Ptr("masterkey"), - // SecretRef: to.Ptr("masterkey"), - // }}, - // Scopes: []*string{ - // to.Ptr("container-app-1"), - // to.Ptr("container-app-2")}, - // Secrets: []*armappcontainers.Secret{ - // { - // Name: to.Ptr("masterkey"), - // }}, - // Version: to.Ptr("v1"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json -func ExampleConnectedEnvironmentsDaprComponentsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewConnectedEnvironmentsDaprComponentsClient().CreateOrUpdate(ctx, "examplerg", "myenvironment", "reddog", armappcontainers.DaprComponent{ - Properties: &armappcontainers.DaprComponentProperties{ - ComponentType: to.Ptr("state.azure.cosmosdb"), - IgnoreErrors: to.Ptr(false), - InitTimeout: to.Ptr("50s"), - Metadata: []*armappcontainers.DaprMetadata{ - { - Name: to.Ptr("url"), - Value: to.Ptr(""), - }, - { - Name: to.Ptr("database"), - Value: to.Ptr("itemsDB"), - }, - { - Name: to.Ptr("collection"), - Value: to.Ptr("items"), - }, - { - Name: to.Ptr("masterkey"), - SecretRef: to.Ptr("masterkey"), - }}, - Scopes: []*string{ - to.Ptr("container-app-1"), - to.Ptr("container-app-2")}, - Secrets: []*armappcontainers.Secret{ - { - Name: to.Ptr("masterkey"), - Value: to.Ptr("keyvalue"), - }}, - Version: to.Ptr("v1"), - }, - }, 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.DaprComponent = armappcontainers.DaprComponent{ - // Name: to.Ptr("reddog"), - // Type: to.Ptr("Microsoft.App/connectedEnvironments/daprcomponents"), - // ID: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/connectedEnvironments/jlaw-demo1/daprcomponents/reddog"), - // Properties: &armappcontainers.DaprComponentProperties{ - // ComponentType: to.Ptr("state.azure.cosmosdb"), - // IgnoreErrors: to.Ptr(false), - // InitTimeout: to.Ptr("50s"), - // Metadata: []*armappcontainers.DaprMetadata{ - // { - // Name: to.Ptr("url"), - // Value: to.Ptr(""), - // }, - // { - // Name: to.Ptr("database"), - // Value: to.Ptr("itemsDB"), - // }, - // { - // Name: to.Ptr("collection"), - // Value: to.Ptr("items"), - // }, - // { - // Name: to.Ptr("masterkey"), - // SecretRef: to.Ptr("masterkey"), - // }}, - // Scopes: []*string{ - // to.Ptr("container-app-1"), - // to.Ptr("container-app-2")}, - // Secrets: []*armappcontainers.Secret{ - // { - // Name: to.Ptr("masterkey"), - // }}, - // Version: to.Ptr("v1"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json -func ExampleConnectedEnvironmentsDaprComponentsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewConnectedEnvironmentsDaprComponentsClient().Delete(ctx, "examplerg", "myenvironment", "reddog", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json -func ExampleConnectedEnvironmentsDaprComponentsClient_ListSecrets() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewConnectedEnvironmentsDaprComponentsClient().ListSecrets(ctx, "examplerg", "myenvironment", "reddog", 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.DaprSecretsCollection = armappcontainers.DaprSecretsCollection{ - // Value: []*armappcontainers.Secret{ - // { - // Name: to.Ptr("secret1"), - // Value: to.Ptr("value1"), - // }, - // { - // Name: to.Ptr("secret2"), - // Value: to.Ptr("value2"), - // }}, - // } -} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsstorages_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsstorages_client.go deleted file mode 100644 index b542641a2fe9..000000000000 --- a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsstorages_client.go +++ /dev/null @@ -1,284 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappcontainers - -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" -) - -// ConnectedEnvironmentsStoragesClient contains the methods for the ConnectedEnvironmentsStorages group. -// Don't use this type directly, use NewConnectedEnvironmentsStoragesClient() instead. -type ConnectedEnvironmentsStoragesClient struct { - internal *arm.Client - subscriptionID string -} - -// NewConnectedEnvironmentsStoragesClient creates a new instance of ConnectedEnvironmentsStoragesClient with the specified values. -// - subscriptionID - The ID of the target subscription. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewConnectedEnvironmentsStoragesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectedEnvironmentsStoragesClient, error) { - cl, err := arm.NewClient(moduleName+".ConnectedEnvironmentsStoragesClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &ConnectedEnvironmentsStoragesClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// CreateOrUpdate - Create or update storage for a connectedEnvironment. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - connectedEnvironmentName - Name of the Environment. -// - storageName - Name of the storage. -// - storageEnvelope - Configuration details of storage. -// - options - ConnectedEnvironmentsStoragesClientCreateOrUpdateOptions contains the optional parameters for the ConnectedEnvironmentsStoragesClient.CreateOrUpdate -// method. -func (client *ConnectedEnvironmentsStoragesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, storageName string, storageEnvelope ConnectedEnvironmentStorage, options *ConnectedEnvironmentsStoragesClientCreateOrUpdateOptions) (ConnectedEnvironmentsStoragesClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, storageName, storageEnvelope, options) - if err != nil { - return ConnectedEnvironmentsStoragesClientCreateOrUpdateResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ConnectedEnvironmentsStoragesClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsStoragesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ConnectedEnvironmentsStoragesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, storageName string, storageEnvelope ConnectedEnvironmentStorage, options *ConnectedEnvironmentsStoragesClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}" - 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 connectedEnvironmentName == "" { - return nil, errors.New("parameter connectedEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectedEnvironmentName}", url.PathEscape(connectedEnvironmentName)) - if storageName == "" { - return nil, errors.New("parameter storageName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageName}", url.PathEscape(storageName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, storageEnvelope) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *ConnectedEnvironmentsStoragesClient) createOrUpdateHandleResponse(resp *http.Response) (ConnectedEnvironmentsStoragesClientCreateOrUpdateResponse, error) { - result := ConnectedEnvironmentsStoragesClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ConnectedEnvironmentStorage); err != nil { - return ConnectedEnvironmentsStoragesClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Delete storage for a connectedEnvironment. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - connectedEnvironmentName - Name of the Environment. -// - storageName - Name of the storage. -// - options - ConnectedEnvironmentsStoragesClientDeleteOptions contains the optional parameters for the ConnectedEnvironmentsStoragesClient.Delete -// method. -func (client *ConnectedEnvironmentsStoragesClient) Delete(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, storageName string, options *ConnectedEnvironmentsStoragesClientDeleteOptions) (ConnectedEnvironmentsStoragesClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, storageName, options) - if err != nil { - return ConnectedEnvironmentsStoragesClientDeleteResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ConnectedEnvironmentsStoragesClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ConnectedEnvironmentsStoragesClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return ConnectedEnvironmentsStoragesClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ConnectedEnvironmentsStoragesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, storageName string, options *ConnectedEnvironmentsStoragesClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}" - 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 connectedEnvironmentName == "" { - return nil, errors.New("parameter connectedEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectedEnvironmentName}", url.PathEscape(connectedEnvironmentName)) - if storageName == "" { - return nil, errors.New("parameter storageName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageName}", url.PathEscape(storageName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get storage for a connectedEnvironment. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - connectedEnvironmentName - Name of the Environment. -// - storageName - Name of the storage. -// - options - ConnectedEnvironmentsStoragesClientGetOptions contains the optional parameters for the ConnectedEnvironmentsStoragesClient.Get -// method. -func (client *ConnectedEnvironmentsStoragesClient) Get(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, storageName string, options *ConnectedEnvironmentsStoragesClientGetOptions) (ConnectedEnvironmentsStoragesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, storageName, options) - if err != nil { - return ConnectedEnvironmentsStoragesClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ConnectedEnvironmentsStoragesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsStoragesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ConnectedEnvironmentsStoragesClient) getCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, storageName string, options *ConnectedEnvironmentsStoragesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}" - 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 connectedEnvironmentName == "" { - return nil, errors.New("parameter connectedEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectedEnvironmentName}", url.PathEscape(connectedEnvironmentName)) - if storageName == "" { - return nil, errors.New("parameter storageName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageName}", url.PathEscape(storageName)) - 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", "2022-06-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 *ConnectedEnvironmentsStoragesClient) getHandleResponse(resp *http.Response) (ConnectedEnvironmentsStoragesClientGetResponse, error) { - result := ConnectedEnvironmentsStoragesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ConnectedEnvironmentStorage); err != nil { - return ConnectedEnvironmentsStoragesClientGetResponse{}, err - } - return result, nil -} - -// List - Get all storages for a connectedEnvironment. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - connectedEnvironmentName - Name of the Environment. -// - options - ConnectedEnvironmentsStoragesClientListOptions contains the optional parameters for the ConnectedEnvironmentsStoragesClient.List -// method. -func (client *ConnectedEnvironmentsStoragesClient) List(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsStoragesClientListOptions) (ConnectedEnvironmentsStoragesClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, options) - if err != nil { - return ConnectedEnvironmentsStoragesClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ConnectedEnvironmentsStoragesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsStoragesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) -} - -// listCreateRequest creates the List request. -func (client *ConnectedEnvironmentsStoragesClient) listCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsStoragesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages" - 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 connectedEnvironmentName == "" { - return nil, errors.New("parameter connectedEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectedEnvironmentName}", url.PathEscape(connectedEnvironmentName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ConnectedEnvironmentsStoragesClient) listHandleResponse(resp *http.Response) (ConnectedEnvironmentsStoragesClientListResponse, error) { - result := ConnectedEnvironmentsStoragesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ConnectedEnvironmentStoragesCollection); err != nil { - return ConnectedEnvironmentsStoragesClientListResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsstorages_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsstorages_client_example_test.go deleted file mode 100644 index 4b152acde6bf..000000000000 --- a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsstorages_client_example_test.go +++ /dev/null @@ -1,144 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappcontainers_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_List.json -func ExampleConnectedEnvironmentsStoragesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewConnectedEnvironmentsStoragesClient().List(ctx, "examplerg", "managedEnv", 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.ConnectedEnvironmentStoragesCollection = armappcontainers.ConnectedEnvironmentStoragesCollection{ - // Value: []*armappcontainers.ConnectedEnvironmentStorage{ - // { - // Name: to.Ptr("jlaw-demo1"), - // Type: to.Ptr("Microsoft.App/connectedEnvironments/storages"), - // ID: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/connectedEnvironments/managedEnv/storages/jlaw-demo1"), - // Properties: &armappcontainers.ConnectedEnvironmentStorageProperties{ - // AzureFile: &armappcontainers.AzureFileProperties{ - // AccessMode: to.Ptr(armappcontainers.AccessModeReadOnly), - // AccountName: to.Ptr("account1"), - // ShareName: to.Ptr("share1"), - // }, - // }, - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Get.json -func ExampleConnectedEnvironmentsStoragesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewConnectedEnvironmentsStoragesClient().Get(ctx, "examplerg", "env", "jlaw-demo1", 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.ConnectedEnvironmentStorage = armappcontainers.ConnectedEnvironmentStorage{ - // Name: to.Ptr("jlaw-demo1"), - // Type: to.Ptr("Microsoft.App/connectedEnvironments/storages"), - // ID: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/connectedEnvironments/env/storages/jlaw-demo1"), - // Properties: &armappcontainers.ConnectedEnvironmentStorageProperties{ - // AzureFile: &armappcontainers.AzureFileProperties{ - // AccessMode: to.Ptr(armappcontainers.AccessModeReadOnly), - // AccountName: to.Ptr("account1"), - // ShareName: to.Ptr("share1"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json -func ExampleConnectedEnvironmentsStoragesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewConnectedEnvironmentsStoragesClient().CreateOrUpdate(ctx, "examplerg", "env", "jlaw-demo1", armappcontainers.ConnectedEnvironmentStorage{ - Properties: &armappcontainers.ConnectedEnvironmentStorageProperties{ - AzureFile: &armappcontainers.AzureFileProperties{ - AccessMode: to.Ptr(armappcontainers.AccessModeReadOnly), - AccountKey: to.Ptr("key"), - AccountName: to.Ptr("account1"), - ShareName: to.Ptr("share1"), - }, - }, - }, 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.ConnectedEnvironmentStorage = armappcontainers.ConnectedEnvironmentStorage{ - // Name: to.Ptr("jlaw-demo1"), - // Type: to.Ptr("Microsoft.App/connectedEnvironments/storages"), - // ID: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/connectedEnvironments/env/storages/jlaw-demo1"), - // Properties: &armappcontainers.ConnectedEnvironmentStorageProperties{ - // AzureFile: &armappcontainers.AzureFileProperties{ - // AccessMode: to.Ptr(armappcontainers.AccessModeReadOnly), - // AccountName: to.Ptr("account1"), - // ShareName: to.Ptr("share1"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json -func ExampleConnectedEnvironmentsStoragesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewConnectedEnvironmentsStoragesClient().Delete(ctx, "examplerg", "env", "jlaw-demo1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/constants.go b/sdk/resourcemanager/appcontainers/armappcontainers/constants.go index 0e3410256b84..fa54cf132557 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/constants.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/constants.go @@ -11,7 +11,7 @@ package armappcontainers const ( moduleName = "armappcontainers" - moduleVersion = "v2.0.0-beta.2" + moduleVersion = "v1.1.0" ) // AccessMode - Access mode for storage @@ -30,22 +30,6 @@ func PossibleAccessModeValues() []AccessMode { } } -// Action - Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL Allow or ALL Deny -type Action string - -const ( - ActionAllow Action = "Allow" - ActionDeny Action = "Deny" -) - -// PossibleActionValues returns the possible values for the Action const type. -func PossibleActionValues() []Action { - return []Action{ - ActionAllow, - ActionDeny, - } -} - // ActiveRevisionsMode - ActiveRevisionsMode controls how active revisions are handled for the Container app:Multiple: multiple // revisions can be active.Single: Only one revision can be active at a time. Revision weights can // not be used in this mode. If no value if provided, this is the default. @@ -80,22 +64,6 @@ func PossibleAppProtocolValues() []AppProtocol { } } -// Applicability - indicates whether the profile is default for the location. -type Applicability string - -const ( - ApplicabilityCustom Applicability = "Custom" - ApplicabilityLocationDefault Applicability = "LocationDefault" -) - -// PossibleApplicabilityValues returns the possible values for the Applicability const type. -func PossibleApplicabilityValues() []Applicability { - return []Applicability{ - ApplicabilityCustom, - ApplicabilityLocationDefault, - } -} - // BindingType - Custom Domain binding type. type BindingType string @@ -112,24 +80,6 @@ func PossibleBindingTypeValues() []BindingType { } } -// Category - Used to map workload profile types to billing meter. -type Category string - -const ( - CategoryPremiumSKUComputeOptimized Category = "PremiumSkuComputeOptimized" - CategoryPremiumSKUGeneralPurpose Category = "PremiumSkuGeneralPurpose" - CategoryPremiumSKUMemoryOptimized Category = "PremiumSkuMemoryOptimized" -) - -// PossibleCategoryValues returns the possible values for the Category const type. -func PossibleCategoryValues() []Category { - return []Category{ - CategoryPremiumSKUComputeOptimized, - CategoryPremiumSKUGeneralPurpose, - CategoryPremiumSKUMemoryOptimized, - } -} - // CertificateProvisioningState - Provisioning state of the certificate. type CertificateProvisioningState string @@ -168,40 +118,11 @@ func PossibleCheckNameAvailabilityReasonValues() []CheckNameAvailabilityReason { } } -// ConnectedEnvironmentProvisioningState - Provisioning state of the Kubernetes Environment. -type ConnectedEnvironmentProvisioningState string - -const ( - ConnectedEnvironmentProvisioningStateCanceled ConnectedEnvironmentProvisioningState = "Canceled" - ConnectedEnvironmentProvisioningStateFailed ConnectedEnvironmentProvisioningState = "Failed" - ConnectedEnvironmentProvisioningStateInfrastructureSetupComplete ConnectedEnvironmentProvisioningState = "InfrastructureSetupComplete" - ConnectedEnvironmentProvisioningStateInfrastructureSetupInProgress ConnectedEnvironmentProvisioningState = "InfrastructureSetupInProgress" - ConnectedEnvironmentProvisioningStateInitializationInProgress ConnectedEnvironmentProvisioningState = "InitializationInProgress" - ConnectedEnvironmentProvisioningStateScheduledForDelete ConnectedEnvironmentProvisioningState = "ScheduledForDelete" - ConnectedEnvironmentProvisioningStateSucceeded ConnectedEnvironmentProvisioningState = "Succeeded" - ConnectedEnvironmentProvisioningStateWaiting ConnectedEnvironmentProvisioningState = "Waiting" -) - -// PossibleConnectedEnvironmentProvisioningStateValues returns the possible values for the ConnectedEnvironmentProvisioningState const type. -func PossibleConnectedEnvironmentProvisioningStateValues() []ConnectedEnvironmentProvisioningState { - return []ConnectedEnvironmentProvisioningState{ - ConnectedEnvironmentProvisioningStateCanceled, - ConnectedEnvironmentProvisioningStateFailed, - ConnectedEnvironmentProvisioningStateInfrastructureSetupComplete, - ConnectedEnvironmentProvisioningStateInfrastructureSetupInProgress, - ConnectedEnvironmentProvisioningStateInitializationInProgress, - ConnectedEnvironmentProvisioningStateScheduledForDelete, - ConnectedEnvironmentProvisioningStateSucceeded, - ConnectedEnvironmentProvisioningStateWaiting, - } -} - // ContainerAppProvisioningState - Provisioning state of the Container App. type ContainerAppProvisioningState string const ( ContainerAppProvisioningStateCanceled ContainerAppProvisioningState = "Canceled" - ContainerAppProvisioningStateDeleting ContainerAppProvisioningState = "Deleting" ContainerAppProvisioningStateFailed ContainerAppProvisioningState = "Failed" ContainerAppProvisioningStateInProgress ContainerAppProvisioningState = "InProgress" ContainerAppProvisioningStateSucceeded ContainerAppProvisioningState = "Succeeded" @@ -211,7 +132,6 @@ const ( func PossibleContainerAppProvisioningStateValues() []ContainerAppProvisioningState { return []ContainerAppProvisioningState{ ContainerAppProvisioningStateCanceled, - ContainerAppProvisioningStateDeleting, ContainerAppProvisioningStateFailed, ContainerAppProvisioningStateInProgress, ContainerAppProvisioningStateSucceeded, @@ -304,20 +224,6 @@ func PossibleEnvironmentProvisioningStateValues() []EnvironmentProvisioningState } } -// ExtendedLocationTypes - The type of extendedLocation. -type ExtendedLocationTypes string - -const ( - ExtendedLocationTypesCustomLocation ExtendedLocationTypes = "CustomLocation" -) - -// PossibleExtendedLocationTypesValues returns the possible values for the ExtendedLocationTypes const type. -func PossibleExtendedLocationTypesValues() []ExtendedLocationTypes { - return []ExtendedLocationTypes{ - ExtendedLocationTypesCustomLocation, - } -} - // ForwardProxyConvention - The convention used to determine the url of the request made. type ForwardProxyConvention string @@ -343,7 +249,6 @@ const ( IngressTransportMethodAuto IngressTransportMethod = "auto" IngressTransportMethodHTTP IngressTransportMethod = "http" IngressTransportMethodHTTP2 IngressTransportMethod = "http2" - IngressTransportMethodTCP IngressTransportMethod = "tcp" ) // PossibleIngressTransportMethodValues returns the possible values for the IngressTransportMethod const type. @@ -352,43 +257,6 @@ func PossibleIngressTransportMethodValues() []IngressTransportMethod { IngressTransportMethodAuto, IngressTransportMethodHTTP, IngressTransportMethodHTTP2, - IngressTransportMethodTCP, - } -} - -// LogLevel - Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. -type LogLevel string - -const ( - LogLevelDebug LogLevel = "debug" - LogLevelError LogLevel = "error" - LogLevelInfo LogLevel = "info" - LogLevelWarn LogLevel = "warn" -) - -// PossibleLogLevelValues returns the possible values for the LogLevel const type. -func PossibleLogLevelValues() []LogLevel { - return []LogLevel{ - LogLevelDebug, - LogLevelError, - LogLevelInfo, - LogLevelWarn, - } -} - -// ManagedEnvironmentOutBoundType - Outbound type for the cluster -type ManagedEnvironmentOutBoundType string - -const ( - ManagedEnvironmentOutBoundTypeLoadBalancer ManagedEnvironmentOutBoundType = "LoadBalancer" - ManagedEnvironmentOutBoundTypeUserDefinedRouting ManagedEnvironmentOutBoundType = "UserDefinedRouting" -) - -// PossibleManagedEnvironmentOutBoundTypeValues returns the possible values for the ManagedEnvironmentOutBoundType const type. -func PossibleManagedEnvironmentOutBoundTypeValues() []ManagedEnvironmentOutBoundType { - return []ManagedEnvironmentOutBoundType{ - ManagedEnvironmentOutBoundTypeLoadBalancer, - ManagedEnvironmentOutBoundTypeUserDefinedRouting, } } @@ -452,24 +320,6 @@ func PossibleRevisionProvisioningStateValues() []RevisionProvisioningState { } } -// SKUName - Name of the Sku. -type SKUName string - -const ( - // SKUNameConsumption - Consumption SKU of Managed Environment. - SKUNameConsumption SKUName = "Consumption" - // SKUNamePremium - Premium SKU of Managed Environment. - SKUNamePremium SKUName = "Premium" -) - -// PossibleSKUNameValues returns the possible values for the SKUName const type. -func PossibleSKUNameValues() []SKUName { - return []SKUName{ - SKUNameConsumption, - SKUNamePremium, - } -} - // Scheme - Scheme to use for connecting to the host. Defaults to HTTP. type Scheme string diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerapps_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerapps_client.go index fa9d08801611..60a06d461f17 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/containerapps_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/containerapps_client.go @@ -47,7 +47,7 @@ func NewContainerAppsClient(subscriptionID string, credential azcore.TokenCreden // BeginCreateOrUpdate - Create or update a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - containerAppEnvelope - Properties used to create a container app @@ -68,7 +68,7 @@ func (client *ContainerAppsClient) BeginCreateOrUpdate(ctx context.Context, reso // CreateOrUpdate - Create or update a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 func (client *ContainerAppsClient) createOrUpdate(ctx context.Context, resourceGroupName string, containerAppName string, containerAppEnvelope ContainerApp, options *ContainerAppsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, containerAppName, containerAppEnvelope, options) if err != nil { @@ -104,7 +104,7 @@ func (client *ContainerAppsClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, containerAppEnvelope) @@ -113,7 +113,7 @@ func (client *ContainerAppsClient) createOrUpdateCreateRequest(ctx context.Conte // BeginDelete - Delete a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsClientBeginDeleteOptions contains the optional parameters for the ContainerAppsClient.BeginDelete @@ -133,7 +133,7 @@ func (client *ContainerAppsClient) BeginDelete(ctx context.Context, resourceGrou // Delete - Delete a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 func (client *ContainerAppsClient) deleteOperation(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, containerAppName, options) if err != nil { @@ -169,7 +169,7 @@ func (client *ContainerAppsClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -178,7 +178,7 @@ func (client *ContainerAppsClient) deleteCreateRequest(ctx context.Context, reso // Get - Get the properties of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsClientGetOptions contains the optional parameters for the ContainerAppsClient.Get method. @@ -217,7 +217,7 @@ func (client *ContainerAppsClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -232,67 +232,9 @@ func (client *ContainerAppsClient) getHandleResponse(resp *http.Response) (Conta return result, nil } -// GetAuthToken - Get auth token for a container app -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - containerAppName - Name of the Container App. -// - options - ContainerAppsClientGetAuthTokenOptions contains the optional parameters for the ContainerAppsClient.GetAuthToken -// method. -func (client *ContainerAppsClient) GetAuthToken(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientGetAuthTokenOptions) (ContainerAppsClientGetAuthTokenResponse, error) { - req, err := client.getAuthTokenCreateRequest(ctx, resourceGroupName, containerAppName, options) - if err != nil { - return ContainerAppsClientGetAuthTokenResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ContainerAppsClientGetAuthTokenResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsClientGetAuthTokenResponse{}, runtime.NewResponseError(resp) - } - return client.getAuthTokenHandleResponse(resp) -} - -// getAuthTokenCreateRequest creates the GetAuthToken request. -func (client *ContainerAppsClient) getAuthTokenCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientGetAuthTokenOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/getAuthtoken" - 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 containerAppName == "" { - return nil, errors.New("parameter containerAppName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerAppName}", url.PathEscape(containerAppName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getAuthTokenHandleResponse handles the GetAuthToken response. -func (client *ContainerAppsClient) getAuthTokenHandleResponse(resp *http.Response) (ContainerAppsClientGetAuthTokenResponse, error) { - result := ContainerAppsClientGetAuthTokenResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ContainerAppAuthToken); err != nil { - return ContainerAppsClientGetAuthTokenResponse{}, err - } - return result, nil -} - // NewListByResourceGroupPager - Get the Container Apps in a given resource group. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - ContainerAppsClientListByResourceGroupOptions contains the optional parameters for the ContainerAppsClient.NewListByResourceGroupPager // method. @@ -340,7 +282,7 @@ func (client *ContainerAppsClient) listByResourceGroupCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -357,7 +299,7 @@ func (client *ContainerAppsClient) listByResourceGroupHandleResponse(resp *http. // NewListBySubscriptionPager - Get the Container Apps in a given subscription. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - options - ContainerAppsClientListBySubscriptionOptions contains the optional parameters for the ContainerAppsClient.NewListBySubscriptionPager // method. func (client *ContainerAppsClient) NewListBySubscriptionPager(options *ContainerAppsClientListBySubscriptionOptions) *runtime.Pager[ContainerAppsClientListBySubscriptionResponse] { @@ -400,7 +342,7 @@ func (client *ContainerAppsClient) listBySubscriptionCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -418,7 +360,7 @@ func (client *ContainerAppsClient) listBySubscriptionHandleResponse(resp *http.R // ListCustomHostNameAnalysis - Analyzes a custom hostname for a Container App // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsClientListCustomHostNameAnalysisOptions contains the optional parameters for the ContainerAppsClient.ListCustomHostNameAnalysis @@ -461,7 +403,7 @@ func (client *ContainerAppsClient) listCustomHostNameAnalysisCreateRequest(ctx c if options != nil && options.CustomHostname != nil { reqQP.Set("customHostname", *options.CustomHostname) } - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -479,7 +421,7 @@ func (client *ContainerAppsClient) listCustomHostNameAnalysisHandleResponse(resp // ListSecrets - List secrets for a container app // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsClientListSecretsOptions contains the optional parameters for the ContainerAppsClient.ListSecrets @@ -519,7 +461,7 @@ func (client *ContainerAppsClient) listSecretsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -537,7 +479,7 @@ func (client *ContainerAppsClient) listSecretsHandleResponse(resp *http.Response // BeginUpdate - Patches a Container App using JSON Merge Patch // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - containerAppEnvelope - Properties of a Container App that need to be updated @@ -558,7 +500,7 @@ func (client *ContainerAppsClient) BeginUpdate(ctx context.Context, resourceGrou // Update - Patches a Container App using JSON Merge Patch // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 func (client *ContainerAppsClient) update(ctx context.Context, resourceGroupName string, containerAppName string, containerAppEnvelope ContainerApp, options *ContainerAppsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, containerAppName, containerAppEnvelope, options) if err != nil { @@ -594,7 +536,7 @@ func (client *ContainerAppsClient) updateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, containerAppEnvelope) diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerapps_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerapps_client_example_test.go index 659afac6fe26..6f13420e1bc1 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/containerapps_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/containerapps_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/appcontainers/armappcontainers/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListBySubscription.json func ExampleContainerAppsClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -52,11 +52,7 @@ func ExampleContainerAppsClient_NewListBySubscriptionPager() { // Dapr: &armappcontainers.Dapr{ // AppPort: to.Ptr[int32](3000), // AppProtocol: to.Ptr(armappcontainers.AppProtocolHTTP), - // EnableAPILogging: to.Ptr(true), // Enabled: to.Ptr(true), - // HTTPMaxRequestSize: to.Ptr[int32](10), - // HTTPReadBufferSize: to.Ptr[int32](30), - // LogLevel: to.Ptr(armappcontainers.LogLevelDebug), // }, // Ingress: &armappcontainers.Ingress{ // CustomDomains: []*armappcontainers.CustomDomain{ @@ -72,19 +68,6 @@ func ExampleContainerAppsClient_NewListBySubscriptionPager() { // }}, // External: to.Ptr(true), // Fqdn: to.Ptr("testcontainerApp0.demokube-t24clv0g.eastus.containerApps.k4apps.io"), - // IPSecurityRestrictions: []*armappcontainers.IPSecurityRestrictionRule{ - // { - // Name: to.Ptr("Allow work IP A subnet"), - // Description: to.Ptr("Allowing all IP's within the subnet below to access containerapp"), - // Action: to.Ptr(armappcontainers.ActionAllow), - // IPAddressRange: to.Ptr("192.168.1.1/32"), - // }, - // { - // Name: to.Ptr("Allow work IP B subnet"), - // Description: to.Ptr("Allowing all IP's within the subnet below to access containerapp"), - // Action: to.Ptr(armappcontainers.ActionAllow), - // IPAddressRange: to.Ptr("192.168.1.1/8"), - // }}, // TargetPort: to.Ptr[int32](3000), // Traffic: []*armappcontainers.TrafficWeight{ // { @@ -98,9 +81,7 @@ func ExampleContainerAppsClient_NewListBySubscriptionPager() { // }}, // Transport: to.Ptr(armappcontainers.IngressTransportMethodAuto), // }, - // MaxInactiveRevisions: to.Ptr[int32](10), // }, - // EventStreamEndpoint: to.Ptr("testEndpoint"), // LatestRevisionFqdn: to.Ptr("testcontainerApp0-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io"), // ManagedEnvironmentID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube"), // ProvisioningState: to.Ptr(armappcontainers.ContainerAppProvisioningStateSucceeded), @@ -114,15 +95,6 @@ func ExampleContainerAppsClient_NewListBySubscriptionPager() { // Memory: to.Ptr("100Mi"), // }, // }}, - // InitContainers: []*armappcontainers.InitContainer{ - // { - // Name: to.Ptr("testinitcontainerApp0"), - // Image: to.Ptr("repo/testcontainerApp0:v4"), - // Resources: &armappcontainers.ContainerResources{ - // CPU: to.Ptr[float64](0.2), - // Memory: to.Ptr("100Mi"), - // }, - // }}, // Scale: &armappcontainers.Scale{ // MaxReplicas: to.Ptr[int32](5), // MinReplicas: to.Ptr[int32](1), @@ -137,14 +109,13 @@ func ExampleContainerAppsClient_NewListBySubscriptionPager() { // }}, // }, // }, - // WorkloadProfileType: to.Ptr("GeneralPurpose"), // }, // }}, // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListByResourceGroup.json func ExampleContainerAppsClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -178,11 +149,7 @@ func ExampleContainerAppsClient_NewListByResourceGroupPager() { // Dapr: &armappcontainers.Dapr{ // AppPort: to.Ptr[int32](3000), // AppProtocol: to.Ptr(armappcontainers.AppProtocolHTTP), - // EnableAPILogging: to.Ptr(true), // Enabled: to.Ptr(true), - // HTTPMaxRequestSize: to.Ptr[int32](10), - // HTTPReadBufferSize: to.Ptr[int32](30), - // LogLevel: to.Ptr(armappcontainers.LogLevelDebug), // }, // Ingress: &armappcontainers.Ingress{ // CustomDomains: []*armappcontainers.CustomDomain{ @@ -198,19 +165,6 @@ func ExampleContainerAppsClient_NewListByResourceGroupPager() { // }}, // External: to.Ptr(true), // Fqdn: to.Ptr("testcontainerApp0.demokube-t24clv0g.eastus.containerApps.k4apps.io"), - // IPSecurityRestrictions: []*armappcontainers.IPSecurityRestrictionRule{ - // { - // Name: to.Ptr("Allow work IP A subnet"), - // Description: to.Ptr("Allowing all IP's within the subnet below to access containerapp"), - // Action: to.Ptr(armappcontainers.ActionAllow), - // IPAddressRange: to.Ptr("192.168.1.1/32"), - // }, - // { - // Name: to.Ptr("Allow work IP B subnet"), - // Description: to.Ptr("Allowing all IP's within the subnet below to access containerapp"), - // Action: to.Ptr(armappcontainers.ActionAllow), - // IPAddressRange: to.Ptr("192.168.1.1/8"), - // }}, // TargetPort: to.Ptr[int32](3000), // Traffic: []*armappcontainers.TrafficWeight{ // { @@ -224,9 +178,7 @@ func ExampleContainerAppsClient_NewListByResourceGroupPager() { // }}, // Transport: to.Ptr(armappcontainers.IngressTransportMethodAuto), // }, - // MaxInactiveRevisions: to.Ptr[int32](10), // }, - // EventStreamEndpoint: to.Ptr("testEndpoint"), // LatestRevisionFqdn: to.Ptr("testcontainerApp0-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io"), // ManagedEnvironmentID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube"), // ProvisioningState: to.Ptr(armappcontainers.ContainerAppProvisioningStateSucceeded), @@ -240,15 +192,6 @@ func ExampleContainerAppsClient_NewListByResourceGroupPager() { // Memory: to.Ptr("100Mi"), // }, // }}, - // InitContainers: []*armappcontainers.InitContainer{ - // { - // Name: to.Ptr("testinitcontainerApp0"), - // Image: to.Ptr("repo/testcontainerApp0:v4"), - // Resources: &armappcontainers.ContainerResources{ - // CPU: to.Ptr[float64](0.2), - // Memory: to.Ptr("100Mi"), - // }, - // }}, // Scale: &armappcontainers.Scale{ // MaxReplicas: to.Ptr[int32](5), // MinReplicas: to.Ptr[int32](1), @@ -263,14 +206,13 @@ func ExampleContainerAppsClient_NewListByResourceGroupPager() { // }}, // }, // }, - // WorkloadProfileType: to.Ptr("GeneralPurpose"), // }, // }}, // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Get.json func ExampleContainerAppsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -298,11 +240,7 @@ func ExampleContainerAppsClient_Get() { // Dapr: &armappcontainers.Dapr{ // AppPort: to.Ptr[int32](3000), // AppProtocol: to.Ptr(armappcontainers.AppProtocolHTTP), - // EnableAPILogging: to.Ptr(true), // Enabled: to.Ptr(true), - // HTTPMaxRequestSize: to.Ptr[int32](10), - // HTTPReadBufferSize: to.Ptr[int32](30), - // LogLevel: to.Ptr(armappcontainers.LogLevelDebug), // }, // Ingress: &armappcontainers.Ingress{ // CustomDomains: []*armappcontainers.CustomDomain{ @@ -318,19 +256,6 @@ func ExampleContainerAppsClient_Get() { // }}, // External: to.Ptr(true), // Fqdn: to.Ptr("testcontainerApp0.demokube-t24clv0g.eastus.containerApps.k4apps.io"), - // IPSecurityRestrictions: []*armappcontainers.IPSecurityRestrictionRule{ - // { - // Name: to.Ptr("Allow work IP A subnet"), - // Description: to.Ptr("Allowing all IP's within the subnet below to access containerapp"), - // Action: to.Ptr(armappcontainers.ActionAllow), - // IPAddressRange: to.Ptr("192.168.1.1/32"), - // }, - // { - // Name: to.Ptr("Allow work IP B subnet"), - // Description: to.Ptr("Allowing all IP's within the subnet below to access containerapp"), - // Action: to.Ptr(armappcontainers.ActionAllow), - // IPAddressRange: to.Ptr("192.168.1.1/8"), - // }}, // TargetPort: to.Ptr[int32](3000), // Traffic: []*armappcontainers.TrafficWeight{ // { @@ -344,9 +269,7 @@ func ExampleContainerAppsClient_Get() { // }}, // Transport: to.Ptr(armappcontainers.IngressTransportMethodAuto), // }, - // MaxInactiveRevisions: to.Ptr[int32](10), // }, - // EventStreamEndpoint: to.Ptr("testEndpoint"), // LatestRevisionFqdn: to.Ptr("testcontainerApp0-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io"), // ManagedEnvironmentID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube"), // ProvisioningState: to.Ptr(armappcontainers.ContainerAppProvisioningStateSucceeded), @@ -360,15 +283,6 @@ func ExampleContainerAppsClient_Get() { // Memory: to.Ptr("100Mi"), // }, // }}, - // InitContainers: []*armappcontainers.InitContainer{ - // { - // Name: to.Ptr("testinitcontainerApp0"), - // Image: to.Ptr("repo/testcontainerApp0:v4"), - // Resources: &armappcontainers.ContainerResources{ - // CPU: to.Ptr[float64](0.2), - // Memory: to.Ptr("100Mi"), - // }, - // }}, // Scale: &armappcontainers.Scale{ // MaxReplicas: to.Ptr[int32](5), // MinReplicas: to.Ptr[int32](1), @@ -383,13 +297,12 @@ func ExampleContainerAppsClient_Get() { // }}, // }, // }, - // WorkloadProfileType: to.Ptr("GeneralPurpose"), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CreateOrUpdate.json -func ExampleContainerAppsClient_BeginCreateOrUpdate_createOrUpdateContainerApp() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_CreateOrUpdate.json +func ExampleContainerAppsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -404,13 +317,9 @@ func ExampleContainerAppsClient_BeginCreateOrUpdate_createOrUpdateContainerApp() Properties: &armappcontainers.ContainerAppProperties{ Configuration: &armappcontainers.Configuration{ Dapr: &armappcontainers.Dapr{ - AppPort: to.Ptr[int32](3000), - AppProtocol: to.Ptr(armappcontainers.AppProtocolHTTP), - EnableAPILogging: to.Ptr(true), - Enabled: to.Ptr(true), - HTTPMaxRequestSize: to.Ptr[int32](10), - HTTPReadBufferSize: to.Ptr[int32](30), - LogLevel: to.Ptr(armappcontainers.LogLevelDebug), + AppPort: to.Ptr[int32](3000), + AppProtocol: to.Ptr(armappcontainers.AppProtocolHTTP), + Enabled: to.Ptr(true), }, Ingress: &armappcontainers.Ingress{ CustomDomains: []*armappcontainers.CustomDomain{ @@ -424,20 +333,7 @@ func ExampleContainerAppsClient_BeginCreateOrUpdate_createOrUpdateContainerApp() BindingType: to.Ptr(armappcontainers.BindingTypeSniEnabled), CertificateID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"), }}, - External: to.Ptr(true), - IPSecurityRestrictions: []*armappcontainers.IPSecurityRestrictionRule{ - { - Name: to.Ptr("Allow work IP A subnet"), - Description: to.Ptr("Allowing all IP's within the subnet below to access containerapp"), - Action: to.Ptr(armappcontainers.ActionAllow), - IPAddressRange: to.Ptr("192.168.1.1/32"), - }, - { - Name: to.Ptr("Allow work IP B subnet"), - Description: to.Ptr("Allowing all IP's within the subnet below to access containerapp"), - Action: to.Ptr(armappcontainers.ActionAllow), - IPAddressRange: to.Ptr("192.168.1.1/8"), - }}, + External: to.Ptr(true), TargetPort: to.Ptr[int32](3000), Traffic: []*armappcontainers.TrafficWeight{ { @@ -446,9 +342,8 @@ func ExampleContainerAppsClient_BeginCreateOrUpdate_createOrUpdateContainerApp() Weight: to.Ptr[int32](100), }}, }, - MaxInactiveRevisions: to.Ptr[int32](10), }, - EnvironmentID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube"), + ManagedEnvironmentID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube"), Template: &armappcontainers.Template{ Containers: []*armappcontainers.Container{ { @@ -470,20 +365,6 @@ func ExampleContainerAppsClient_BeginCreateOrUpdate_createOrUpdateContainerApp() PeriodSeconds: to.Ptr[int32](3), }}, }}, - InitContainers: []*armappcontainers.InitContainer{ - { - Name: to.Ptr("testinitcontainerApp0"), - Args: []*string{ - to.Ptr("-c"), - to.Ptr("while true; do echo hello; sleep 10;done")}, - Command: []*string{ - to.Ptr("/bin/sh")}, - Image: to.Ptr("repo/testcontainerApp0:v4"), - Resources: &armappcontainers.ContainerResources{ - CPU: to.Ptr[float64](0.2), - Memory: to.Ptr("100Mi"), - }, - }}, Scale: &armappcontainers.Scale{ MaxReplicas: to.Ptr[int32](5), MinReplicas: to.Ptr[int32](1), @@ -499,7 +380,6 @@ func ExampleContainerAppsClient_BeginCreateOrUpdate_createOrUpdateContainerApp() }}, }, }, - WorkloadProfileType: to.Ptr("GeneralPurpose"), }, }, nil) if err != nil { @@ -523,7 +403,6 @@ func ExampleContainerAppsClient_BeginCreateOrUpdate_createOrUpdateContainerApp() // AppPort: to.Ptr[int32](3000), // AppProtocol: to.Ptr(armappcontainers.AppProtocolHTTP), // Enabled: to.Ptr(true), - // HTTPReadBufferSize: to.Ptr[int32](30), // }, // Ingress: &armappcontainers.Ingress{ // CustomDomains: []*armappcontainers.CustomDomain{ @@ -539,19 +418,6 @@ func ExampleContainerAppsClient_BeginCreateOrUpdate_createOrUpdateContainerApp() // }}, // External: to.Ptr(true), // Fqdn: to.Ptr("testcontainerApp0.demokube-t24clv0g.eastus.containerApps.k4apps.io"), - // IPSecurityRestrictions: []*armappcontainers.IPSecurityRestrictionRule{ - // { - // Name: to.Ptr("Allow work IP A subnet"), - // Description: to.Ptr("Allowing all IP's within the subnet below to access containerapp"), - // Action: to.Ptr(armappcontainers.ActionAllow), - // IPAddressRange: to.Ptr("192.168.1.1/32"), - // }, - // { - // Name: to.Ptr("Allow work IP B subnet"), - // Description: to.Ptr("Allowing all IP's within the subnet below to access containerapp"), - // Action: to.Ptr(armappcontainers.ActionAllow), - // IPAddressRange: to.Ptr("192.168.1.1/8"), - // }}, // TargetPort: to.Ptr[int32](3000), // Traffic: []*armappcontainers.TrafficWeight{ // { @@ -566,7 +432,6 @@ func ExampleContainerAppsClient_BeginCreateOrUpdate_createOrUpdateContainerApp() // Transport: to.Ptr(armappcontainers.IngressTransportMethodAuto), // }, // }, - // EventStreamEndpoint: to.Ptr("testEndpoint"), // LatestRevisionFqdn: to.Ptr("testcontainerApp0-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io"), // ManagedEnvironmentID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube"), // ProvisioningState: to.Ptr(armappcontainers.ContainerAppProvisioningStateSucceeded), @@ -575,10 +440,6 @@ func ExampleContainerAppsClient_BeginCreateOrUpdate_createOrUpdateContainerApp() // { // Name: to.Ptr("testcontainerApp0"), // Image: to.Ptr("repo/testcontainerApp0:v4"), - // Resources: &armappcontainers.ContainerResources{ - // CPU: to.Ptr[float64](0.2), - // Memory: to.Ptr("100Mi"), - // }, // Probes: []*armappcontainers.ContainerAppProbe{ // { // Type: to.Ptr(armappcontainers.TypeLiveness), @@ -594,164 +455,20 @@ func ExampleContainerAppsClient_BeginCreateOrUpdate_createOrUpdateContainerApp() // InitialDelaySeconds: to.Ptr[int32](3), // PeriodSeconds: to.Ptr[int32](3), // }}, - // }}, - // InitContainers: []*armappcontainers.InitContainer{ - // { - // Name: to.Ptr("testinitcontainerApp0"), - // Args: []*string{ - // to.Ptr("-c"), - // to.Ptr("while true; do echo hello; sleep 10;done")}, - // Command: []*string{ - // to.Ptr("/bin/sh")}, - // Image: to.Ptr("repo/testcontainerApp0:v4"), - // Resources: &armappcontainers.ContainerResources{ - // CPU: to.Ptr[float64](0.2), - // Memory: to.Ptr("100Mi"), - // }, - // }}, - // Scale: &armappcontainers.Scale{ - // MaxReplicas: to.Ptr[int32](5), - // MinReplicas: to.Ptr[int32](1), - // Rules: []*armappcontainers.ScaleRule{ - // { - // Name: to.Ptr("httpscalingrule"), - // HTTP: &armappcontainers.HTTPScaleRule{ - // Metadata: map[string]*string{ - // "concurrentRequests": to.Ptr("50"), - // }, - // }, - // }}, - // }, - // }, - // WorkloadProfileType: to.Ptr("GeneralPurpose"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json -func ExampleContainerAppsClient_BeginCreateOrUpdate_createOrUpdateTcpApp() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewContainerAppsClient().BeginCreateOrUpdate(ctx, "rg", "testcontainerAppTcp", armappcontainers.ContainerApp{ - Location: to.Ptr("East US"), - Properties: &armappcontainers.ContainerAppProperties{ - Configuration: &armappcontainers.Configuration{ - Ingress: &armappcontainers.Ingress{ - ExposedPort: to.Ptr[int32](4000), - External: to.Ptr(true), - TargetPort: to.Ptr[int32](3000), - Traffic: []*armappcontainers.TrafficWeight{ - { - RevisionName: to.Ptr("testcontainerAppTcp-ab1234"), - Weight: to.Ptr[int32](100), - }}, - Transport: to.Ptr(armappcontainers.IngressTransportMethodTCP), - }, - }, - EnvironmentID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube"), - Template: &armappcontainers.Template{ - Containers: []*armappcontainers.Container{ - { - Name: to.Ptr("testcontainerAppTcp"), - Image: to.Ptr("repo/testcontainerAppTcp:v1"), - Probes: []*armappcontainers.ContainerAppProbe{ - { - Type: to.Ptr(armappcontainers.TypeLiveness), - InitialDelaySeconds: to.Ptr[int32](3), - PeriodSeconds: to.Ptr[int32](3), - TCPSocket: &armappcontainers.ContainerAppProbeTCPSocket{ - Port: to.Ptr[int32](8080), - }, - }}, - }}, - Scale: &armappcontainers.Scale{ - MaxReplicas: to.Ptr[int32](5), - MinReplicas: to.Ptr[int32](1), - Rules: []*armappcontainers.ScaleRule{ - { - Name: to.Ptr("tcpscalingrule"), - TCP: &armappcontainers.TCPScaleRule{ - Metadata: map[string]*string{ - "concurrentConnections": to.Ptr("50"), - }, - }, - }}, - }, - }, - }, - }, 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.ContainerApp = armappcontainers.ContainerApp{ - // Name: to.Ptr("testcontainerAppTcp"), - // Type: to.Ptr("Microsoft.App/containerApps"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/testcontainerAppTcp"), - // Location: to.Ptr("East US"), - // Properties: &armappcontainers.ContainerAppProperties{ - // Configuration: &armappcontainers.Configuration{ - // Ingress: &armappcontainers.Ingress{ - // ExposedPort: to.Ptr[int32](4000), - // External: to.Ptr(true), - // Fqdn: to.Ptr("testcontainerAppTcp.demokube-t24clv0g.eastus.containerApps.k4apps.io"), - // TargetPort: to.Ptr[int32](3000), - // Traffic: []*armappcontainers.TrafficWeight{ - // { - // RevisionName: to.Ptr("testcontainerAppTcp-ab1234"), - // Weight: to.Ptr[int32](80), - // }, - // { - // RevisionName: to.Ptr("testcontainerAppTcp-ab4321"), - // Weight: to.Ptr[int32](20), - // }}, - // Transport: to.Ptr(armappcontainers.IngressTransportMethodTCP), - // }, - // }, - // LatestRevisionFqdn: to.Ptr("testcontainerAppTcp-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io"), - // ManagedEnvironmentID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube"), - // ProvisioningState: to.Ptr(armappcontainers.ContainerAppProvisioningStateSucceeded), - // Template: &armappcontainers.Template{ - // Containers: []*armappcontainers.Container{ - // { - // Name: to.Ptr("testcontainerAppTcp"), - // Image: to.Ptr("repo/testcontainerAppTcp:v4"), // Resources: &armappcontainers.ContainerResources{ // CPU: to.Ptr[float64](0.2), // Memory: to.Ptr("100Mi"), // }, - // Probes: []*armappcontainers.ContainerAppProbe{ - // { - // Type: to.Ptr(armappcontainers.TypeLiveness), - // InitialDelaySeconds: to.Ptr[int32](3), - // PeriodSeconds: to.Ptr[int32](3), - // TCPSocket: &armappcontainers.ContainerAppProbeTCPSocket{ - // Port: to.Ptr[int32](8080), - // }, - // }}, // }}, // Scale: &armappcontainers.Scale{ // MaxReplicas: to.Ptr[int32](5), // MinReplicas: to.Ptr[int32](1), // Rules: []*armappcontainers.ScaleRule{ // { - // Name: to.Ptr("tcpscalingrule"), - // TCP: &armappcontainers.TCPScaleRule{ + // Name: to.Ptr("httpscalingrule"), + // HTTP: &armappcontainers.HTTPScaleRule{ // Metadata: map[string]*string{ - // "concurrentConnections": to.Ptr("50"), + // "concurrentRequests": to.Ptr("50"), // }, // }, // }}, @@ -761,7 +478,7 @@ func ExampleContainerAppsClient_BeginCreateOrUpdate_createOrUpdateTcpApp() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Delete.json func ExampleContainerAppsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -782,7 +499,7 @@ func ExampleContainerAppsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Patch.json func ExampleContainerAppsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -802,13 +519,9 @@ func ExampleContainerAppsClient_BeginUpdate() { Properties: &armappcontainers.ContainerAppProperties{ Configuration: &armappcontainers.Configuration{ Dapr: &armappcontainers.Dapr{ - AppPort: to.Ptr[int32](3000), - AppProtocol: to.Ptr(armappcontainers.AppProtocolHTTP), - EnableAPILogging: to.Ptr(true), - Enabled: to.Ptr(true), - HTTPMaxRequestSize: to.Ptr[int32](10), - HTTPReadBufferSize: to.Ptr[int32](30), - LogLevel: to.Ptr(armappcontainers.LogLevelDebug), + AppPort: to.Ptr[int32](3000), + AppProtocol: to.Ptr(armappcontainers.AppProtocolHTTP), + Enabled: to.Ptr(true), }, Ingress: &armappcontainers.Ingress{ CustomDomains: []*armappcontainers.CustomDomain{ @@ -822,20 +535,7 @@ func ExampleContainerAppsClient_BeginUpdate() { BindingType: to.Ptr(armappcontainers.BindingTypeSniEnabled), CertificateID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"), }}, - External: to.Ptr(true), - IPSecurityRestrictions: []*armappcontainers.IPSecurityRestrictionRule{ - { - Name: to.Ptr("Allow work IP A subnet"), - Description: to.Ptr("Allowing all IP's within the subnet below to access containerapp"), - Action: to.Ptr(armappcontainers.ActionAllow), - IPAddressRange: to.Ptr("192.168.1.1/32"), - }, - { - Name: to.Ptr("Allow work IP B subnet"), - Description: to.Ptr("Allowing all IP's within the subnet below to access containerapp"), - Action: to.Ptr(armappcontainers.ActionAllow), - IPAddressRange: to.Ptr("192.168.1.1/8"), - }}, + External: to.Ptr(true), TargetPort: to.Ptr[int32](3000), Traffic: []*armappcontainers.TrafficWeight{ { @@ -844,7 +544,6 @@ func ExampleContainerAppsClient_BeginUpdate() { Weight: to.Ptr[int32](100), }}, }, - MaxInactiveRevisions: to.Ptr[int32](10), }, Template: &armappcontainers.Template{ Containers: []*armappcontainers.Container{ @@ -867,15 +566,6 @@ func ExampleContainerAppsClient_BeginUpdate() { PeriodSeconds: to.Ptr[int32](3), }}, }}, - InitContainers: []*armappcontainers.InitContainer{ - { - Name: to.Ptr("testinitcontainerApp0"), - Image: to.Ptr("repo/testcontainerApp0:v4"), - Resources: &armappcontainers.ContainerResources{ - CPU: to.Ptr[float64](0.2), - Memory: to.Ptr("100Mi"), - }, - }}, Scale: &armappcontainers.Scale{ MaxReplicas: to.Ptr[int32](5), MinReplicas: to.Ptr[int32](1), @@ -902,7 +592,7 @@ func ExampleContainerAppsClient_BeginUpdate() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListCustomHostNameAnalysis.json func ExampleContainerAppsClient_ListCustomHostNameAnalysis() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -921,32 +611,35 @@ func ExampleContainerAppsClient_ListCustomHostNameAnalysis() { _ = 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.CustomHostnameAnalysisResult = armappcontainers.CustomHostnameAnalysisResult{ - // ARecords: []*string{ - // to.Ptr("aRecord1"), - // to.Ptr("aRecord2")}, - // AlternateCNameRecords: []*string{ - // to.Ptr("cNameRecord1"), - // to.Ptr("cNameRecord2")}, - // AlternateTxtRecords: []*string{ - // to.Ptr("txtRecord1"), - // to.Ptr("txtRecord2")}, - // CNameRecords: []*string{ - // to.Ptr("cNameRecord1"), - // to.Ptr("cNameRecord2")}, - // ConflictingContainerAppResourceID: to.Ptr(""), - // CustomDomainVerificationFailureInfo: &armappcontainers.CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo{ - // }, - // CustomDomainVerificationTest: to.Ptr(armappcontainers.DNSVerificationTestResultPassed), - // HasConflictOnManagedEnvironment: to.Ptr(false), - // HostName: to.Ptr("my.name.corp"), - // IsHostnameAlreadyVerified: to.Ptr(true), - // TxtRecords: []*string{ - // to.Ptr("txtRecord1"), - // to.Ptr("txtRecord2")}, + // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/testcontainerApp0"), + // Properties: &armappcontainers.CustomHostnameAnalysisResultProperties{ + // ARecords: []*string{ + // to.Ptr("aRecord1"), + // to.Ptr("aRecord2")}, + // AlternateCNameRecords: []*string{ + // to.Ptr("cNameRecord1"), + // to.Ptr("cNameRecord2")}, + // AlternateTxtRecords: []*string{ + // to.Ptr("txtRecord1"), + // to.Ptr("txtRecord2")}, + // CNameRecords: []*string{ + // to.Ptr("cNameRecord1"), + // to.Ptr("cNameRecord2")}, + // ConflictingContainerAppResourceID: to.Ptr(""), + // CustomDomainVerificationFailureInfo: &armappcontainers.DefaultErrorResponse{ + // }, + // CustomDomainVerificationTest: to.Ptr(armappcontainers.DNSVerificationTestResultPassed), + // HasConflictOnManagedEnvironment: to.Ptr(false), + // HostName: to.Ptr("my.name.corp"), + // IsHostnameAlreadyVerified: to.Ptr(true), + // TxtRecords: []*string{ + // to.Ptr("txtRecord1"), + // to.Ptr("txtRecord2")}, + // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListSecrets.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListSecrets.json func ExampleContainerAppsClient_ListSecrets() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -974,33 +667,3 @@ func ExampleContainerAppsClient_ListSecrets() { // }}, // } } - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_GetAuthToken.json -func ExampleContainerAppsClient_GetAuthToken() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewContainerAppsClient().GetAuthToken(ctx, "rg", "testcontainerApp0", 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.ContainerAppAuthToken = armappcontainers.ContainerAppAuthToken{ - // Name: to.Ptr("testcontainerApp0"), - // Type: to.Ptr("Microsoft.App/containerApps/accesstoken"), - // ID: to.Ptr("/subscriptions/651f8027-33e8-4ec4-97b4-f6e9f3dc8744/resourceGroups/rg/providers/Microsoft.App/containerApps/testcontainerApp0"), - // Location: to.Ptr("East US"), - // Properties: &armappcontainers.ContainerAppAuthTokenProperties{ - // Expires: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-14T19:22:50.3080223Z"); return t}()), - // Token: to.Ptr("testToken"), - // }, - // } -} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsauthconfigs_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsauthconfigs_client.go index 28a0c6b0dac4..0ae4137afeda 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsauthconfigs_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsauthconfigs_client.go @@ -47,7 +47,7 @@ func NewContainerAppsAuthConfigsClient(subscriptionID string, credential azcore. // CreateOrUpdate - Create or update the AuthConfig for a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - authConfigName - Name of the Container App AuthConfig. @@ -93,7 +93,7 @@ func (client *ContainerAppsAuthConfigsClient) createOrUpdateCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, authConfigEnvelope) @@ -111,7 +111,7 @@ func (client *ContainerAppsAuthConfigsClient) createOrUpdateHandleResponse(resp // Delete - Delete a Container App AuthConfig. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - authConfigName - Name of the Container App AuthConfig. @@ -156,7 +156,7 @@ func (client *ContainerAppsAuthConfigsClient) deleteCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -165,7 +165,7 @@ func (client *ContainerAppsAuthConfigsClient) deleteCreateRequest(ctx context.Co // Get - Get a AuthConfig of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - authConfigName - Name of the Container App AuthConfig. @@ -210,7 +210,7 @@ func (client *ContainerAppsAuthConfigsClient) getCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -227,7 +227,7 @@ func (client *ContainerAppsAuthConfigsClient) getHandleResponse(resp *http.Respo // NewListByContainerAppPager - Get the Container App AuthConfigs in a given resource group. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsAuthConfigsClientListByContainerAppOptions contains the optional parameters for the ContainerAppsAuthConfigsClient.NewListByContainerAppPager @@ -280,7 +280,7 @@ func (client *ContainerAppsAuthConfigsClient) listByContainerAppCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsauthconfigs_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsauthconfigs_client_example_test.go index b6251a6b007f..1801536f70f1 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsauthconfigs_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsauthconfigs_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/appcontainers/armappcontainers/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_ListByContainer.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_ListByContainer.json func ExampleContainerAppsAuthConfigsClient_NewListByContainerAppPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -67,7 +67,7 @@ func ExampleContainerAppsAuthConfigsClient_NewListByContainerAppPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_Get.json func ExampleContainerAppsAuthConfigsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -108,7 +108,7 @@ func ExampleContainerAppsAuthConfigsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_CreateOrUpdate.json func ExampleContainerAppsAuthConfigsClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -166,7 +166,7 @@ func ExampleContainerAppsAuthConfigsClient_CreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_Delete.json func ExampleContainerAppsAuthConfigsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsdiagnostics_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsdiagnostics_client.go deleted file mode 100644 index f778c622bf81..000000000000 --- a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsdiagnostics_client.go +++ /dev/null @@ -1,372 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappcontainers - -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" -) - -// ContainerAppsDiagnosticsClient contains the methods for the ContainerAppsDiagnostics group. -// Don't use this type directly, use NewContainerAppsDiagnosticsClient() instead. -type ContainerAppsDiagnosticsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewContainerAppsDiagnosticsClient creates a new instance of ContainerAppsDiagnosticsClient with the specified values. -// - subscriptionID - The ID of the target subscription. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewContainerAppsDiagnosticsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ContainerAppsDiagnosticsClient, error) { - cl, err := arm.NewClient(moduleName+".ContainerAppsDiagnosticsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &ContainerAppsDiagnosticsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// GetDetector - Get a diagnostics result of a Container App. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - containerAppName - Name of the Container App. -// - detectorName - Name of the Container App Detector. -// - options - ContainerAppsDiagnosticsClientGetDetectorOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.GetDetector -// method. -func (client *ContainerAppsDiagnosticsClient) GetDetector(ctx context.Context, resourceGroupName string, containerAppName string, detectorName string, options *ContainerAppsDiagnosticsClientGetDetectorOptions) (ContainerAppsDiagnosticsClientGetDetectorResponse, error) { - req, err := client.getDetectorCreateRequest(ctx, resourceGroupName, containerAppName, detectorName, options) - if err != nil { - return ContainerAppsDiagnosticsClientGetDetectorResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ContainerAppsDiagnosticsClientGetDetectorResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsDiagnosticsClientGetDetectorResponse{}, runtime.NewResponseError(resp) - } - return client.getDetectorHandleResponse(resp) -} - -// getDetectorCreateRequest creates the GetDetector request. -func (client *ContainerAppsDiagnosticsClient) getDetectorCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, detectorName string, options *ContainerAppsDiagnosticsClientGetDetectorOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectors/{detectorName}" - 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 containerAppName == "" { - return nil, errors.New("parameter containerAppName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerAppName}", url.PathEscape(containerAppName)) - if detectorName == "" { - return nil, errors.New("parameter detectorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{detectorName}", url.PathEscape(detectorName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getDetectorHandleResponse handles the GetDetector response. -func (client *ContainerAppsDiagnosticsClient) getDetectorHandleResponse(resp *http.Response) (ContainerAppsDiagnosticsClientGetDetectorResponse, error) { - result := ContainerAppsDiagnosticsClientGetDetectorResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Diagnostics); err != nil { - return ContainerAppsDiagnosticsClientGetDetectorResponse{}, err - } - return result, nil -} - -// GetRevision - Get a revision of a Container App. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - containerAppName - Name of the Container App. -// - revisionName - Name of the Container App Revision. -// - options - ContainerAppsDiagnosticsClientGetRevisionOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.GetRevision -// method. -func (client *ContainerAppsDiagnosticsClient) GetRevision(ctx context.Context, resourceGroupName string, containerAppName string, revisionName string, options *ContainerAppsDiagnosticsClientGetRevisionOptions) (ContainerAppsDiagnosticsClientGetRevisionResponse, error) { - req, err := client.getRevisionCreateRequest(ctx, resourceGroupName, containerAppName, revisionName, options) - if err != nil { - return ContainerAppsDiagnosticsClientGetRevisionResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ContainerAppsDiagnosticsClientGetRevisionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsDiagnosticsClientGetRevisionResponse{}, runtime.NewResponseError(resp) - } - return client.getRevisionHandleResponse(resp) -} - -// getRevisionCreateRequest creates the GetRevision request. -func (client *ContainerAppsDiagnosticsClient) getRevisionCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, revisionName string, options *ContainerAppsDiagnosticsClientGetRevisionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectorProperties/revisionsApi/revisions/{revisionName}" - 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 containerAppName == "" { - return nil, errors.New("parameter containerAppName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerAppName}", url.PathEscape(containerAppName)) - if revisionName == "" { - return nil, errors.New("parameter revisionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{revisionName}", url.PathEscape(revisionName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getRevisionHandleResponse handles the GetRevision response. -func (client *ContainerAppsDiagnosticsClient) getRevisionHandleResponse(resp *http.Response) (ContainerAppsDiagnosticsClientGetRevisionResponse, error) { - result := ContainerAppsDiagnosticsClientGetRevisionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Revision); err != nil { - return ContainerAppsDiagnosticsClientGetRevisionResponse{}, err - } - return result, nil -} - -// GetRoot - Get the properties of a Container App. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - containerAppName - Name of the Container App. -// - options - ContainerAppsDiagnosticsClientGetRootOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.GetRoot -// method. -func (client *ContainerAppsDiagnosticsClient) GetRoot(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsDiagnosticsClientGetRootOptions) (ContainerAppsDiagnosticsClientGetRootResponse, error) { - req, err := client.getRootCreateRequest(ctx, resourceGroupName, containerAppName, options) - if err != nil { - return ContainerAppsDiagnosticsClientGetRootResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ContainerAppsDiagnosticsClientGetRootResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsDiagnosticsClientGetRootResponse{}, runtime.NewResponseError(resp) - } - return client.getRootHandleResponse(resp) -} - -// getRootCreateRequest creates the GetRoot request. -func (client *ContainerAppsDiagnosticsClient) getRootCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsDiagnosticsClientGetRootOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectorProperties/rootApi/" - 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 containerAppName == "" { - return nil, errors.New("parameter containerAppName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerAppName}", url.PathEscape(containerAppName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getRootHandleResponse handles the GetRoot response. -func (client *ContainerAppsDiagnosticsClient) getRootHandleResponse(resp *http.Response) (ContainerAppsDiagnosticsClientGetRootResponse, error) { - result := ContainerAppsDiagnosticsClientGetRootResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ContainerApp); err != nil { - return ContainerAppsDiagnosticsClientGetRootResponse{}, err - } - return result, nil -} - -// NewListDetectorsPager - Get the list of diagnostics for a given Container App. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - containerAppName - Name of the Container App for which detector info is needed. -// - options - ContainerAppsDiagnosticsClientListDetectorsOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.NewListDetectorsPager -// method. -func (client *ContainerAppsDiagnosticsClient) NewListDetectorsPager(resourceGroupName string, containerAppName string, options *ContainerAppsDiagnosticsClientListDetectorsOptions) *runtime.Pager[ContainerAppsDiagnosticsClientListDetectorsResponse] { - return runtime.NewPager(runtime.PagingHandler[ContainerAppsDiagnosticsClientListDetectorsResponse]{ - More: func(page ContainerAppsDiagnosticsClientListDetectorsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ContainerAppsDiagnosticsClientListDetectorsResponse) (ContainerAppsDiagnosticsClientListDetectorsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listDetectorsCreateRequest(ctx, resourceGroupName, containerAppName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ContainerAppsDiagnosticsClientListDetectorsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ContainerAppsDiagnosticsClientListDetectorsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsDiagnosticsClientListDetectorsResponse{}, runtime.NewResponseError(resp) - } - return client.listDetectorsHandleResponse(resp) - }, - }) -} - -// listDetectorsCreateRequest creates the ListDetectors request. -func (client *ContainerAppsDiagnosticsClient) listDetectorsCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsDiagnosticsClientListDetectorsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectors" - 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 containerAppName == "" { - return nil, errors.New("parameter containerAppName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerAppName}", url.PathEscape(containerAppName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listDetectorsHandleResponse handles the ListDetectors response. -func (client *ContainerAppsDiagnosticsClient) listDetectorsHandleResponse(resp *http.Response) (ContainerAppsDiagnosticsClientListDetectorsResponse, error) { - result := ContainerAppsDiagnosticsClientListDetectorsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticsCollection); err != nil { - return ContainerAppsDiagnosticsClientListDetectorsResponse{}, err - } - return result, nil -} - -// NewListRevisionsPager - Get the Revisions for a given Container App. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - containerAppName - Name of the Container App for which Revisions are needed. -// - options - ContainerAppsDiagnosticsClientListRevisionsOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.NewListRevisionsPager -// method. -func (client *ContainerAppsDiagnosticsClient) NewListRevisionsPager(resourceGroupName string, containerAppName string, options *ContainerAppsDiagnosticsClientListRevisionsOptions) *runtime.Pager[ContainerAppsDiagnosticsClientListRevisionsResponse] { - return runtime.NewPager(runtime.PagingHandler[ContainerAppsDiagnosticsClientListRevisionsResponse]{ - More: func(page ContainerAppsDiagnosticsClientListRevisionsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ContainerAppsDiagnosticsClientListRevisionsResponse) (ContainerAppsDiagnosticsClientListRevisionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listRevisionsCreateRequest(ctx, resourceGroupName, containerAppName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ContainerAppsDiagnosticsClientListRevisionsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ContainerAppsDiagnosticsClientListRevisionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsDiagnosticsClientListRevisionsResponse{}, runtime.NewResponseError(resp) - } - return client.listRevisionsHandleResponse(resp) - }, - }) -} - -// listRevisionsCreateRequest creates the ListRevisions request. -func (client *ContainerAppsDiagnosticsClient) listRevisionsCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsDiagnosticsClientListRevisionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectorProperties/revisionsApi/revisions/" - 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 containerAppName == "" { - return nil, errors.New("parameter containerAppName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerAppName}", url.PathEscape(containerAppName)) - 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", "2022-06-01-preview") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listRevisionsHandleResponse handles the ListRevisions response. -func (client *ContainerAppsDiagnosticsClient) listRevisionsHandleResponse(resp *http.Response) (ContainerAppsDiagnosticsClientListRevisionsResponse, error) { - result := ContainerAppsDiagnosticsClientListRevisionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RevisionCollection); err != nil { - return ContainerAppsDiagnosticsClientListRevisionsResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsdiagnostics_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsdiagnostics_client_example_test.go deleted file mode 100644 index 664af132d533..000000000000 --- a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsdiagnostics_client_example_test.go +++ /dev/null @@ -1,380 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappcontainers_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_List.json -func ExampleContainerAppsDiagnosticsClient_NewListDetectorsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewContainerAppsDiagnosticsClient().NewListDetectorsPager("mikono-workerapp-test-rg", "mikono-capp-stage1", 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.DiagnosticsCollection = armappcontainers.DiagnosticsCollection{ - // Value: []*armappcontainers.Diagnostics{ - // { - // Name: to.Ptr("cappContainerAppAvailabilityMetrics"), - // Type: to.Ptr("Microsoft.App/containerapps/detectors"), - // ID: to.Ptr("/subscriptions/f07f3711-b45e-40fe-a941-4e6d93f851e6/resourceGroups/mikono-workerapp-test-rg/providers/Microsoft.App/containerApps/mikono-capp-stage1/detectors/cappContainerAppAvailabilityMetrics"), - // Properties: &armappcontainers.DiagnosticsProperties{ - // Dataset: []*armappcontainers.DiagnosticsDataAPIResponse{ - // }, - // Metadata: &armappcontainers.DiagnosticsDefinition{ - // Name: to.Ptr("Availability Metrics for Container Apps"), - // Type: to.Ptr("Analysis"), - // Author: to.Ptr(""), - // Category: to.Ptr("Availability and Performance"), - // ID: to.Ptr("cappContainerAppAvailabilityMetrics"), - // Score: to.Ptr[float32](0), - // SupportTopicList: []*armappcontainers.DiagnosticSupportTopic{ - // }, - // }, - // Status: &armappcontainers.DiagnosticsStatus{ - // StatusID: to.Ptr[int32](4), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_Get.json -func ExampleContainerAppsDiagnosticsClient_GetDetector() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewContainerAppsDiagnosticsClient().GetDetector(ctx, "mikono-workerapp-test-rg", "mikono-capp-stage1", "cappcontainerappnetworkIO", 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.Diagnostics = armappcontainers.Diagnostics{ - // Name: to.Ptr("cappcontainerappnetworkIO"), - // Type: to.Ptr("Microsoft.App/containerapps/detectors"), - // ID: to.Ptr("/subscriptions/f07f3711-b45e-40fe-a941-4e6d93f851e6/resourceGroups/mikono-workerapp-test-rg/providers/Microsoft.App/containerApps/mikono-capp-stage1/detectors/cappcontainerappnetworkIO"), - // Properties: &armappcontainers.DiagnosticsProperties{ - // Dataset: []*armappcontainers.DiagnosticsDataAPIResponse{ - // { - // RenderingProperties: &armappcontainers.DiagnosticRendering{ - // Type: to.Ptr[int32](8), - // Description: to.Ptr(""), - // IsVisible: to.Ptr(true), - // Title: to.Ptr("Container Apps Network Inbound "), - // }, - // Table: &armappcontainers.DiagnosticDataTableResponseObject{ - // Columns: []*armappcontainers.DiagnosticDataTableResponseColumn{ - // { - // ColumnName: to.Ptr("TimeStamp"), - // DataType: to.Ptr("DateTime"), - // }, - // { - // ColumnName: to.Ptr("Metric"), - // DataType: to.Ptr("String"), - // }, - // { - // ColumnName: to.Ptr("Average"), - // DataType: to.Ptr("Double"), - // }}, - // Rows: []any{ - // []any{ - // "2022-03-15T21:35:00", - // "RxBytes", - // float64(0), - // }}, - // TableName: to.Ptr(""), - // }, - // }}, - // Metadata: &armappcontainers.DiagnosticsDefinition{ - // Name: to.Ptr("Container App Network Inbound and Outbound"), - // Type: to.Ptr("Detector"), - // Description: to.Ptr("This detector shows the Container App Network Inbound and Outbound."), - // Author: to.Ptr(""), - // Category: to.Ptr("Availability and Performance"), - // ID: to.Ptr("cappcontainerappnetworkIO"), - // Score: to.Ptr[float32](0), - // SupportTopicList: []*armappcontainers.DiagnosticSupportTopic{ - // }, - // }, - // Status: &armappcontainers.DiagnosticsStatus{ - // StatusID: to.Ptr[int32](3), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json -func ExampleContainerAppsDiagnosticsClient_NewListRevisionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewContainerAppsDiagnosticsClient().NewListRevisionsPager("rg", "testcontainerApp0", &armappcontainers.ContainerAppsDiagnosticsClientListRevisionsOptions{Filter: 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.RevisionCollection = armappcontainers.RevisionCollection{ - // Value: []*armappcontainers.Revision{ - // { - // Name: to.Ptr("testcontainerApp0-pjxhsye"), - // Type: to.Ptr("Microsoft.App/containerApps/revisions"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/testcontainerApp0/revisions/testcontainerApp0-pjxhsye"), - // Properties: &armappcontainers.RevisionProperties{ - // Active: to.Ptr(true), - // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-24T21:24:22+00:00"); return t}()), - // Fqdn: to.Ptr("testcontainerApp0-pjxhsye.politehill-ab123456.eastus.azurecontainerapps.io"), - // LastActiveTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-24T21:24:22+00:00"); return t}()), - // Replicas: to.Ptr[int32](1), - // Template: &armappcontainers.Template{ - // Containers: []*armappcontainers.Container{ - // { - // Name: to.Ptr("testcontainerApp0"), - // Image: to.Ptr("repo/testcontainerApp0:v2"), - // Resources: &armappcontainers.ContainerResources{ - // CPU: to.Ptr[float64](0.2), - // Memory: to.Ptr("100Mi"), - // }, - // }}, - // Scale: &armappcontainers.Scale{ - // MaxReplicas: to.Ptr[int32](5), - // MinReplicas: to.Ptr[int32](1), - // Rules: []*armappcontainers.ScaleRule{ - // { - // Name: to.Ptr("httpscalingrule"), - // HTTP: &armappcontainers.HTTPScaleRule{ - // Metadata: map[string]*string{ - // "concurrentRequests": to.Ptr("50"), - // }, - // }, - // }}, - // }, - // }, - // TrafficWeight: to.Ptr[int32](80), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json -func ExampleContainerAppsDiagnosticsClient_GetRevision() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewContainerAppsDiagnosticsClient().GetRevision(ctx, "rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", 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.Revision = armappcontainers.Revision{ - // Name: to.Ptr("testcontainerApp0-pjxhsye"), - // Type: to.Ptr("Microsoft.App/containerApps/revisions"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.AppcontainerApps/testcontainerApp0/revisions/testcontainerApp0-pjxhsye"), - // Properties: &armappcontainers.RevisionProperties{ - // Active: to.Ptr(true), - // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-24T21:24:22+00:00"); return t}()), - // Fqdn: to.Ptr("testcontainerApp0-pjxhsye.politehill-ab123456.eastus.azurecontainerapps.io"), - // LastActiveTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-24T21:24:22+00:00"); return t}()), - // Replicas: to.Ptr[int32](1), - // Template: &armappcontainers.Template{ - // Containers: []*armappcontainers.Container{ - // { - // Name: to.Ptr("testcontainerApp0"), - // Image: to.Ptr("repo/testcontainerApp0:v2"), - // Resources: &armappcontainers.ContainerResources{ - // CPU: to.Ptr[float64](0.2), - // Memory: to.Ptr("100Mi"), - // }, - // }}, - // Scale: &armappcontainers.Scale{ - // MaxReplicas: to.Ptr[int32](5), - // MinReplicas: to.Ptr[int32](1), - // Rules: []*armappcontainers.ScaleRule{ - // { - // Name: to.Ptr("httpscalingrule"), - // HTTP: &armappcontainers.HTTPScaleRule{ - // Metadata: map[string]*string{ - // "concurrentRequests": to.Ptr("50"), - // }, - // }, - // }}, - // }, - // }, - // TrafficWeight: to.Ptr[int32](80), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json -func ExampleContainerAppsDiagnosticsClient_GetRoot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewContainerAppsDiagnosticsClient().GetRoot(ctx, "rg", "testcontainerApp0", 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.ContainerApp = armappcontainers.ContainerApp{ - // Name: to.Ptr("testcontainerApp0"), - // Type: to.Ptr("Microsoft.App/containerApps"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/testcontainerApp0"), - // Location: to.Ptr("East US"), - // Properties: &armappcontainers.ContainerAppProperties{ - // Configuration: &armappcontainers.Configuration{ - // Dapr: &armappcontainers.Dapr{ - // AppPort: to.Ptr[int32](3000), - // AppProtocol: to.Ptr(armappcontainers.AppProtocolHTTP), - // EnableAPILogging: to.Ptr(true), - // Enabled: to.Ptr(true), - // HTTPMaxRequestSize: to.Ptr[int32](10), - // HTTPReadBufferSize: to.Ptr[int32](30), - // LogLevel: to.Ptr(armappcontainers.LogLevelDebug), - // }, - // Ingress: &armappcontainers.Ingress{ - // CustomDomains: []*armappcontainers.CustomDomain{ - // { - // Name: to.Ptr("www.my-name.com"), - // BindingType: to.Ptr(armappcontainers.BindingTypeSniEnabled), - // CertificateID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), - // }, - // { - // Name: to.Ptr("www.my--other-name.com"), - // BindingType: to.Ptr(armappcontainers.BindingTypeSniEnabled), - // CertificateID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"), - // }}, - // External: to.Ptr(true), - // Fqdn: to.Ptr("testcontainerApp0.demokube-t24clv0g.eastus.containerApps.k4apps.io"), - // IPSecurityRestrictions: []*armappcontainers.IPSecurityRestrictionRule{ - // { - // Name: to.Ptr("Allow work IP A subnet"), - // Description: to.Ptr("Allowing all IP's within the subnet below to access containerapp"), - // Action: to.Ptr(armappcontainers.ActionAllow), - // IPAddressRange: to.Ptr("192.168.1.1/32"), - // }, - // { - // Name: to.Ptr("Allow work IP B subnet"), - // Description: to.Ptr("Allowing all IP's within the subnet below to access containerapp"), - // Action: to.Ptr(armappcontainers.ActionAllow), - // IPAddressRange: to.Ptr("192.168.1.1/8"), - // }}, - // TargetPort: to.Ptr[int32](3000), - // Traffic: []*armappcontainers.TrafficWeight{ - // { - // RevisionName: to.Ptr("testcontainerApp0-ab1234"), - // Weight: to.Ptr[int32](80), - // }, - // { - // Label: to.Ptr("staging"), - // RevisionName: to.Ptr("testcontainerApp0-ab4321"), - // Weight: to.Ptr[int32](20), - // }}, - // Transport: to.Ptr(armappcontainers.IngressTransportMethodAuto), - // }, - // MaxInactiveRevisions: to.Ptr[int32](10), - // }, - // EventStreamEndpoint: to.Ptr("testEndpoint"), - // LatestRevisionFqdn: to.Ptr("testcontainerApp0-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io"), - // ManagedEnvironmentID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube"), - // ProvisioningState: to.Ptr(armappcontainers.ContainerAppProvisioningStateSucceeded), - // Template: &armappcontainers.Template{ - // Containers: []*armappcontainers.Container{ - // { - // Name: to.Ptr("testcontainerApp0"), - // Image: to.Ptr("repo/testcontainerApp0:v4"), - // Resources: &armappcontainers.ContainerResources{ - // CPU: to.Ptr[float64](0.2), - // Memory: to.Ptr("100Mi"), - // }, - // }}, - // InitContainers: []*armappcontainers.InitContainer{ - // { - // Name: to.Ptr("testinitcontainerApp0"), - // Image: to.Ptr("repo/testcontainerApp0:v4"), - // Resources: &armappcontainers.ContainerResources{ - // CPU: to.Ptr[float64](0.2), - // Memory: to.Ptr("100Mi"), - // }, - // }}, - // Scale: &armappcontainers.Scale{ - // MaxReplicas: to.Ptr[int32](5), - // MinReplicas: to.Ptr[int32](1), - // Rules: []*armappcontainers.ScaleRule{ - // { - // Name: to.Ptr("httpscalingrule"), - // HTTP: &armappcontainers.HTTPScaleRule{ - // Metadata: map[string]*string{ - // "concurrentRequests": to.Ptr("50"), - // }, - // }, - // }}, - // }, - // }, - // WorkloadProfileType: to.Ptr("GeneralPurpose"), - // }, - // } -} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisionreplicas_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisionreplicas_client.go index 40fdfdce532c..fe9d32a80612 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisionreplicas_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisionreplicas_client.go @@ -47,7 +47,7 @@ func NewContainerAppsRevisionReplicasClient(subscriptionID string, credential az // GetReplica - Get a replica for a Container App Revision. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. @@ -97,7 +97,7 @@ func (client *ContainerAppsRevisionReplicasClient) getReplicaCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -115,7 +115,7 @@ func (client *ContainerAppsRevisionReplicasClient) getReplicaHandleResponse(resp // ListReplicas - List replicas for a Container App Revision. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. @@ -160,7 +160,7 @@ func (client *ContainerAppsRevisionReplicasClient) listReplicasCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisionreplicas_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisionreplicas_client_example_test.go index 278474732cdc..b5b860980ff6 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisionreplicas_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisionreplicas_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Replicas_Get.json func ExampleContainerAppsRevisionReplicasClient_GetReplica() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -44,8 +44,6 @@ func ExampleContainerAppsRevisionReplicasClient_GetReplica() { // { // Name: to.Ptr("hello92"), // ContainerID: to.Ptr("containerd://6bac7bb3afed1c704b5fe563c34c0ecf59ac30c766bb73488f7fa552dc42ee54"), - // ExecEndpoint: to.Ptr("testExecEndpoint"), - // LogStreamEndpoint: to.Ptr("testLogStreamEndpoint"), // Ready: to.Ptr(true), // RestartCount: to.Ptr[int32](0), // Started: to.Ptr(true), @@ -55,7 +53,7 @@ func ExampleContainerAppsRevisionReplicasClient_GetReplica() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Replicas_List.json func ExampleContainerAppsRevisionReplicasClient_ListReplicas() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -84,8 +82,6 @@ func ExampleContainerAppsRevisionReplicasClient_ListReplicas() { // { // Name: to.Ptr("hello92"), // ContainerID: to.Ptr("containerd://6bac7bb3afed1c704b5fe563c34c0ecf59ac30c766bb73488f7fa552dc42ee54"), - // ExecEndpoint: to.Ptr("testExecEndpoint"), - // LogStreamEndpoint: to.Ptr("testLogStreamEndpoint"), // Ready: to.Ptr(true), // RestartCount: to.Ptr[int32](0), // Started: to.Ptr(true), diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisions_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisions_client.go index e3405791f53c..2a5a3367420f 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisions_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisions_client.go @@ -47,7 +47,7 @@ func NewContainerAppsRevisionsClient(subscriptionID string, credential azcore.To // ActivateRevision - Activates a revision for a Container App // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. @@ -92,7 +92,7 @@ func (client *ContainerAppsRevisionsClient) activateRevisionCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -101,7 +101,7 @@ func (client *ContainerAppsRevisionsClient) activateRevisionCreateRequest(ctx co // DeactivateRevision - Deactivates a revision for a Container App // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. @@ -146,7 +146,7 @@ func (client *ContainerAppsRevisionsClient) deactivateRevisionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -155,7 +155,7 @@ func (client *ContainerAppsRevisionsClient) deactivateRevisionCreateRequest(ctx // GetRevision - Get a revision of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. @@ -200,7 +200,7 @@ func (client *ContainerAppsRevisionsClient) getRevisionCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -217,7 +217,7 @@ func (client *ContainerAppsRevisionsClient) getRevisionHandleResponse(resp *http // NewListRevisionsPager - Get the Revisions for a given Container App. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App for which Revisions are needed. // - options - ContainerAppsRevisionsClientListRevisionsOptions contains the optional parameters for the ContainerAppsRevisionsClient.NewListRevisionsPager @@ -270,7 +270,7 @@ func (client *ContainerAppsRevisionsClient) listRevisionsCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } @@ -291,7 +291,7 @@ func (client *ContainerAppsRevisionsClient) listRevisionsHandleResponse(resp *ht // RestartRevision - Restarts a revision for a Container App // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. @@ -336,7 +336,7 @@ func (client *ContainerAppsRevisionsClient) restartRevisionCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisions_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisions_client_example_test.go index 4568aeb7cd06..2664ec7967f3 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisions_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisions_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_List.json func ExampleContainerAppsRevisionsClient_NewListRevisionsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -48,8 +48,7 @@ func ExampleContainerAppsRevisionsClient_NewListRevisionsPager() { // Properties: &armappcontainers.RevisionProperties{ // Active: to.Ptr(true), // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-24T21:24:22+00:00"); return t}()), - // Fqdn: to.Ptr("testcontainerApp0-pjxhsye.politehill-ab123456.eastus.azurecontainerapps.io"), - // LastActiveTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-24T21:24:22+00:00"); return t}()), + // Fqdn: to.Ptr("testcontainerApp0-pjxhsye.demokube-t24clv0g.eastus.containerapps.k4apps.io"), // Replicas: to.Ptr[int32](1), // Template: &armappcontainers.Template{ // Containers: []*armappcontainers.Container{ @@ -75,14 +74,13 @@ func ExampleContainerAppsRevisionsClient_NewListRevisionsPager() { // }}, // }, // }, - // TrafficWeight: to.Ptr[int32](80), // }, // }}, // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Get.json func ExampleContainerAppsRevisionsClient_GetRevision() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -107,8 +105,7 @@ func ExampleContainerAppsRevisionsClient_GetRevision() { // Properties: &armappcontainers.RevisionProperties{ // Active: to.Ptr(true), // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-24T21:24:22+00:00"); return t}()), - // Fqdn: to.Ptr("testcontainerApp0-pjxhsye.politehill-ab123456.eastus.azurecontainerapps.io"), - // LastActiveTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-24T21:24:22+00:00"); return t}()), + // Fqdn: to.Ptr("testcontainerApp0-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io"), // Replicas: to.Ptr[int32](1), // Template: &armappcontainers.Template{ // Containers: []*armappcontainers.Container{ @@ -134,12 +131,11 @@ func ExampleContainerAppsRevisionsClient_GetRevision() { // }}, // }, // }, - // TrafficWeight: to.Ptr[int32](80), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Activate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Activate.json func ExampleContainerAppsRevisionsClient_ActivateRevision() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -156,7 +152,7 @@ func ExampleContainerAppsRevisionsClient_ActivateRevision() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Deactivate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Deactivate.json func ExampleContainerAppsRevisionsClient_DeactivateRevision() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -173,7 +169,7 @@ func ExampleContainerAppsRevisionsClient_DeactivateRevision() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Restart.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Restart.json func ExampleContainerAppsRevisionsClient_RestartRevision() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerappssourcecontrols_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerappssourcecontrols_client.go index 6bf4f260ece1..a1491cb93d6b 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/containerappssourcecontrols_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/containerappssourcecontrols_client.go @@ -47,7 +47,7 @@ func NewContainerAppsSourceControlsClient(subscriptionID string, credential azco // BeginCreateOrUpdate - Create or update the SourceControl for a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - sourceControlName - Name of the Container App SourceControl. @@ -69,7 +69,7 @@ func (client *ContainerAppsSourceControlsClient) BeginCreateOrUpdate(ctx context // CreateOrUpdate - Create or update the SourceControl for a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 func (client *ContainerAppsSourceControlsClient) createOrUpdate(ctx context.Context, resourceGroupName string, containerAppName string, sourceControlName string, sourceControlEnvelope SourceControl, options *ContainerAppsSourceControlsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, options) if err != nil { @@ -79,7 +79,7 @@ func (client *ContainerAppsSourceControlsClient) createOrUpdate(ctx context.Cont if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { return nil, runtime.NewResponseError(resp) } return resp, nil @@ -109,7 +109,7 @@ func (client *ContainerAppsSourceControlsClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, sourceControlEnvelope) @@ -118,7 +118,7 @@ func (client *ContainerAppsSourceControlsClient) createOrUpdateCreateRequest(ctx // BeginDelete - Delete a Container App SourceControl. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - sourceControlName - Name of the Container App SourceControl. @@ -139,7 +139,7 @@ func (client *ContainerAppsSourceControlsClient) BeginDelete(ctx context.Context // Delete - Delete a Container App SourceControl. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 func (client *ContainerAppsSourceControlsClient) deleteOperation(ctx context.Context, resourceGroupName string, containerAppName string, sourceControlName string, options *ContainerAppsSourceControlsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, containerAppName, sourceControlName, options) if err != nil { @@ -179,7 +179,7 @@ func (client *ContainerAppsSourceControlsClient) deleteCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ func (client *ContainerAppsSourceControlsClient) deleteCreateRequest(ctx context // Get - Get a SourceControl of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - sourceControlName - Name of the Container App SourceControl. @@ -233,7 +233,7 @@ func (client *ContainerAppsSourceControlsClient) getCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -250,7 +250,7 @@ func (client *ContainerAppsSourceControlsClient) getHandleResponse(resp *http.Re // NewListByContainerAppPager - Get the Container App SourceControls in a given resource group. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsSourceControlsClientListByContainerAppOptions contains the optional parameters for the ContainerAppsSourceControlsClient.NewListByContainerAppPager @@ -303,7 +303,7 @@ func (client *ContainerAppsSourceControlsClient) listByContainerAppCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerappssourcecontrols_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerappssourcecontrols_client_example_test.go index 71fdc0c40365..0d9ab9d1e06d 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/containerappssourcecontrols_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/containerappssourcecontrols_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/appcontainers/armappcontainers/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_ListByContainer.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_ListByContainer.json func ExampleContainerAppsSourceControlsClient_NewListByContainerAppPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -63,7 +63,7 @@ func ExampleContainerAppsSourceControlsClient_NewListByContainerAppPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_Get.json func ExampleContainerAppsSourceControlsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -100,7 +100,7 @@ func ExampleContainerAppsSourceControlsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_CreateOrUpdate.json func ExampleContainerAppsSourceControlsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -161,7 +161,7 @@ func ExampleContainerAppsSourceControlsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_Delete.json func ExampleContainerAppsSourceControlsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/daprcomponents_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/daprcomponents_client.go index c7f462db5223..594f1f644746 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/daprcomponents_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/daprcomponents_client.go @@ -47,7 +47,7 @@ func NewDaprComponentsClient(subscriptionID string, credential azcore.TokenCrede // CreateOrUpdate - Creates or updates a Dapr Component in a Managed Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - componentName - Name of the Dapr Component. @@ -93,7 +93,7 @@ func (client *DaprComponentsClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, daprComponentEnvelope) @@ -111,7 +111,7 @@ func (client *DaprComponentsClient) createOrUpdateHandleResponse(resp *http.Resp // Delete - Delete a Dapr Component from a Managed Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - componentName - Name of the Dapr Component. @@ -155,7 +155,7 @@ func (client *DaprComponentsClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -164,7 +164,7 @@ func (client *DaprComponentsClient) deleteCreateRequest(ctx context.Context, res // Get - Get a dapr component. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - componentName - Name of the Dapr Component. @@ -208,7 +208,7 @@ func (client *DaprComponentsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -225,7 +225,7 @@ func (client *DaprComponentsClient) getHandleResponse(resp *http.Response) (Dapr // NewListPager - Get the Dapr Components for a managed environment. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - options - DaprComponentsClientListOptions contains the optional parameters for the DaprComponentsClient.NewListPager method. @@ -277,7 +277,7 @@ func (client *DaprComponentsClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -295,7 +295,7 @@ func (client *DaprComponentsClient) listHandleResponse(resp *http.Response) (Dap // ListSecrets - List secrets for a dapr component // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - componentName - Name of the Dapr Component. @@ -340,7 +340,7 @@ func (client *DaprComponentsClient) listSecretsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/daprcomponents_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/daprcomponents_client_example_test.go index 4e4da479598a..8a23aea3967d 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/daprcomponents_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/daprcomponents_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/appcontainers/armappcontainers/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_List.json func ExampleDaprComponentsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -76,129 +76,13 @@ func ExampleDaprComponentsClient_NewListPager() { // }}, // Version: to.Ptr("v1"), // }, - // }, - // { - // Name: to.Ptr("vaultdog"), - // Type: to.Ptr("Microsoft.App/managedEnvironments/daprcomponents"), - // ID: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/daprcomponents/vaultdog"), - // Properties: &armappcontainers.DaprComponentProperties{ - // ComponentType: to.Ptr("state.azure.cosmosdb"), - // IgnoreErrors: to.Ptr(false), - // InitTimeout: to.Ptr("50s"), - // Metadata: []*armappcontainers.DaprMetadata{ - // { - // Name: to.Ptr("url"), - // Value: to.Ptr(""), - // }, - // { - // Name: to.Ptr("database"), - // Value: to.Ptr("itemsDB"), - // }, - // { - // Name: to.Ptr("collection"), - // Value: to.Ptr("items"), - // }, - // { - // Name: to.Ptr("masterkey"), - // SecretRef: to.Ptr("masterkey"), - // }}, - // Scopes: []*string{ - // to.Ptr("container-app-1"), - // to.Ptr("container-app-2")}, - // SecretStoreComponent: to.Ptr("my-secret-store"), - // Version: to.Ptr("v1"), - // }, - // }, - // { - // Name: to.Ptr("vaultdog"), - // Type: to.Ptr("Microsoft.App/managedEnvironments/daprcomponents"), - // ID: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/daprcomponents/vaultdog"), - // Properties: &armappcontainers.DaprComponentProperties{ - // ComponentType: to.Ptr("state.azure.cosmosdb"), - // IgnoreErrors: to.Ptr(false), - // InitTimeout: to.Ptr("50s"), - // Metadata: []*armappcontainers.DaprMetadata{ - // { - // Name: to.Ptr("url"), - // SecretRef: to.Ptr("cosmosdb/url"), - // }, - // { - // Name: to.Ptr("database"), - // Value: to.Ptr("itemsDB"), - // }, - // { - // Name: to.Ptr("collection"), - // Value: to.Ptr("items"), - // }, - // { - // Name: to.Ptr("masterkey"), - // SecretRef: to.Ptr("cosmosdb/masterkey"), - // }}, - // Scopes: []*string{ - // to.Ptr("container-app-1"), - // to.Ptr("container-app-2")}, - // SecretStoreComponent: to.Ptr("my-secret-store"), - // Version: to.Ptr("v1"), - // }, - // }}, - // } + // }}, + // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json -func ExampleDaprComponentsClient_Get_getDaprComponentWithSecretStoreComponent() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDaprComponentsClient().Get(ctx, "examplerg", "myenvironment", "reddog", 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.DaprComponent = armappcontainers.DaprComponent{ - // Name: to.Ptr("reddog"), - // Type: to.Ptr("Microsoft.App/managedEnvironments/daprcomponents"), - // ID: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/jlaw-demo1/daprcomponents/reddog"), - // Properties: &armappcontainers.DaprComponentProperties{ - // ComponentType: to.Ptr("state.azure.cosmosdb"), - // IgnoreErrors: to.Ptr(false), - // InitTimeout: to.Ptr("50s"), - // Metadata: []*armappcontainers.DaprMetadata{ - // { - // Name: to.Ptr("url"), - // Value: to.Ptr(""), - // }, - // { - // Name: to.Ptr("database"), - // Value: to.Ptr("itemsDB"), - // }, - // { - // Name: to.Ptr("collection"), - // Value: to.Ptr("items"), - // }, - // { - // Name: to.Ptr("masterkey"), - // SecretRef: to.Ptr("masterkey"), - // }}, - // Scopes: []*string{ - // to.Ptr("container-app-1"), - // to.Ptr("container-app-2")}, - // SecretStoreComponent: to.Ptr("my-secret-store"), - // Version: to.Ptr("v1"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_Secrets.json -func ExampleDaprComponentsClient_Get_getDaprComponentWithSecrets() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_Get.json +func ExampleDaprComponentsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -252,88 +136,8 @@ func ExampleDaprComponentsClient_Get_getDaprComponentWithSecrets() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json -func ExampleDaprComponentsClient_CreateOrUpdate_createOrUpdateDaprComponentWithSecretStoreComponent() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDaprComponentsClient().CreateOrUpdate(ctx, "examplerg", "myenvironment", "reddog", armappcontainers.DaprComponent{ - Properties: &armappcontainers.DaprComponentProperties{ - ComponentType: to.Ptr("state.azure.cosmosdb"), - IgnoreErrors: to.Ptr(false), - InitTimeout: to.Ptr("50s"), - Metadata: []*armappcontainers.DaprMetadata{ - { - Name: to.Ptr("url"), - Value: to.Ptr(""), - }, - { - Name: to.Ptr("database"), - Value: to.Ptr("itemsDB"), - }, - { - Name: to.Ptr("collection"), - Value: to.Ptr("items"), - }, - { - Name: to.Ptr("masterkey"), - SecretRef: to.Ptr("masterkey"), - }}, - Scopes: []*string{ - to.Ptr("container-app-1"), - to.Ptr("container-app-2")}, - SecretStoreComponent: to.Ptr("my-secret-store"), - Version: to.Ptr("v1"), - }, - }, 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.DaprComponent = armappcontainers.DaprComponent{ - // Name: to.Ptr("reddog"), - // Type: to.Ptr("Microsoft.App/managedEnvironments/daprcomponents"), - // ID: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/jlaw-demo1/daprcomponents/reddog"), - // Properties: &armappcontainers.DaprComponentProperties{ - // ComponentType: to.Ptr("state.azure.cosmosdb"), - // IgnoreErrors: to.Ptr(false), - // InitTimeout: to.Ptr("50s"), - // Metadata: []*armappcontainers.DaprMetadata{ - // { - // Name: to.Ptr("url"), - // Value: to.Ptr(""), - // }, - // { - // Name: to.Ptr("database"), - // Value: to.Ptr("itemsDB"), - // }, - // { - // Name: to.Ptr("collection"), - // Value: to.Ptr("items"), - // }, - // { - // Name: to.Ptr("masterkey"), - // SecretRef: to.Ptr("masterkey"), - // }}, - // Scopes: []*string{ - // to.Ptr("container-app-1"), - // to.Ptr("container-app-2")}, - // SecretStoreComponent: to.Ptr("my-secret-store"), - // Version: to.Ptr("v1"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json -func ExampleDaprComponentsClient_CreateOrUpdate_createOrUpdateDaprComponentWithSecrets() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_CreateOrUpdate.json +func ExampleDaprComponentsClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -419,7 +223,7 @@ func ExampleDaprComponentsClient_CreateOrUpdate_createOrUpdateDaprComponentWithS // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_Delete.json func ExampleDaprComponentsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -436,7 +240,7 @@ func ExampleDaprComponentsClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_ListSecrets.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_ListSecrets.json func ExampleDaprComponentsClient_ListSecrets() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/go.mod b/sdk/resourcemanager/appcontainers/armappcontainers/go.mod index 10ebb376c6ad..5298666e65e1 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/go.mod +++ b/sdk/resourcemanager/appcontainers/armappcontainers/go.mod @@ -1,4 +1,4 @@ -module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2 +module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers go 1.18 diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentdiagnostics_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentdiagnostics_client.go deleted file mode 100644 index a483ed1b90da..000000000000 --- a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentdiagnostics_client.go +++ /dev/null @@ -1,166 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappcontainers - -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" -) - -// ManagedEnvironmentDiagnosticsClient contains the methods for the ManagedEnvironmentDiagnostics group. -// Don't use this type directly, use NewManagedEnvironmentDiagnosticsClient() instead. -type ManagedEnvironmentDiagnosticsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewManagedEnvironmentDiagnosticsClient creates a new instance of ManagedEnvironmentDiagnosticsClient with the specified values. -// - subscriptionID - The ID of the target subscription. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewManagedEnvironmentDiagnosticsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedEnvironmentDiagnosticsClient, error) { - cl, err := arm.NewClient(moduleName+".ManagedEnvironmentDiagnosticsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &ManagedEnvironmentDiagnosticsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// GetDetector - Get the diagnostics data for a Managed Environment used to host container apps. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - environmentName - Name of the Environment. -// - detectorName - Name of the Managed Environment detector. -// - options - ManagedEnvironmentDiagnosticsClientGetDetectorOptions contains the optional parameters for the ManagedEnvironmentDiagnosticsClient.GetDetector -// method. -func (client *ManagedEnvironmentDiagnosticsClient) GetDetector(ctx context.Context, resourceGroupName string, environmentName string, detectorName string, options *ManagedEnvironmentDiagnosticsClientGetDetectorOptions) (ManagedEnvironmentDiagnosticsClientGetDetectorResponse, error) { - req, err := client.getDetectorCreateRequest(ctx, resourceGroupName, environmentName, detectorName, options) - if err != nil { - return ManagedEnvironmentDiagnosticsClientGetDetectorResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagedEnvironmentDiagnosticsClientGetDetectorResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedEnvironmentDiagnosticsClientGetDetectorResponse{}, runtime.NewResponseError(resp) - } - return client.getDetectorHandleResponse(resp) -} - -// getDetectorCreateRequest creates the GetDetector request. -func (client *ManagedEnvironmentDiagnosticsClient) getDetectorCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, detectorName string, options *ManagedEnvironmentDiagnosticsClientGetDetectorOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/detectors/{detectorName}" - 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 environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - if detectorName == "" { - return nil, errors.New("parameter detectorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{detectorName}", url.PathEscape(detectorName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getDetectorHandleResponse handles the GetDetector response. -func (client *ManagedEnvironmentDiagnosticsClient) getDetectorHandleResponse(resp *http.Response) (ManagedEnvironmentDiagnosticsClientGetDetectorResponse, error) { - result := ManagedEnvironmentDiagnosticsClientGetDetectorResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Diagnostics); err != nil { - return ManagedEnvironmentDiagnosticsClientGetDetectorResponse{}, err - } - return result, nil -} - -// ListDetectors - Get the list of diagnostics for a Managed Environment used to host container apps. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - environmentName - Name of the Environment. -// - options - ManagedEnvironmentDiagnosticsClientListDetectorsOptions contains the optional parameters for the ManagedEnvironmentDiagnosticsClient.ListDetectors -// method. -func (client *ManagedEnvironmentDiagnosticsClient) ListDetectors(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedEnvironmentDiagnosticsClientListDetectorsOptions) (ManagedEnvironmentDiagnosticsClientListDetectorsResponse, error) { - req, err := client.listDetectorsCreateRequest(ctx, resourceGroupName, environmentName, options) - if err != nil { - return ManagedEnvironmentDiagnosticsClientListDetectorsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagedEnvironmentDiagnosticsClientListDetectorsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedEnvironmentDiagnosticsClientListDetectorsResponse{}, runtime.NewResponseError(resp) - } - return client.listDetectorsHandleResponse(resp) -} - -// listDetectorsCreateRequest creates the ListDetectors request. -func (client *ManagedEnvironmentDiagnosticsClient) listDetectorsCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedEnvironmentDiagnosticsClientListDetectorsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/detectors" - 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 environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listDetectorsHandleResponse handles the ListDetectors response. -func (client *ManagedEnvironmentDiagnosticsClient) listDetectorsHandleResponse(resp *http.Response) (ManagedEnvironmentDiagnosticsClientListDetectorsResponse, error) { - result := ManagedEnvironmentDiagnosticsClientListDetectorsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticsCollection); err != nil { - return ManagedEnvironmentDiagnosticsClientListDetectorsResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentdiagnostics_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentdiagnostics_client_example_test.go deleted file mode 100644 index 2253666773a6..000000000000 --- a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentdiagnostics_client_example_test.go +++ /dev/null @@ -1,135 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappcontainers_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_List.json -func ExampleManagedEnvironmentDiagnosticsClient_ListDetectors() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagedEnvironmentDiagnosticsClient().ListDetectors(ctx, "mikono-workerapp-test-rg", "mikonokubeenv", 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.DiagnosticsCollection = armappcontainers.DiagnosticsCollection{ - // Value: []*armappcontainers.Diagnostics{ - // { - // Name: to.Ptr("ManagedEnvAvailabilityMetrics"), - // Type: to.Ptr("Microsoft.App/managedEnvironments/detectors"), - // ID: to.Ptr("/subscriptions/f07f3711-b45e-40fe-a941-4e6d93f851e6/resourceGroups/mikono-workerapp-test-rg/providers/Microsoft.App/managedEnvironments/mikonokubeenv/detectors/ManagedEnvAvailabilityMetrics"), - // Properties: &armappcontainers.DiagnosticsProperties{ - // Dataset: []*armappcontainers.DiagnosticsDataAPIResponse{ - // }, - // Metadata: &armappcontainers.DiagnosticsDefinition{ - // Name: to.Ptr("Availability Metrics for Managed Environments"), - // Type: to.Ptr("Analysis"), - // Author: to.Ptr(""), - // Category: to.Ptr("Availability and Performance"), - // ID: to.Ptr("ManagedEnvAvailabilityMetrics"), - // Score: to.Ptr[float32](0), - // SupportTopicList: []*armappcontainers.DiagnosticSupportTopic{ - // }, - // }, - // Status: &armappcontainers.DiagnosticsStatus{ - // StatusID: to.Ptr[int32](4), - // }, - // }, - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json -func ExampleManagedEnvironmentDiagnosticsClient_GetDetector() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagedEnvironmentDiagnosticsClient().GetDetector(ctx, "mikono-workerapp-test-rg", "mikonokubeenv", "ManagedEnvAvailabilityMetrics", 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.Diagnostics = armappcontainers.Diagnostics{ - // Name: to.Ptr("ManagedEnvAvailabilityMetrics"), - // Type: to.Ptr("Microsoft.App/managedEnvironments/detectors"), - // ID: to.Ptr("/subscriptions/f07f3711-b45e-40fe-a941-4e6d93f851e6/resourceGroups/mikono-workerapp-test-rg/providers/Microsoft.App/managedEnvironments/mikonokubeenv/detectors/ManagedEnvAvailabilityMetrics"), - // Properties: &armappcontainers.DiagnosticsProperties{ - // Dataset: []*armappcontainers.DiagnosticsDataAPIResponse{ - // { - // RenderingProperties: &armappcontainers.DiagnosticRendering{ - // Type: to.Ptr[int32](8), - // Description: to.Ptr(""), - // IsVisible: to.Ptr(true), - // Title: to.Ptr("Managed Environment Network Inbound "), - // }, - // Table: &armappcontainers.DiagnosticDataTableResponseObject{ - // Columns: []*armappcontainers.DiagnosticDataTableResponseColumn{ - // { - // ColumnName: to.Ptr("TimeStamp"), - // DataType: to.Ptr("DateTime"), - // }, - // { - // ColumnName: to.Ptr("Metric"), - // DataType: to.Ptr("String"), - // }, - // { - // ColumnName: to.Ptr("Average"), - // DataType: to.Ptr("Double"), - // }}, - // Rows: []any{ - // []any{ - // "2022-03-15T21:35:00", - // "RxBytes", - // float64(0), - // }}, - // TableName: to.Ptr(""), - // }, - // }}, - // Metadata: &armappcontainers.DiagnosticsDefinition{ - // Name: to.Ptr("Managed Env Netowrk Inbound and Outbound"), - // Type: to.Ptr("Detector"), - // Description: to.Ptr("This detector shows the Managed Environment Network Inbound and Outbound."), - // Author: to.Ptr(""), - // Category: to.Ptr("Availability and Performance"), - // ID: to.Ptr("ManagedEnvAvailabilityMetrics"), - // Score: to.Ptr[float32](0), - // SupportTopicList: []*armappcontainers.DiagnosticSupportTopic{ - // }, - // }, - // Status: &armappcontainers.DiagnosticsStatus{ - // StatusID: to.Ptr[int32](3), - // }, - // }, - // } -} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironments_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironments_client.go index 52fa5865aa89..8975067a2c15 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironments_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironments_client.go @@ -47,7 +47,7 @@ func NewManagedEnvironmentsClient(subscriptionID string, credential azcore.Token // BeginCreateOrUpdate - Creates or updates a Managed Environment used to host container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - environmentEnvelope - Configuration details of the Environment. @@ -68,7 +68,7 @@ func (client *ManagedEnvironmentsClient) BeginCreateOrUpdate(ctx context.Context // CreateOrUpdate - Creates or updates a Managed Environment used to host container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 func (client *ManagedEnvironmentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, environmentName string, environmentEnvelope ManagedEnvironment, options *ManagedEnvironmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, environmentName, environmentEnvelope, options) if err != nil { @@ -104,7 +104,7 @@ func (client *ManagedEnvironmentsClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, environmentEnvelope) @@ -113,7 +113,7 @@ func (client *ManagedEnvironmentsClient) createOrUpdateCreateRequest(ctx context // BeginDelete - Delete a Managed Environment if it does not have any container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - options - ManagedEnvironmentsClientBeginDeleteOptions contains the optional parameters for the ManagedEnvironmentsClient.BeginDelete @@ -133,7 +133,7 @@ func (client *ManagedEnvironmentsClient) BeginDelete(ctx context.Context, resour // Delete - Delete a Managed Environment if it does not have any container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 func (client *ManagedEnvironmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedEnvironmentsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, environmentName, options) if err != nil { @@ -169,7 +169,7 @@ func (client *ManagedEnvironmentsClient) deleteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -178,7 +178,7 @@ func (client *ManagedEnvironmentsClient) deleteCreateRequest(ctx context.Context // Get - Get the properties of a Managed Environment used to host container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - options - ManagedEnvironmentsClientGetOptions contains the optional parameters for the ManagedEnvironmentsClient.Get method. @@ -217,7 +217,7 @@ func (client *ManagedEnvironmentsClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -232,67 +232,9 @@ func (client *ManagedEnvironmentsClient) getHandleResponse(resp *http.Response) return result, nil } -// GetAuthToken - Checks if resource name is available. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - environmentName - Name of the Managed Environment. -// - options - ManagedEnvironmentsClientGetAuthTokenOptions contains the optional parameters for the ManagedEnvironmentsClient.GetAuthToken -// method. -func (client *ManagedEnvironmentsClient) GetAuthToken(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedEnvironmentsClientGetAuthTokenOptions) (ManagedEnvironmentsClientGetAuthTokenResponse, error) { - req, err := client.getAuthTokenCreateRequest(ctx, resourceGroupName, environmentName, options) - if err != nil { - return ManagedEnvironmentsClientGetAuthTokenResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagedEnvironmentsClientGetAuthTokenResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedEnvironmentsClientGetAuthTokenResponse{}, runtime.NewResponseError(resp) - } - return client.getAuthTokenHandleResponse(resp) -} - -// getAuthTokenCreateRequest creates the GetAuthToken request. -func (client *ManagedEnvironmentsClient) getAuthTokenCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedEnvironmentsClientGetAuthTokenOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/getAuthtoken" - 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 environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getAuthTokenHandleResponse handles the GetAuthToken response. -func (client *ManagedEnvironmentsClient) getAuthTokenHandleResponse(resp *http.Response) (ManagedEnvironmentsClientGetAuthTokenResponse, error) { - result := ManagedEnvironmentsClientGetAuthTokenResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.EnvironmentAuthToken); err != nil { - return ManagedEnvironmentsClientGetAuthTokenResponse{}, err - } - return result, nil -} - // NewListByResourceGroupPager - Get all the Managed Environments in a resource group. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - ManagedEnvironmentsClientListByResourceGroupOptions contains the optional parameters for the ManagedEnvironmentsClient.NewListByResourceGroupPager // method. @@ -340,7 +282,7 @@ func (client *ManagedEnvironmentsClient) listByResourceGroupCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -357,7 +299,7 @@ func (client *ManagedEnvironmentsClient) listByResourceGroupHandleResponse(resp // NewListBySubscriptionPager - Get all Managed Environments for a subscription. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - options - ManagedEnvironmentsClientListBySubscriptionOptions contains the optional parameters for the ManagedEnvironmentsClient.NewListBySubscriptionPager // method. func (client *ManagedEnvironmentsClient) NewListBySubscriptionPager(options *ManagedEnvironmentsClientListBySubscriptionOptions) *runtime.Pager[ManagedEnvironmentsClientListBySubscriptionResponse] { @@ -400,7 +342,7 @@ func (client *ManagedEnvironmentsClient) listBySubscriptionCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -415,80 +357,10 @@ func (client *ManagedEnvironmentsClient) listBySubscriptionHandleResponse(resp * return result, nil } -// NewListWorkloadProfileStatesPager - Get all workload Profile States for a Premium Managed Environment. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - environmentName - Name of the Managed Environment. -// - options - ManagedEnvironmentsClientListWorkloadProfileStatesOptions contains the optional parameters for the ManagedEnvironmentsClient.NewListWorkloadProfileStatesPager -// method. -func (client *ManagedEnvironmentsClient) NewListWorkloadProfileStatesPager(resourceGroupName string, environmentName string, options *ManagedEnvironmentsClientListWorkloadProfileStatesOptions) *runtime.Pager[ManagedEnvironmentsClientListWorkloadProfileStatesResponse] { - return runtime.NewPager(runtime.PagingHandler[ManagedEnvironmentsClientListWorkloadProfileStatesResponse]{ - More: func(page ManagedEnvironmentsClientListWorkloadProfileStatesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ManagedEnvironmentsClientListWorkloadProfileStatesResponse) (ManagedEnvironmentsClientListWorkloadProfileStatesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listWorkloadProfileStatesCreateRequest(ctx, resourceGroupName, environmentName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ManagedEnvironmentsClientListWorkloadProfileStatesResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagedEnvironmentsClientListWorkloadProfileStatesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedEnvironmentsClientListWorkloadProfileStatesResponse{}, runtime.NewResponseError(resp) - } - return client.listWorkloadProfileStatesHandleResponse(resp) - }, - }) -} - -// listWorkloadProfileStatesCreateRequest creates the ListWorkloadProfileStates request. -func (client *ManagedEnvironmentsClient) listWorkloadProfileStatesCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedEnvironmentsClientListWorkloadProfileStatesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/workloadProfileStates" - 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 environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listWorkloadProfileStatesHandleResponse handles the ListWorkloadProfileStates response. -func (client *ManagedEnvironmentsClient) listWorkloadProfileStatesHandleResponse(resp *http.Response) (ManagedEnvironmentsClientListWorkloadProfileStatesResponse, error) { - result := ManagedEnvironmentsClientListWorkloadProfileStatesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WorkloadProfileStatesCollection); err != nil { - return ManagedEnvironmentsClientListWorkloadProfileStatesResponse{}, err - } - return result, nil -} - // BeginUpdate - Patches a Managed Environment using JSON Merge Patch // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - environmentEnvelope - Configuration details of the Environment. @@ -509,7 +381,7 @@ func (client *ManagedEnvironmentsClient) BeginUpdate(ctx context.Context, resour // Update - Patches a Managed Environment using JSON Merge Patch // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 func (client *ManagedEnvironmentsClient) update(ctx context.Context, resourceGroupName string, environmentName string, environmentEnvelope ManagedEnvironment, options *ManagedEnvironmentsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, environmentName, environmentEnvelope, options) if err != nil { @@ -545,7 +417,7 @@ func (client *ManagedEnvironmentsClient) updateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, environmentEnvelope) diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironments_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironments_client_example_test.go index 93157f26f40d..333d2f441f58 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironments_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironments_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/appcontainers/armappcontainers/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_ListBySubscription.json func ExampleManagedEnvironmentsClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -50,44 +50,11 @@ func ExampleManagedEnvironmentsClient_NewListBySubscriptionPager() { // Tags: map[string]*string{ // }, // Properties: &armappcontainers.ManagedEnvironmentProperties{ - // CustomDomainConfiguration: &armappcontainers.CustomDomainConfiguration{ - // CustomDomainVerificationID: to.Ptr("custom domain verification id"), - // DNSSuffix: to.Ptr("www.my-name.com"), - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-06T04:00:00Z"); return t}()), - // SubjectName: to.Ptr("CN=www.my-name.com"), - // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), - // }, // DefaultDomain: to.Ptr("jlaw-demo1.k4apps.io"), - // EventStreamEndpoint: to.Ptr("testEndpoint"), // ProvisioningState: to.Ptr(armappcontainers.EnvironmentProvisioningStateSucceeded), // StaticIP: to.Ptr("20.42.33.145"), - // VnetConfiguration: &armappcontainers.VnetConfiguration{ - // OutboundSettings: &armappcontainers.ManagedEnvironmentOutboundSettings{ - // OutBoundType: to.Ptr(armappcontainers.ManagedEnvironmentOutBoundTypeUserDefinedRouting), - // VirtualNetworkApplianceIP: to.Ptr("192.168.1.20"), - // }, - // }, - // WorkloadProfiles: []*armappcontainers.WorkloadProfile{ - // { - // MaximumCount: to.Ptr[int32](12), - // MinimumCount: to.Ptr[int32](3), - // WorkloadProfileType: to.Ptr("GeneralPurpose"), - // }, - // { - // MaximumCount: to.Ptr[int32](6), - // MinimumCount: to.Ptr[int32](3), - // WorkloadProfileType: to.Ptr("MemoryOptimized"), - // }, - // { - // MaximumCount: to.Ptr[int32](6), - // MinimumCount: to.Ptr[int32](3), - // WorkloadProfileType: to.Ptr("ComputeOptimized"), - // }}, // ZoneRedundant: to.Ptr(true), // }, - // SKU: &armappcontainers.EnvironmentSKUProperties{ - // Name: to.Ptr(armappcontainers.SKUNamePremium), - // }, // }, // { // Name: to.Ptr("demo1"), @@ -97,34 +64,17 @@ func ExampleManagedEnvironmentsClient_NewListBySubscriptionPager() { // Tags: map[string]*string{ // }, // Properties: &armappcontainers.ManagedEnvironmentProperties{ - // CustomDomainConfiguration: &armappcontainers.CustomDomainConfiguration{ - // CustomDomainVerificationID: to.Ptr("custom domain verification id"), - // DNSSuffix: to.Ptr("www.my-name2.com"), - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-06T04:00:00Z"); return t}()), - // SubjectName: to.Ptr("CN=www.my-name2.com"), - // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), - // }, // DefaultDomain: to.Ptr("demo1.k4apps.io"), - // EventStreamEndpoint: to.Ptr("testEndpoint"), // ProvisioningState: to.Ptr(armappcontainers.EnvironmentProvisioningStateSucceeded), // StaticIP: to.Ptr("52.142.21.61"), - // VnetConfiguration: &armappcontainers.VnetConfiguration{ - // OutboundSettings: &armappcontainers.ManagedEnvironmentOutboundSettings{ - // OutBoundType: to.Ptr(armappcontainers.ManagedEnvironmentOutBoundTypeUserDefinedRouting), - // VirtualNetworkApplianceIP: to.Ptr("192.168.1.20"), - // }, - // }, // ZoneRedundant: to.Ptr(true), // }, - // SKU: &armappcontainers.EnvironmentSKUProperties{ - // Name: to.Ptr(armappcontainers.SKUNameConsumption), - // }, // }}, // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_ListByResourceGroup.json func ExampleManagedEnvironmentsClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -156,44 +106,11 @@ func ExampleManagedEnvironmentsClient_NewListByResourceGroupPager() { // Tags: map[string]*string{ // }, // Properties: &armappcontainers.ManagedEnvironmentProperties{ - // CustomDomainConfiguration: &armappcontainers.CustomDomainConfiguration{ - // CustomDomainVerificationID: to.Ptr("custom domain verification id"), - // DNSSuffix: to.Ptr("www.my-name.com"), - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-06T04:00:00Z"); return t}()), - // SubjectName: to.Ptr("CN=www.my-name.com"), - // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), - // }, // DefaultDomain: to.Ptr("jlaw-demo1.k4apps.io"), - // EventStreamEndpoint: to.Ptr("testEndpoint"), // ProvisioningState: to.Ptr(armappcontainers.EnvironmentProvisioningStateSucceeded), // StaticIP: to.Ptr("20.42.33.145"), - // VnetConfiguration: &armappcontainers.VnetConfiguration{ - // OutboundSettings: &armappcontainers.ManagedEnvironmentOutboundSettings{ - // OutBoundType: to.Ptr(armappcontainers.ManagedEnvironmentOutBoundTypeUserDefinedRouting), - // VirtualNetworkApplianceIP: to.Ptr("192.168.1.20"), - // }, - // }, - // WorkloadProfiles: []*armappcontainers.WorkloadProfile{ - // { - // MaximumCount: to.Ptr[int32](12), - // MinimumCount: to.Ptr[int32](3), - // WorkloadProfileType: to.Ptr("GeneralPurpose"), - // }, - // { - // MaximumCount: to.Ptr[int32](6), - // MinimumCount: to.Ptr[int32](3), - // WorkloadProfileType: to.Ptr("MemoryOptimized"), - // }, - // { - // MaximumCount: to.Ptr[int32](6), - // MinimumCount: to.Ptr[int32](3), - // WorkloadProfileType: to.Ptr("ComputeOptimized"), - // }}, // ZoneRedundant: to.Ptr(true), // }, - // SKU: &armappcontainers.EnvironmentSKUProperties{ - // Name: to.Ptr(armappcontainers.SKUNamePremium), - // }, // }, // { // Name: to.Ptr("demo1"), @@ -203,34 +120,17 @@ func ExampleManagedEnvironmentsClient_NewListByResourceGroupPager() { // Tags: map[string]*string{ // }, // Properties: &armappcontainers.ManagedEnvironmentProperties{ - // CustomDomainConfiguration: &armappcontainers.CustomDomainConfiguration{ - // CustomDomainVerificationID: to.Ptr("custom domain verification id"), - // DNSSuffix: to.Ptr("www.my-name2.com"), - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-06T04:00:00Z"); return t}()), - // SubjectName: to.Ptr("CN=www.my-name2.com"), - // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), - // }, // DefaultDomain: to.Ptr("demo1.k4apps.io"), - // EventStreamEndpoint: to.Ptr("testEndpoint"), // ProvisioningState: to.Ptr(armappcontainers.EnvironmentProvisioningStateSucceeded), // StaticIP: to.Ptr("52.142.21.61"), - // VnetConfiguration: &armappcontainers.VnetConfiguration{ - // OutboundSettings: &armappcontainers.ManagedEnvironmentOutboundSettings{ - // OutBoundType: to.Ptr(armappcontainers.ManagedEnvironmentOutBoundTypeUserDefinedRouting), - // VirtualNetworkApplianceIP: to.Ptr("192.168.1.20"), - // }, - // }, // ZoneRedundant: to.Ptr(true), // }, - // SKU: &armappcontainers.EnvironmentSKUProperties{ - // Name: to.Ptr(armappcontainers.SKUNameConsumption), - // }, // }}, // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Get.json func ExampleManagedEnvironmentsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -256,48 +156,15 @@ func ExampleManagedEnvironmentsClient_Get() { // Tags: map[string]*string{ // }, // Properties: &armappcontainers.ManagedEnvironmentProperties{ - // CustomDomainConfiguration: &armappcontainers.CustomDomainConfiguration{ - // CustomDomainVerificationID: to.Ptr("custom domain verification id"), - // DNSSuffix: to.Ptr("www.my-name.com"), - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-06T04:00:00Z"); return t}()), - // SubjectName: to.Ptr("CN=www.my-name.com"), - // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), - // }, // DefaultDomain: to.Ptr("jlaw-demo1.k4apps.io"), - // EventStreamEndpoint: to.Ptr("testEndpoint"), // ProvisioningState: to.Ptr(armappcontainers.EnvironmentProvisioningStateSucceeded), // StaticIP: to.Ptr("20.42.33.145"), - // VnetConfiguration: &armappcontainers.VnetConfiguration{ - // OutboundSettings: &armappcontainers.ManagedEnvironmentOutboundSettings{ - // OutBoundType: to.Ptr(armappcontainers.ManagedEnvironmentOutBoundTypeUserDefinedRouting), - // VirtualNetworkApplianceIP: to.Ptr("192.168.1.20"), - // }, - // }, - // WorkloadProfiles: []*armappcontainers.WorkloadProfile{ - // { - // MaximumCount: to.Ptr[int32](12), - // MinimumCount: to.Ptr[int32](3), - // WorkloadProfileType: to.Ptr("GeneralPurpose"), - // }, - // { - // MaximumCount: to.Ptr[int32](6), - // MinimumCount: to.Ptr[int32](3), - // WorkloadProfileType: to.Ptr("MemoryOptimized"), - // }, - // { - // MaximumCount: to.Ptr[int32](6), - // MinimumCount: to.Ptr[int32](3), - // WorkloadProfileType: to.Ptr("ComputeOptimized"), - // }}, // ZoneRedundant: to.Ptr(true), // }, - // SKU: &armappcontainers.EnvironmentSKUProperties{ - // Name: to.Ptr(armappcontainers.SKUNamePremium), - // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_CreateOrUpdate.json func ExampleManagedEnvironmentsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -317,38 +184,8 @@ func ExampleManagedEnvironmentsClient_BeginCreateOrUpdate() { SharedKey: to.Ptr("string"), }, }, - CustomDomainConfiguration: &armappcontainers.CustomDomainConfiguration{ - CertificatePassword: []byte("private key password"), - CertificateValue: []byte("PFX-or-PEM-blob"), - DNSSuffix: to.Ptr("www.my-name.com"), - }, DaprAIConnectionString: to.Ptr("InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/"), - VnetConfiguration: &armappcontainers.VnetConfiguration{ - OutboundSettings: &armappcontainers.ManagedEnvironmentOutboundSettings{ - OutBoundType: to.Ptr(armappcontainers.ManagedEnvironmentOutBoundTypeUserDefinedRouting), - VirtualNetworkApplianceIP: to.Ptr("192.168.1.20"), - }, - }, - WorkloadProfiles: []*armappcontainers.WorkloadProfile{ - { - MaximumCount: to.Ptr[int32](12), - MinimumCount: to.Ptr[int32](3), - WorkloadProfileType: to.Ptr("GeneralPurpose"), - }, - { - MaximumCount: to.Ptr[int32](6), - MinimumCount: to.Ptr[int32](3), - WorkloadProfileType: to.Ptr("MemoryOptimized"), - }, - { - MaximumCount: to.Ptr[int32](6), - MinimumCount: to.Ptr[int32](3), - WorkloadProfileType: to.Ptr("ComputeOptimized"), - }}, - ZoneRedundant: to.Ptr(true), - }, - SKU: &armappcontainers.EnvironmentSKUProperties{ - Name: to.Ptr(armappcontainers.SKUNamePremium), + ZoneRedundant: to.Ptr(true), }, }, nil) if err != nil { @@ -372,48 +209,15 @@ func ExampleManagedEnvironmentsClient_BeginCreateOrUpdate() { // CustomerID: to.Ptr("string"), // }, // }, - // CustomDomainConfiguration: &armappcontainers.CustomDomainConfiguration{ - // CustomDomainVerificationID: to.Ptr("custom domain verification id"), - // DNSSuffix: to.Ptr("www.my-name.com"), - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-06T04:00:00Z"); return t}()), - // SubjectName: to.Ptr("CN=www.my-name.com"), - // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), - // }, // DefaultDomain: to.Ptr("testcontainerenv.k4apps.io"), - // EventStreamEndpoint: to.Ptr("testEndpoint"), // ProvisioningState: to.Ptr(armappcontainers.EnvironmentProvisioningStateSucceeded), // StaticIP: to.Ptr("1.2.3.4"), - // VnetConfiguration: &armappcontainers.VnetConfiguration{ - // OutboundSettings: &armappcontainers.ManagedEnvironmentOutboundSettings{ - // OutBoundType: to.Ptr(armappcontainers.ManagedEnvironmentOutBoundTypeUserDefinedRouting), - // VirtualNetworkApplianceIP: to.Ptr("192.168.1.20"), - // }, - // }, - // WorkloadProfiles: []*armappcontainers.WorkloadProfile{ - // { - // MaximumCount: to.Ptr[int32](12), - // MinimumCount: to.Ptr[int32](3), - // WorkloadProfileType: to.Ptr("GeneralPurpose"), - // }, - // { - // MaximumCount: to.Ptr[int32](6), - // MinimumCount: to.Ptr[int32](3), - // WorkloadProfileType: to.Ptr("MemoryOptimized"), - // }, - // { - // MaximumCount: to.Ptr[int32](6), - // MinimumCount: to.Ptr[int32](3), - // WorkloadProfileType: to.Ptr("ComputeOptimized"), - // }}, // ZoneRedundant: to.Ptr(true), // }, - // SKU: &armappcontainers.EnvironmentSKUProperties{ - // Name: to.Ptr(armappcontainers.SKUNamePremium), - // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Delete.json func ExampleManagedEnvironmentsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -434,7 +238,7 @@ func ExampleManagedEnvironmentsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Patch.json func ExampleManagedEnvironmentsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -460,81 +264,3 @@ func ExampleManagedEnvironmentsClient_BeginUpdate() { log.Fatalf("failed to pull the result: %v", err) } } - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_GetAuthToken.json -func ExampleManagedEnvironmentsClient_GetAuthToken() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagedEnvironmentsClient().GetAuthToken(ctx, "rg", "testenv", 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.EnvironmentAuthToken = armappcontainers.EnvironmentAuthToken{ - // Name: to.Ptr("testenv"), - // Type: to.Ptr("Microsoft.App/environments/accesstoken"), - // ID: to.Ptr("/subscriptions/651f8027-33e8-4ec4-97b4-f6e9f3dc8744/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/testenv"), - // Location: to.Ptr("East US"), - // Properties: &armappcontainers.EnvironmentAuthTokenProperties{ - // Expires: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-14T19:22:50.3080223Z"); return t}()), - // Token: to.Ptr("testToken"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json -func ExampleManagedEnvironmentsClient_NewListWorkloadProfileStatesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewManagedEnvironmentsClient().NewListWorkloadProfileStatesPager("examplerg", "jlaw-demo1", 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.WorkloadProfileStatesCollection = armappcontainers.WorkloadProfileStatesCollection{ - // Value: []*armappcontainers.WorkloadProfileStates{ - // { - // Name: to.Ptr("GP1"), - // Type: to.Ptr("/providers/Microsoft.App/workloadProfileStates"), - // ID: to.Ptr("/subscriptions/55f240e3-3d66-44f6-8358-4e4f3d7a2e51/providers/Microsoft.App/workloadProfileStates/GP1"), - // Properties: &armappcontainers.WorkloadProfileStatesProperties{ - // CurrentCount: to.Ptr[int32](3), - // MaximumCount: to.Ptr[int32](10), - // MinimumCount: to.Ptr[int32](3), - // }, - // }, - // { - // Name: to.Ptr("MO3"), - // Type: to.Ptr("/providers/Microsoft.App/workloadProfileStates"), - // ID: to.Ptr("/subscriptions/55f240e3-3d66-44f6-8358-4e4f3d7a2e51/providers/Microsoft.App/workloadProfileStates/MO3"), - // Properties: &armappcontainers.WorkloadProfileStatesProperties{ - // CurrentCount: to.Ptr[int32](0), - // MaximumCount: to.Ptr[int32](2), - // MinimumCount: to.Ptr[int32](0), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsdiagnostics_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsdiagnostics_client.go deleted file mode 100644 index 9cf538b04c9b..000000000000 --- a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsdiagnostics_client.go +++ /dev/null @@ -1,103 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappcontainers - -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" -) - -// ManagedEnvironmentsDiagnosticsClient contains the methods for the ManagedEnvironmentsDiagnostics group. -// Don't use this type directly, use NewManagedEnvironmentsDiagnosticsClient() instead. -type ManagedEnvironmentsDiagnosticsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewManagedEnvironmentsDiagnosticsClient creates a new instance of ManagedEnvironmentsDiagnosticsClient with the specified values. -// - subscriptionID - The ID of the target subscription. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewManagedEnvironmentsDiagnosticsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedEnvironmentsDiagnosticsClient, error) { - cl, err := arm.NewClient(moduleName+".ManagedEnvironmentsDiagnosticsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &ManagedEnvironmentsDiagnosticsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// GetRoot - Get the properties of a Managed Environment used to host container apps. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-06-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - environmentName - Name of the Environment. -// - options - ManagedEnvironmentsDiagnosticsClientGetRootOptions contains the optional parameters for the ManagedEnvironmentsDiagnosticsClient.GetRoot -// method. -func (client *ManagedEnvironmentsDiagnosticsClient) GetRoot(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedEnvironmentsDiagnosticsClientGetRootOptions) (ManagedEnvironmentsDiagnosticsClientGetRootResponse, error) { - req, err := client.getRootCreateRequest(ctx, resourceGroupName, environmentName, options) - if err != nil { - return ManagedEnvironmentsDiagnosticsClientGetRootResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagedEnvironmentsDiagnosticsClientGetRootResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedEnvironmentsDiagnosticsClientGetRootResponse{}, runtime.NewResponseError(resp) - } - return client.getRootHandleResponse(resp) -} - -// getRootCreateRequest creates the GetRoot request. -func (client *ManagedEnvironmentsDiagnosticsClient) getRootCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedEnvironmentsDiagnosticsClientGetRootOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/detectorProperties/rootApi/" - 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 environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - 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", "2022-06-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getRootHandleResponse handles the GetRoot response. -func (client *ManagedEnvironmentsDiagnosticsClient) getRootHandleResponse(resp *http.Response) (ManagedEnvironmentsDiagnosticsClientGetRootResponse, error) { - result := ManagedEnvironmentsDiagnosticsClientGetRootResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ManagedEnvironment); err != nil { - return ManagedEnvironmentsDiagnosticsClientGetRootResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsdiagnostics_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsdiagnostics_client_example_test.go deleted file mode 100644 index f00ee1dbb915..000000000000 --- a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsdiagnostics_client_example_test.go +++ /dev/null @@ -1,85 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappcontainers_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json -func ExampleManagedEnvironmentsDiagnosticsClient_GetRoot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagedEnvironmentsDiagnosticsClient().GetRoot(ctx, "examplerg", "jlaw-demo1", 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.ManagedEnvironment = armappcontainers.ManagedEnvironment{ - // Name: to.Ptr("jlaw-demo1"), - // Type: to.Ptr("Microsoft.App/managedEnvironments"), - // ID: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/jlaw-demo1"), - // Location: to.Ptr("North Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armappcontainers.ManagedEnvironmentProperties{ - // CustomDomainConfiguration: &armappcontainers.CustomDomainConfiguration{ - // CustomDomainVerificationID: to.Ptr("custom domain verification id"), - // DNSSuffix: to.Ptr("www.my-name.com"), - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-06T04:00:00Z"); return t}()), - // SubjectName: to.Ptr("CN=www.my-name.com"), - // Thumbprint: to.Ptr("CERTIFICATE_THUMBPRINT"), - // }, - // DefaultDomain: to.Ptr("jlaw-demo1.k4apps.io"), - // EventStreamEndpoint: to.Ptr("testEndpoint"), - // ProvisioningState: to.Ptr(armappcontainers.EnvironmentProvisioningStateSucceeded), - // StaticIP: to.Ptr("20.42.33.145"), - // VnetConfiguration: &armappcontainers.VnetConfiguration{ - // OutboundSettings: &armappcontainers.ManagedEnvironmentOutboundSettings{ - // OutBoundType: to.Ptr(armappcontainers.ManagedEnvironmentOutBoundTypeUserDefinedRouting), - // VirtualNetworkApplianceIP: to.Ptr("192.168.1.20"), - // }, - // }, - // WorkloadProfiles: []*armappcontainers.WorkloadProfile{ - // { - // MaximumCount: to.Ptr[int32](12), - // MinimumCount: to.Ptr[int32](3), - // WorkloadProfileType: to.Ptr("GeneralPurpose"), - // }, - // { - // MaximumCount: to.Ptr[int32](6), - // MinimumCount: to.Ptr[int32](3), - // WorkloadProfileType: to.Ptr("MemoryOptimized"), - // }, - // { - // MaximumCount: to.Ptr[int32](6), - // MinimumCount: to.Ptr[int32](3), - // WorkloadProfileType: to.Ptr("ComputeOptimized"), - // }}, - // ZoneRedundant: to.Ptr(true), - // }, - // SKU: &armappcontainers.EnvironmentSKUProperties{ - // Name: to.Ptr(armappcontainers.SKUNamePremium), - // }, - // } -} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsstorages_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsstorages_client.go index 9b498398285f..f9dd62f20dd5 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsstorages_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsstorages_client.go @@ -47,7 +47,7 @@ func NewManagedEnvironmentsStoragesClient(subscriptionID string, credential azco // CreateOrUpdate - Create or update storage for a managedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - storageName - Name of the storage. @@ -93,7 +93,7 @@ func (client *ManagedEnvironmentsStoragesClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, storageEnvelope) @@ -111,7 +111,7 @@ func (client *ManagedEnvironmentsStoragesClient) createOrUpdateHandleResponse(re // Delete - Delete storage for a managedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - storageName - Name of the storage. @@ -156,7 +156,7 @@ func (client *ManagedEnvironmentsStoragesClient) deleteCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -165,7 +165,7 @@ func (client *ManagedEnvironmentsStoragesClient) deleteCreateRequest(ctx context // Get - Get storage for a managedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - storageName - Name of the storage. @@ -210,7 +210,7 @@ func (client *ManagedEnvironmentsStoragesClient) getCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -228,7 +228,7 @@ func (client *ManagedEnvironmentsStoragesClient) getHandleResponse(resp *http.Re // List - Get all storages for a managedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - options - ManagedEnvironmentsStoragesClientListOptions contains the optional parameters for the ManagedEnvironmentsStoragesClient.List @@ -268,7 +268,7 @@ func (client *ManagedEnvironmentsStoragesClient) listCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsstorages_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsstorages_client_example_test.go index ec9758ac741b..0aa922970acc 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsstorages_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsstorages_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/appcontainers/armappcontainers/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_List.json func ExampleManagedEnvironmentsStoragesClient_List() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -53,7 +53,7 @@ func ExampleManagedEnvironmentsStoragesClient_List() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_Get.json func ExampleManagedEnvironmentsStoragesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -85,7 +85,7 @@ func ExampleManagedEnvironmentsStoragesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json func ExampleManagedEnvironmentsStoragesClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -126,7 +126,7 @@ func ExampleManagedEnvironmentsStoragesClient_CreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_Delete.json func ExampleManagedEnvironmentsStoragesClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/models.go b/sdk/resourcemanager/appcontainers/armappcontainers/models.go index 7f975817ca96..6bfd7cb5dcc7 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/models.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/models.go @@ -131,60 +131,6 @@ type AvailableOperations struct { Value []*OperationDetail `json:"value,omitempty"` } -// AvailableWorkloadProfile - A premium workload profile. -type AvailableWorkloadProfile struct { - // Region of the workload profile. - Location *string `json:"location,omitempty"` - - // Revision resource specific properties - Properties *AvailableWorkloadProfileProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// AvailableWorkloadProfileProperties - Revision resource specific properties -type AvailableWorkloadProfileProperties struct { - // indicates whether the profile is default for the location. - Applicability *Applicability `json:"applicability,omitempty"` - - // Used to map workload profile types to billing meter. - BillingMeterCategory *Category `json:"billingMeterCategory,omitempty"` - - // Number of cores in CPU. - Cores *int32 `json:"cores,omitempty"` - - // The everyday name of the workload profile. - DisplayName *string `json:"displayName,omitempty"` - - // Memory in GiB. - MemoryGiB *int32 `json:"memoryGiB,omitempty"` -} - -// AvailableWorkloadProfilesClientGetOptions contains the optional parameters for the AvailableWorkloadProfilesClient.NewGetPager -// method. -type AvailableWorkloadProfilesClientGetOptions struct { - // placeholder for future optional parameters -} - -// AvailableWorkloadProfilesCollection - Collection of available workload profiles in the location. -type AvailableWorkloadProfilesCollection struct { - // REQUIRED; Collection of workload profiles. - Value []*AvailableWorkloadProfile `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - // AzureActiveDirectory - The configuration settings of the Azure Active directory provider. type AzureActiveDirectory struct { // false if the Azure Active Directory provider should not be enabled despite the set registration; otherwise, true. @@ -304,74 +250,6 @@ type AzureStaticWebAppsRegistration struct { ClientID *string `json:"clientId,omitempty"` } -// BaseContainer - Container App base container definition. -type BaseContainer struct { - // Container start command arguments. - Args []*string `json:"args,omitempty"` - - // Container start command. - Command []*string `json:"command,omitempty"` - - // Container environment variables. - Env []*EnvironmentVar `json:"env,omitempty"` - - // Container image tag. - Image *string `json:"image,omitempty"` - - // Custom container name. - Name *string `json:"name,omitempty"` - - // Container resource requirements. - Resources *ContainerResources `json:"resources,omitempty"` - - // Container volume mounts. - VolumeMounts []*VolumeMount `json:"volumeMounts,omitempty"` -} - -// BillingMeter - A premium billing meter. -type BillingMeter struct { - // Region for the billing meter. - Location *string `json:"location,omitempty"` - - // Revision resource specific properties - Properties *BillingMeterProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BillingMeterCollection - Collection of premium workload billing meters. -type BillingMeterCollection struct { - // REQUIRED; Collection of billing meters. - Value []*BillingMeter `json:"value,omitempty"` -} - -// BillingMeterProperties - Revision resource specific properties -type BillingMeterProperties struct { - // Used to map workload profile types to billing meter. - Category *Category `json:"category,omitempty"` - - // The everyday name of the billing meter. - DisplayName *string `json:"displayName,omitempty"` - - // Billing meter type. - MeterType *string `json:"meterType,omitempty"` -} - -// BillingMetersClientGetOptions contains the optional parameters for the BillingMetersClient.Get method. -type BillingMetersClientGetOptions struct { - // placeholder for future optional parameters -} - // Certificate used for Custom Domain bindings of Container Apps in a Managed Environment type Certificate struct { // REQUIRED; The geo-location where the resource lives @@ -434,9 +312,6 @@ type CertificateProperties struct { // READ-ONLY; Public key hash. PublicKeyHash *string `json:"publicKeyHash,omitempty" azure:"ro"` - // READ-ONLY; Subject alternative names the certificate applies to. - SubjectAlternativeNames []*string `json:"subjectAlternativeNames,omitempty" azure:"ro"` - // READ-ONLY; Subject name of the certificate. SubjectName *string `json:"subjectName,omitempty" azure:"ro"` @@ -516,9 +391,6 @@ type Configuration struct { // Ingress configurations. Ingress *Ingress `json:"ingress,omitempty"` - // Optional. Max inactive revisions a Container App can have. - MaxInactiveRevisions *int32 `json:"maxInactiveRevisions,omitempty"` - // Collection of private container registry credentials for containers used by the Container app Registries []*RegistryCredentials `json:"registries,omitempty"` @@ -526,221 +398,7 @@ type Configuration struct { Secrets []*Secret `json:"secrets,omitempty"` } -// ConnectedEnvironment - An environment for Kubernetes cluster specialized for web workloads by Azure App Service -type ConnectedEnvironment struct { - // REQUIRED; The geo-location where the resource lives - Location *string `json:"location,omitempty"` - - // The complex type of the extended location. - ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` - - // ConnectedEnvironment resource specific properties - Properties *ConnectedEnvironmentProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ConnectedEnvironmentCollection - Collection of connectedEnvironments -type ConnectedEnvironmentCollection struct { - // Collection of resources. - Value []*ConnectedEnvironment `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// ConnectedEnvironmentProperties - ConnectedEnvironment resource specific properties -type ConnectedEnvironmentProperties struct { - // Custom domain configuration for the environment - CustomDomainConfiguration *CustomDomainConfiguration `json:"customDomainConfiguration,omitempty"` - - // Application Insights connection string used by Dapr to export Service to Service communication telemetry - DaprAIConnectionString *string `json:"daprAIConnectionString,omitempty"` - - // Static IP of the connectedEnvironment - StaticIP *string `json:"staticIp,omitempty"` - - // READ-ONLY; Default Domain Name for the cluster - DefaultDomain *string `json:"defaultDomain,omitempty" azure:"ro"` - - // READ-ONLY; Any errors that occurred during deployment or deployment validation - DeploymentErrors *string `json:"deploymentErrors,omitempty" azure:"ro"` - - // READ-ONLY; Provisioning state of the Kubernetes Environment. - ProvisioningState *ConnectedEnvironmentProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ConnectedEnvironmentStorage - Storage resource for connectedEnvironment. -type ConnectedEnvironmentStorage struct { - // Storage properties - Properties *ConnectedEnvironmentStorageProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ConnectedEnvironmentStorageProperties - Storage properties -type ConnectedEnvironmentStorageProperties struct { - // Azure file properties - AzureFile *AzureFileProperties `json:"azureFile,omitempty"` -} - -// ConnectedEnvironmentStoragesCollection - Collection of Storage for Environments -type ConnectedEnvironmentStoragesCollection struct { - // REQUIRED; Collection of storage resources. - Value []*ConnectedEnvironmentStorage `json:"value,omitempty"` -} - -// ConnectedEnvironmentsCertificatesClientCreateOrUpdateOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.CreateOrUpdate -// method. -type ConnectedEnvironmentsCertificatesClientCreateOrUpdateOptions struct { - // Certificate to be created or updated - CertificateEnvelope *Certificate -} - -// ConnectedEnvironmentsCertificatesClientDeleteOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.Delete -// method. -type ConnectedEnvironmentsCertificatesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsCertificatesClientGetOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.Get -// method. -type ConnectedEnvironmentsCertificatesClientGetOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsCertificatesClientListOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.NewListPager -// method. -type ConnectedEnvironmentsCertificatesClientListOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsCertificatesClientUpdateOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.Update -// method. -type ConnectedEnvironmentsCertificatesClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConnectedEnvironmentsClient.BeginCreateOrUpdate -// method. -type ConnectedEnvironmentsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConnectedEnvironmentsClientBeginDeleteOptions contains the optional parameters for the ConnectedEnvironmentsClient.BeginDelete -// method. -type ConnectedEnvironmentsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConnectedEnvironmentsClientCheckNameAvailabilityOptions contains the optional parameters for the ConnectedEnvironmentsClient.CheckNameAvailability -// method. -type ConnectedEnvironmentsClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsClientGetOptions contains the optional parameters for the ConnectedEnvironmentsClient.Get method. -type ConnectedEnvironmentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsClientListByResourceGroupOptions contains the optional parameters for the ConnectedEnvironmentsClient.NewListByResourceGroupPager -// method. -type ConnectedEnvironmentsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsClientListBySubscriptionOptions contains the optional parameters for the ConnectedEnvironmentsClient.NewListBySubscriptionPager -// method. -type ConnectedEnvironmentsClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsClientUpdateOptions contains the optional parameters for the ConnectedEnvironmentsClient.Update method. -type ConnectedEnvironmentsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.CreateOrUpdate -// method. -type ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsDaprComponentsClientDeleteOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.Delete -// method. -type ConnectedEnvironmentsDaprComponentsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsDaprComponentsClientGetOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.Get -// method. -type ConnectedEnvironmentsDaprComponentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsDaprComponentsClientListOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.NewListPager -// method. -type ConnectedEnvironmentsDaprComponentsClientListOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsDaprComponentsClientListSecretsOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.ListSecrets -// method. -type ConnectedEnvironmentsDaprComponentsClientListSecretsOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsStoragesClientCreateOrUpdateOptions contains the optional parameters for the ConnectedEnvironmentsStoragesClient.CreateOrUpdate -// method. -type ConnectedEnvironmentsStoragesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsStoragesClientDeleteOptions contains the optional parameters for the ConnectedEnvironmentsStoragesClient.Delete -// method. -type ConnectedEnvironmentsStoragesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsStoragesClientGetOptions contains the optional parameters for the ConnectedEnvironmentsStoragesClient.Get -// method. -type ConnectedEnvironmentsStoragesClientGetOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsStoragesClientListOptions contains the optional parameters for the ConnectedEnvironmentsStoragesClient.List -// method. -type ConnectedEnvironmentsStoragesClientListOptions struct { - // placeholder for future optional parameters -} - -// Container App container definition +// Container App container definition. type Container struct { // Container start command arguments. Args []*string `json:"args,omitempty"` @@ -772,9 +430,6 @@ type ContainerApp struct { // REQUIRED; The geo-location where the resource lives Location *string `json:"location,omitempty"` - // The complex type of the extended location. - ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` - // managed identities for the Container App to interact with other Azure services without maintaining any secrets or credentials // in code. Identity *ManagedServiceIdentity `json:"identity,omitempty"` @@ -798,39 +453,6 @@ type ContainerApp struct { Type *string `json:"type,omitempty" azure:"ro"` } -// ContainerAppAuthToken - Container App Auth Token. -type ContainerAppAuthToken struct { - // REQUIRED; The geo-location where the resource lives - Location *string `json:"location,omitempty"` - - // Container App auth token resource specific properties - Properties *ContainerAppAuthTokenProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ContainerAppAuthTokenProperties - Container App auth token resource specific properties -type ContainerAppAuthTokenProperties struct { - // READ-ONLY; Token expiration date. - Expires *time.Time `json:"expires,omitempty" azure:"ro"` - - // READ-ONLY; Auth token value. - Token *string `json:"token,omitempty" azure:"ro"` -} - // ContainerAppCollection - Container App collection ARM resource. type ContainerAppCollection struct { // REQUIRED; Collection of resources. @@ -924,24 +546,15 @@ type ContainerAppProperties struct { // Non versioned Container App configuration properties. Configuration *Configuration `json:"configuration,omitempty"` - // Resource ID of environment. - EnvironmentID *string `json:"environmentId,omitempty"` - - // Deprecated. Resource ID of the Container App's environment. + // Resource ID of the Container App's environment. ManagedEnvironmentID *string `json:"managedEnvironmentId,omitempty"` // Container App versioned application definition. Template *Template `json:"template,omitempty"` - // Workload profile type to pin for container app execution. - WorkloadProfileType *string `json:"workloadProfileType,omitempty"` - // READ-ONLY; Id used to verify domain name ownership CustomDomainVerificationID *string `json:"customDomainVerificationId,omitempty" azure:"ro"` - // READ-ONLY; The endpoint of the eventstream of the container app. - EventStreamEndpoint *string `json:"eventStreamEndpoint,omitempty" azure:"ro"` - // READ-ONLY; Fully Qualified Domain Name of the latest revision of the Container App. LatestRevisionFqdn *string `json:"latestRevisionFqdn,omitempty" azure:"ro"` @@ -1006,11 +619,6 @@ type ContainerAppsClientBeginUpdateOptions struct { ResumeToken string } -// ContainerAppsClientGetAuthTokenOptions contains the optional parameters for the ContainerAppsClient.GetAuthToken method. -type ContainerAppsClientGetAuthTokenOptions struct { - // placeholder for future optional parameters -} - // ContainerAppsClientGetOptions contains the optional parameters for the ContainerAppsClient.Get method. type ContainerAppsClientGetOptions struct { // placeholder for future optional parameters @@ -1040,37 +648,6 @@ type ContainerAppsClientListSecretsOptions struct { // placeholder for future optional parameters } -// ContainerAppsDiagnosticsClientGetDetectorOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.GetDetector -// method. -type ContainerAppsDiagnosticsClientGetDetectorOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsDiagnosticsClientGetRevisionOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.GetRevision -// method. -type ContainerAppsDiagnosticsClientGetRevisionOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsDiagnosticsClientGetRootOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.GetRoot -// method. -type ContainerAppsDiagnosticsClientGetRootOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsDiagnosticsClientListDetectorsOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.NewListDetectorsPager -// method. -type ContainerAppsDiagnosticsClientListDetectorsOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsDiagnosticsClientListRevisionsOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.NewListRevisionsPager -// method. -type ContainerAppsDiagnosticsClientListRevisionsOptions struct { - // The filter to apply on the operation. - Filter *string -} - // ContainerAppsRevisionReplicasClientGetReplicaOptions contains the optional parameters for the ContainerAppsRevisionReplicasClient.GetReplica // method. type ContainerAppsRevisionReplicasClientGetReplicaOptions struct { @@ -1173,32 +750,26 @@ type CustomDomain struct { BindingType *BindingType `json:"bindingType,omitempty"` } -// CustomDomainConfiguration - Configuration properties for apps environment custom domain -type CustomDomainConfiguration struct { - // Certificate password - CertificatePassword []byte `json:"certificatePassword,omitempty"` - - // PFX or PEM blob - CertificateValue []byte `json:"certificateValue,omitempty"` - - // Dns suffix for the environment domain - DNSSuffix *string `json:"dnsSuffix,omitempty"` +// CustomHostnameAnalysisResult - Custom domain analysis. +type CustomHostnameAnalysisResult struct { + // CustomHostnameAnalysisResult resource specific properties + Properties *CustomHostnameAnalysisResultProperties `json:"properties,omitempty"` - // READ-ONLY; Id used to verify domain name ownership - CustomDomainVerificationID *string `json:"customDomainVerificationId,omitempty" azure:"ro"` + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty" azure:"ro"` - // READ-ONLY; Certificate expiration date. - ExpirationDate *time.Time `json:"expirationDate,omitempty" azure:"ro"` + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` - // READ-ONLY; Subject name of the certificate. - SubjectName *string `json:"subjectName,omitempty" azure:"ro"` + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - // READ-ONLY; Certificate thumbprint. - Thumbprint *string `json:"thumbprint,omitempty" azure:"ro"` + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` } -// CustomHostnameAnalysisResult - Custom domain analysis. -type CustomHostnameAnalysisResult struct { +// CustomHostnameAnalysisResultProperties - CustomHostnameAnalysisResult resource specific properties +type CustomHostnameAnalysisResultProperties struct { // A records visible for this hostname. ARecords []*string `json:"aRecords,omitempty"` @@ -1214,14 +785,11 @@ type CustomHostnameAnalysisResult struct { // TXT records visible for this hostname. TxtRecords []*string `json:"txtRecords,omitempty"` - // READ-ONLY; true if there is a conflict on the Container App's managed environment level custom domain; otherwise, false. - ConflictWithEnvironmentCustomDomain *bool `json:"conflictWithEnvironmentCustomDomain,omitempty" azure:"ro"` - // READ-ONLY; Name of the conflicting Container App on the Managed Environment if it's within the same subscription. ConflictingContainerAppResourceID *string `json:"conflictingContainerAppResourceId,omitempty" azure:"ro"` // READ-ONLY; Raw failure information if DNS verification fails. - CustomDomainVerificationFailureInfo *CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo `json:"customDomainVerificationFailureInfo,omitempty" azure:"ro"` + CustomDomainVerificationFailureInfo *DefaultErrorResponse `json:"customDomainVerificationFailureInfo,omitempty" azure:"ro"` // READ-ONLY; DNS verification test result. CustomDomainVerificationTest *DNSVerificationTestResult `json:"customDomainVerificationTest,omitempty" azure:"ro"` @@ -1236,33 +804,6 @@ type CustomHostnameAnalysisResult struct { IsHostnameAlreadyVerified *bool `json:"isHostnameAlreadyVerified,omitempty" azure:"ro"` } -// CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo - Raw failure information if DNS verification fails. -type CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo struct { - // Details or the error - Details []*CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem `json:"details,omitempty"` - - // READ-ONLY; Standardized string to programmatically identify the error. - Code *string `json:"code,omitempty" azure:"ro"` - - // READ-ONLY; Detailed error description and debugging information. - Message *string `json:"message,omitempty" azure:"ro"` - - // READ-ONLY; Detailed error description and debugging information. - Target *string `json:"target,omitempty" azure:"ro"` -} - -// CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem - Detailed errors. -type CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem struct { - // READ-ONLY; Standardized string to programmatically identify the error. - Code *string `json:"code,omitempty" azure:"ro"` - - // READ-ONLY; Detailed error description and debugging information. - Message *string `json:"message,omitempty" azure:"ro"` - - // READ-ONLY; Detailed error description and debugging information. - Target *string `json:"target,omitempty" azure:"ro"` -} - // CustomOpenIDConnectProvider - The configuration settings of the custom Open ID Connect provider. type CustomOpenIDConnectProvider struct { // false if the custom Open ID provider provider should not be enabled; otherwise, true. @@ -1298,21 +839,8 @@ type Dapr struct { // Tells Dapr which protocol your application is using. Valid options are http and grpc. Default is http AppProtocol *AppProtocol `json:"appProtocol,omitempty"` - // Enables API logging for the Dapr sidecar - EnableAPILogging *bool `json:"enableApiLogging,omitempty"` - // Boolean indicating if the Dapr side car is enabled Enabled *bool `json:"enabled,omitempty"` - - // Increasing max size of request body http and grpc servers parameter in MB to handle uploading of big files. Default is - // 4 MB. - HTTPMaxRequestSize *int32 `json:"httpMaxRequestSize,omitempty"` - - // Dapr max size of http header read buffer in KB to handle when sending multi-KB headers. Default is 65KB. - HTTPReadBufferSize *int32 `json:"httpReadBufferSize,omitempty"` - - // Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. - LogLevel *LogLevel `json:"logLevel,omitempty"` } // DaprComponent - Dapr Component. @@ -1350,9 +878,6 @@ type DaprComponentProperties struct { // Names of container apps that can use this Dapr component Scopes []*string `json:"scopes,omitempty"` - // Name of a Dapr component to retrieve component secrets from - SecretStoreComponent *string `json:"secretStoreComponent,omitempty"` - // Collection of secrets used by a Dapr component Secrets []*Secret `json:"secrets,omitempty"` @@ -1407,16 +932,7 @@ type DaprMetadata struct { Value *string `json:"value,omitempty"` } -// DaprSecret - Dapr component Secret for ListSecrets Action -type DaprSecret struct { - // READ-ONLY; Secret Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Secret Value. - Value *string `json:"value,omitempty" azure:"ro"` -} - -// DaprSecretsCollection - Dapr component Secrets Collection for ListSecrets Action. +// DaprSecretsCollection - Dapr component Secrets Collection ARM resource. type DaprSecretsCollection struct { // REQUIRED; Collection of secrets used by a Dapr component Value []*Secret `json:"value,omitempty"` @@ -1467,201 +983,6 @@ type DefaultErrorResponseErrorDetailsItem struct { Target *string `json:"target,omitempty" azure:"ro"` } -// DiagnosticDataProviderMetadata - Details of a diagnostics data provider -type DiagnosticDataProviderMetadata struct { - // Collection of properties - PropertyBag []*DiagnosticDataProviderMetadataPropertyBagItem `json:"propertyBag,omitempty"` - - // Name of data provider - ProviderName *string `json:"providerName,omitempty"` -} - -// DiagnosticDataProviderMetadataPropertyBagItem - Property details -type DiagnosticDataProviderMetadataPropertyBagItem struct { - // Property name - Name *string `json:"name,omitempty"` - - // Property value - Value *string `json:"value,omitempty"` -} - -// DiagnosticDataTableResponseColumn - Diagnostics data column -type DiagnosticDataTableResponseColumn struct { - // Column name - ColumnName *string `json:"columnName,omitempty"` - - // Column type - ColumnType *string `json:"columnType,omitempty"` - - // Data type of the column - DataType *string `json:"dataType,omitempty"` -} - -// DiagnosticDataTableResponseObject - Diagnostics data table -type DiagnosticDataTableResponseObject struct { - // Columns in the table - Columns []*DiagnosticDataTableResponseColumn `json:"columns,omitempty"` - - // Rows in the table - Rows []any `json:"rows,omitempty"` - - // Table name - TableName *string `json:"tableName,omitempty"` -} - -// DiagnosticRendering - Rendering details of a diagnostics table -type DiagnosticRendering struct { - // Description of the table - Description *string `json:"description,omitempty"` - - // Flag if the table should be rendered - IsVisible *bool `json:"isVisible,omitempty"` - - // Title of the table - Title *string `json:"title,omitempty"` - - // Rendering type - Type *int32 `json:"type,omitempty"` -} - -// DiagnosticSupportTopic - Support topic information -type DiagnosticSupportTopic struct { - // READ-ONLY; Unique topic identifier - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; PES identifier - PesID *string `json:"pesId,omitempty" azure:"ro"` -} - -// Diagnostics data for a resource. -type Diagnostics struct { - // Diagnostics resource specific properties - Properties *DiagnosticsProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DiagnosticsCollection - Diagnostics data collection for a resource. -type DiagnosticsCollection struct { - // REQUIRED; Collection of diagnostic data. - Value []*Diagnostics `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// DiagnosticsDataAPIResponse - Diagnostics data returned from a detector -type DiagnosticsDataAPIResponse struct { - // Details of the table response - RenderingProperties *DiagnosticRendering `json:"renderingProperties,omitempty"` - - // Table response - Table *DiagnosticDataTableResponseObject `json:"table,omitempty"` -} - -// DiagnosticsDefinition - Metadata of the diagnostics response -type DiagnosticsDefinition struct { - // List of analysis types - AnalysisTypes []*string `json:"analysisTypes,omitempty"` - - // List of support topics - SupportTopicList []*DiagnosticSupportTopic `json:"supportTopicList,omitempty"` - - // READ-ONLY; Authors' names of the detector - Author *string `json:"author,omitempty" azure:"ro"` - - // READ-ONLY; Category of the detector - Category *string `json:"category,omitempty" azure:"ro"` - - // READ-ONLY; Details of the diagnostics info - Description *string `json:"description,omitempty" azure:"ro"` - - // READ-ONLY; Unique detector name - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Display Name of the detector - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Authors' names of the detector - Score *float32 `json:"score,omitempty" azure:"ro"` - - // READ-ONLY; Authors' names of the detector - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DiagnosticsProperties - Diagnostics resource specific properties -type DiagnosticsProperties struct { - // List of data providers' metadata. - DataProviderMetadata *DiagnosticDataProviderMetadata `json:"dataProviderMetadata,omitempty"` - - // Set of data collections associated with the response. - Dataset []*DiagnosticsDataAPIResponse `json:"dataset,omitempty"` - - // Metadata of the diagnostics response. - Metadata *DiagnosticsDefinition `json:"metadata,omitempty"` - - // Status of the diagnostics response. - Status *DiagnosticsStatus `json:"status,omitempty"` -} - -// DiagnosticsStatus - Rendering details of a diagnostics table -type DiagnosticsStatus struct { - // Diagnostic message - Message *string `json:"message,omitempty"` - - // Status - StatusID *int32 `json:"statusId,omitempty"` -} - -// EnvironmentAuthToken - Environment Auth Token. -type EnvironmentAuthToken struct { - // REQUIRED; The geo-location where the resource lives - Location *string `json:"location,omitempty"` - - // Environment auth token resource specific properties - Properties *EnvironmentAuthTokenProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// EnvironmentAuthTokenProperties - Environment auth token resource specific properties -type EnvironmentAuthTokenProperties struct { - // READ-ONLY; Token expiration date. - Expires *time.Time `json:"expires,omitempty" azure:"ro"` - - // READ-ONLY; Auth token value. - Token *string `json:"token,omitempty" azure:"ro"` -} - -// EnvironmentSKUProperties - Managed Environment resource SKU properties. -type EnvironmentSKUProperties struct { - // REQUIRED; Name of the Sku. - Name *SKUName `json:"name,omitempty"` -} - // EnvironmentVar - Container App container environment variable. type EnvironmentVar struct { // Environment variable name. @@ -1674,49 +995,6 @@ type EnvironmentVar struct { Value *string `json:"value,omitempty"` } -// ErrorAdditionalInfo - The resource management error additional info. -type ErrorAdditionalInfo struct { - // READ-ONLY; The additional info. - Info any `json:"info,omitempty" azure:"ro"` - - // READ-ONLY; The additional info type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ErrorDetail - The error detail. -type ErrorDetail struct { - // READ-ONLY; The error additional info. - AdditionalInfo []*ErrorAdditionalInfo `json:"additionalInfo,omitempty" azure:"ro"` - - // READ-ONLY; The error code. - Code *string `json:"code,omitempty" azure:"ro"` - - // READ-ONLY; The error details. - Details []*ErrorDetail `json:"details,omitempty" azure:"ro"` - - // READ-ONLY; The error message. - Message *string `json:"message,omitempty" azure:"ro"` - - // READ-ONLY; The error target. - Target *string `json:"target,omitempty" azure:"ro"` -} - -// ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. -// (This also follows the OData error response format.). -type ErrorResponse struct { - // The error object. - Error *ErrorDetail `json:"error,omitempty"` -} - -// ExtendedLocation - The complex type of the extended location. -type ExtendedLocation struct { - // The name of the extended location. - Name *string `json:"name,omitempty"` - - // The type of the extended location. - Type *ExtendedLocationTypes `json:"type,omitempty"` -} - // Facebook - The configuration settings of the Facebook provider. type Facebook struct { // false if the Facebook provider should not be enabled despite the set registration; otherwise, true. @@ -1812,7 +1090,7 @@ type Google struct { Validation *AllowedAudiencesValidation `json:"validation,omitempty"` } -// HTTPScaleRule - Container App container Http scaling rule. +// HTTPScaleRule - Container App container Custom scaling rule. type HTTPScaleRule struct { // Authentication secrets for the custom scale rule. Auth []*ScaleRuleAuth `json:"auth,omitempty"` @@ -1840,21 +1118,6 @@ type HTTPSettingsRoutes struct { APIPrefix *string `json:"apiPrefix,omitempty"` } -// IPSecurityRestrictionRule - Rule to restrict incoming IP address. -type IPSecurityRestrictionRule struct { - // REQUIRED; Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL Allow or ALL Deny - Action *Action `json:"action,omitempty"` - - // REQUIRED; CIDR notation to match incoming IP address - IPAddressRange *string `json:"ipAddressRange,omitempty"` - - // REQUIRED; Name for the IP restriction rule. - Name *string `json:"name,omitempty"` - - // Describe the IP restriction rule that is being sent to the container-app. This is an optional field. - Description *string `json:"description,omitempty"` -} - // IdentityProviders - The configuration settings of each of the identity providers used to configure ContainerApp Service // Authentication/Authorization. type IdentityProviders struct { @@ -1893,15 +1156,9 @@ type Ingress struct { // custom domain bindings for Container Apps' hostnames. CustomDomains []*CustomDomain `json:"customDomains,omitempty"` - // Exposed Port in containers for TCP traffic from ingress - ExposedPort *int32 `json:"exposedPort,omitempty"` - // Bool indicating if app exposes an external http endpoint External *bool `json:"external,omitempty"` - // Rules to restrict incoming IP address. - IPSecurityRestrictions []*IPSecurityRestrictionRule `json:"ipSecurityRestrictions,omitempty"` - // Target Port in containers for traffic from ingress TargetPort *int32 `json:"targetPort,omitempty"` @@ -1915,30 +1172,6 @@ type Ingress struct { Fqdn *string `json:"fqdn,omitempty" azure:"ro"` } -// InitContainer - Container App init container definition -type InitContainer struct { - // Container start command arguments. - Args []*string `json:"args,omitempty"` - - // Container start command. - Command []*string `json:"command,omitempty"` - - // Container environment variables. - Env []*EnvironmentVar `json:"env,omitempty"` - - // Container image tag. - Image *string `json:"image,omitempty"` - - // Custom container name. - Name *string `json:"name,omitempty"` - - // Container resource requirements. - Resources *ContainerResources `json:"resources,omitempty"` - - // Container volume mounts. - VolumeMounts []*VolumeMount `json:"volumeMounts,omitempty"` -} - // JwtClaimChecks - The configuration settings of the checks that should be made while validating the JWT Claims. type JwtClaimChecks struct { // The list of the allowed client applications. @@ -1997,9 +1230,6 @@ type ManagedEnvironment struct { // Managed environment resource specific properties Properties *ManagedEnvironmentProperties `json:"properties,omitempty"` - // SKU properties of the Environment. - SKU *EnvironmentSKUProperties `json:"sku,omitempty"` - // Resource tags. Tags map[string]*string `json:"tags,omitempty"` @@ -2016,36 +1246,12 @@ type ManagedEnvironment struct { Type *string `json:"type,omitempty" azure:"ro"` } -// ManagedEnvironmentDiagnosticsClientGetDetectorOptions contains the optional parameters for the ManagedEnvironmentDiagnosticsClient.GetDetector -// method. -type ManagedEnvironmentDiagnosticsClientGetDetectorOptions struct { - // placeholder for future optional parameters -} - -// ManagedEnvironmentDiagnosticsClientListDetectorsOptions contains the optional parameters for the ManagedEnvironmentDiagnosticsClient.ListDetectors -// method. -type ManagedEnvironmentDiagnosticsClientListDetectorsOptions struct { - // placeholder for future optional parameters -} - -// ManagedEnvironmentOutboundSettings - Configuration used to control the Environment Egress outbound traffic -type ManagedEnvironmentOutboundSettings struct { - // Outbound type for the cluster - OutBoundType *ManagedEnvironmentOutBoundType `json:"outBoundType,omitempty"` - - // Virtual Appliance IP used as the Egress controller for the Environment - VirtualNetworkApplianceIP *string `json:"virtualNetworkApplianceIp,omitempty"` -} - // ManagedEnvironmentProperties - Managed environment resource specific properties type ManagedEnvironmentProperties struct { // Cluster configuration which enables the log daemon to export app logs to a destination. Currently only "log-analytics" // is supported AppLogsConfiguration *AppLogsConfiguration `json:"appLogsConfiguration,omitempty"` - // Custom domain configuration for the environment - CustomDomainConfiguration *CustomDomainConfiguration `json:"customDomainConfiguration,omitempty"` - // Application Insights connection string used by Dapr to export Service to Service communication telemetry DaprAIConnectionString *string `json:"daprAIConnectionString,omitempty"` @@ -2055,9 +1261,6 @@ type ManagedEnvironmentProperties struct { // Vnet configuration for the environment VnetConfiguration *VnetConfiguration `json:"vnetConfiguration,omitempty"` - // Workload profiles configured for the Managed Environment. - WorkloadProfiles []*WorkloadProfile `json:"workloadProfiles,omitempty"` - // Whether or not this Managed Environment is zone-redundant. ZoneRedundant *bool `json:"zoneRedundant,omitempty"` @@ -2067,9 +1270,6 @@ type ManagedEnvironmentProperties struct { // READ-ONLY; Any errors that occurred during deployment or deployment validation DeploymentErrors *string `json:"deploymentErrors,omitempty" azure:"ro"` - // READ-ONLY; The endpoint of the eventstream of the Environment. - EventStreamEndpoint *string `json:"eventStreamEndpoint,omitempty" azure:"ro"` - // READ-ONLY; Provisioning state of the Environment. ProvisioningState *EnvironmentProvisioningState `json:"provisioningState,omitempty" azure:"ro"` @@ -2128,12 +1328,6 @@ type ManagedEnvironmentsClientBeginUpdateOptions struct { ResumeToken string } -// ManagedEnvironmentsClientGetAuthTokenOptions contains the optional parameters for the ManagedEnvironmentsClient.GetAuthToken -// method. -type ManagedEnvironmentsClientGetAuthTokenOptions struct { - // placeholder for future optional parameters -} - // ManagedEnvironmentsClientGetOptions contains the optional parameters for the ManagedEnvironmentsClient.Get method. type ManagedEnvironmentsClientGetOptions struct { // placeholder for future optional parameters @@ -2151,12 +1345,6 @@ type ManagedEnvironmentsClientListBySubscriptionOptions struct { // placeholder for future optional parameters } -// ManagedEnvironmentsClientListWorkloadProfileStatesOptions contains the optional parameters for the ManagedEnvironmentsClient.NewListWorkloadProfileStatesPager -// method. -type ManagedEnvironmentsClientListWorkloadProfileStatesOptions struct { - // placeholder for future optional parameters -} - // ManagedEnvironmentsCollection - Collection of Environments type ManagedEnvironmentsCollection struct { // REQUIRED; Collection of resources. @@ -2166,12 +1354,6 @@ type ManagedEnvironmentsCollection struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// ManagedEnvironmentsDiagnosticsClientGetRootOptions contains the optional parameters for the ManagedEnvironmentsDiagnosticsClient.GetRoot -// method. -type ManagedEnvironmentsDiagnosticsClientGetRootOptions struct { - // placeholder for future optional parameters -} - // ManagedEnvironmentsStoragesClientCreateOrUpdateOptions contains the optional parameters for the ManagedEnvironmentsStoragesClient.CreateOrUpdate // method. type ManagedEnvironmentsStoragesClientCreateOrUpdateOptions struct { @@ -2410,12 +1592,6 @@ type ReplicaContainer struct { // The container start status Started *bool `json:"started,omitempty"` - - // READ-ONLY; Container exec endpoint - ExecEndpoint *string `json:"execEndpoint,omitempty" azure:"ro"` - - // READ-ONLY; Log Stream endpoint - LogStreamEndpoint *string `json:"logStreamEndpoint,omitempty" azure:"ro"` } // ReplicaProperties - Replica resource specific properties @@ -2483,9 +1659,6 @@ type RevisionProperties struct { // READ-ONLY; Current health State of the revision HealthState *RevisionHealthState `json:"healthState,omitempty" azure:"ro"` - // READ-ONLY; Timestamp describing when the revision was last active. Only meaningful when revision is inactive - LastActiveTime *time.Time `json:"lastActiveTime,omitempty" azure:"ro"` - // READ-ONLY; Optional Field - Platform Error Message ProvisioningError *string `json:"provisioningError,omitempty" azure:"ro"` @@ -2528,9 +1701,6 @@ type ScaleRule struct { // Scale Rule Name Name *string `json:"name,omitempty"` - - // Tcp requests based scaling. - TCP *TCPScaleRule `json:"tcp,omitempty"` } // ScaleRuleAuth - Auth Secrets for Container App Scale Rule @@ -2621,24 +1791,12 @@ type SystemData struct { LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` } -// TCPScaleRule - Container App container Tcp scaling rule. -type TCPScaleRule struct { - // Authentication secrets for the tcp scale rule. - Auth []*ScaleRuleAuth `json:"auth,omitempty"` - - // Metadata properties to describe tcp scale rule. - Metadata map[string]*string `json:"metadata,omitempty"` -} - // Template - Container App versioned application definition. Defines the desired state of an immutable revision. Any changes // to this section Will result in a new revision being created type Template struct { // List of container definitions for the Container App. Containers []*Container `json:"containers,omitempty"` - // List of specialized containers that run before app containers. - InitContainers []*InitContainer `json:"initContainers,omitempty"` - // User friendly suffix that is appended to the revision name RevisionSuffix *string `json:"revisionSuffix,omitempty"` @@ -2724,13 +1882,10 @@ type VnetConfiguration struct { InfrastructureSubnetID *string `json:"infrastructureSubnetId,omitempty"` // Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP - // resource. They must provide runtimeSubnetId and infrastructureSubnetId if + // resource, must provide ControlPlaneSubnetResourceId and AppSubnetResourceId if // enabling this property Internal *bool `json:"internal,omitempty"` - // Configuration used to control the Environment Egress outbound traffic - OutboundSettings *ManagedEnvironmentOutboundSettings `json:"outboundSettings,omitempty"` - // IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. Must not overlap with any other // provided IP ranges. PlatformReservedCidr *string `json:"platformReservedCidr,omitempty"` @@ -2764,54 +1919,3 @@ type VolumeMount struct { // This must match the Name of a Volume. VolumeName *string `json:"volumeName,omitempty"` } - -// WorkloadProfile - Workload profile to scope container app execution. -type WorkloadProfile struct { - // REQUIRED; The maximum capacity. - MaximumCount *int32 `json:"maximumCount,omitempty"` - - // REQUIRED; The minimum capacity. - MinimumCount *int32 `json:"minimumCount,omitempty"` - - // REQUIRED; Workload profile type for the workloads to run on. - WorkloadProfileType *string `json:"workloadProfileType,omitempty"` -} - -// WorkloadProfileStates - Collection of all the workload Profile States for a Premium Managed Environment.. -type WorkloadProfileStates struct { - // Workload Profile resource specific properties. - Properties *WorkloadProfileStatesProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// WorkloadProfileStatesCollection - Collection of workloadProfileStates -type WorkloadProfileStatesCollection struct { - // REQUIRED; Collection of resources. - Value []*WorkloadProfileStates `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// WorkloadProfileStatesProperties - Workload Profile resource specific properties. -type WorkloadProfileStatesProperties struct { - // Current count of nodes. - CurrentCount *int32 `json:"currentCount,omitempty"` - - // Maximum count of nodes. - MaximumCount *int32 `json:"maximumCount,omitempty"` - - // Minimum count of instances. - MinimumCount *int32 `json:"minimumCount,omitempty"` -} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/models_serde.go b/sdk/resourcemanager/appcontainers/armappcontainers/models_serde.go index b321f09f5ff2..bb0bcc31f87a 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/models_serde.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/models_serde.go @@ -382,127 +382,6 @@ func (a *AvailableOperations) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type AvailableWorkloadProfile. -func (a AvailableWorkloadProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "systemData", a.SystemData) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableWorkloadProfile. -func (a *AvailableWorkloadProfile) 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", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &a.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AvailableWorkloadProfileProperties. -func (a AvailableWorkloadProfileProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "applicability", a.Applicability) - populate(objectMap, "billingMeterCategory", a.BillingMeterCategory) - populate(objectMap, "cores", a.Cores) - populate(objectMap, "displayName", a.DisplayName) - populate(objectMap, "memoryGiB", a.MemoryGiB) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableWorkloadProfileProperties. -func (a *AvailableWorkloadProfileProperties) 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", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "applicability": - err = unpopulate(val, "Applicability", &a.Applicability) - delete(rawMsg, key) - case "billingMeterCategory": - err = unpopulate(val, "BillingMeterCategory", &a.BillingMeterCategory) - delete(rawMsg, key) - case "cores": - err = unpopulate(val, "Cores", &a.Cores) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &a.DisplayName) - delete(rawMsg, key) - case "memoryGiB": - err = unpopulate(val, "MemoryGiB", &a.MemoryGiB) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AvailableWorkloadProfilesCollection. -func (a AvailableWorkloadProfilesCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableWorkloadProfilesCollection. -func (a *AvailableWorkloadProfilesCollection) 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", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type AzureActiveDirectory. func (a AzureActiveDirectory) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -795,166 +674,6 @@ func (a *AzureStaticWebAppsRegistration) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type BaseContainer. -func (b BaseContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "args", b.Args) - populate(objectMap, "command", b.Command) - populate(objectMap, "env", b.Env) - populate(objectMap, "image", b.Image) - populate(objectMap, "name", b.Name) - populate(objectMap, "resources", b.Resources) - populate(objectMap, "volumeMounts", b.VolumeMounts) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BaseContainer. -func (b *BaseContainer) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "args": - err = unpopulate(val, "Args", &b.Args) - delete(rawMsg, key) - case "command": - err = unpopulate(val, "Command", &b.Command) - delete(rawMsg, key) - case "env": - err = unpopulate(val, "Env", &b.Env) - delete(rawMsg, key) - case "image": - err = unpopulate(val, "Image", &b.Image) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "resources": - err = unpopulate(val, "Resources", &b.Resources) - delete(rawMsg, key) - case "volumeMounts": - err = unpopulate(val, "VolumeMounts", &b.VolumeMounts) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BillingMeter. -func (b BillingMeter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", b.ID) - populate(objectMap, "location", b.Location) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "systemData", b.SystemData) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BillingMeter. -func (b *BillingMeter) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &b.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &b.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &b.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &b.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &b.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BillingMeterCollection. -func (b BillingMeterCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", b.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BillingMeterCollection. -func (b *BillingMeterCollection) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &b.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BillingMeterProperties. -func (b BillingMeterProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "category", b.Category) - populate(objectMap, "displayName", b.DisplayName) - populate(objectMap, "meterType", b.MeterType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BillingMeterProperties. -func (b *BillingMeterProperties) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "category": - err = unpopulate(val, "Category", &b.Category) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &b.DisplayName) - delete(rawMsg, key) - case "meterType": - err = unpopulate(val, "MeterType", &b.MeterType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type Certificate. func (c Certificate) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1073,7 +792,6 @@ func (c CertificateProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "password", c.Password) populate(objectMap, "provisioningState", c.ProvisioningState) populate(objectMap, "publicKeyHash", c.PublicKeyHash) - populate(objectMap, "subjectAlternativeNames", c.SubjectAlternativeNames) populate(objectMap, "subjectName", c.SubjectName) populate(objectMap, "thumbprint", c.Thumbprint) populate(objectMap, "valid", c.Valid) @@ -1108,9 +826,6 @@ func (c *CertificateProperties) UnmarshalJSON(data []byte) error { case "publicKeyHash": err = unpopulate(val, "PublicKeyHash", &c.PublicKeyHash) delete(rawMsg, key) - case "subjectAlternativeNames": - err = unpopulate(val, "SubjectAlternativeNames", &c.SubjectAlternativeNames) - delete(rawMsg, key) case "subjectName": err = unpopulate(val, "SubjectName", &c.SubjectName) delete(rawMsg, key) @@ -1234,7 +949,6 @@ func (c Configuration) MarshalJSON() ([]byte, error) { populate(objectMap, "activeRevisionsMode", c.ActiveRevisionsMode) populate(objectMap, "dapr", c.Dapr) populate(objectMap, "ingress", c.Ingress) - populate(objectMap, "maxInactiveRevisions", c.MaxInactiveRevisions) populate(objectMap, "registries", c.Registries) populate(objectMap, "secrets", c.Secrets) return json.Marshal(objectMap) @@ -1258,9 +972,6 @@ func (c *Configuration) UnmarshalJSON(data []byte) error { case "ingress": err = unpopulate(val, "Ingress", &c.Ingress) delete(rawMsg, key) - case "maxInactiveRevisions": - err = unpopulate(val, "MaxInactiveRevisions", &c.MaxInactiveRevisions) - delete(rawMsg, key) case "registries": err = unpopulate(val, "Registries", &c.Registries) delete(rawMsg, key) @@ -1275,22 +986,22 @@ func (c *Configuration) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ConnectedEnvironment. -func (c ConnectedEnvironment) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Container. +func (c Container) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "extendedLocation", c.ExtendedLocation) - populate(objectMap, "id", c.ID) - populate(objectMap, "location", c.Location) + populate(objectMap, "args", c.Args) + populate(objectMap, "command", c.Command) + populate(objectMap, "env", c.Env) + populate(objectMap, "image", c.Image) 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) + populate(objectMap, "probes", c.Probes) + populate(objectMap, "resources", c.Resources) + populate(objectMap, "volumeMounts", c.VolumeMounts) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedEnvironment. -func (c *ConnectedEnvironment) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Container. +func (c *Container) 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) @@ -1298,29 +1009,29 @@ func (c *ConnectedEnvironment) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "extendedLocation": - err = unpopulate(val, "ExtendedLocation", &c.ExtendedLocation) + case "args": + err = unpopulate(val, "Args", &c.Args) delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &c.ID) + case "command": + err = unpopulate(val, "Command", &c.Command) delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &c.Location) + case "env": + err = unpopulate(val, "Env", &c.Env) + delete(rawMsg, key) + case "image": + err = unpopulate(val, "Image", &c.Image) 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) + case "probes": + err = unpopulate(val, "Probes", &c.Probes) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &c.Tags) + case "resources": + err = unpopulate(val, "Resources", &c.Resources) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) + case "volumeMounts": + err = unpopulate(val, "VolumeMounts", &c.VolumeMounts) delete(rawMsg, key) } if err != nil { @@ -1330,16 +1041,22 @@ func (c *ConnectedEnvironment) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ConnectedEnvironmentCollection. -func (c ConnectedEnvironmentCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContainerApp. +func (c ContainerApp) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", c.NextLink) - populate(objectMap, "value", c.Value) + populate(objectMap, "id", c.ID) + populate(objectMap, "identity", c.Identity) + 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 ConnectedEnvironmentCollection. -func (c *ConnectedEnvironmentCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerApp. +func (c *ContainerApp) 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) @@ -1347,89 +1064,14 @@ func (c *ConnectedEnvironmentCollection) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &c.NextLink) + case "id": + err = unpopulate(val, "ID", &c.ID) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &c.Value) - 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 ConnectedEnvironmentProperties. -func (c ConnectedEnvironmentProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "customDomainConfiguration", c.CustomDomainConfiguration) - populate(objectMap, "daprAIConnectionString", c.DaprAIConnectionString) - populate(objectMap, "defaultDomain", c.DefaultDomain) - populate(objectMap, "deploymentErrors", c.DeploymentErrors) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "staticIp", c.StaticIP) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedEnvironmentProperties. -func (c *ConnectedEnvironmentProperties) 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 "customDomainConfiguration": - err = unpopulate(val, "CustomDomainConfiguration", &c.CustomDomainConfiguration) - delete(rawMsg, key) - case "daprAIConnectionString": - err = unpopulate(val, "DaprAIConnectionString", &c.DaprAIConnectionString) - delete(rawMsg, key) - case "defaultDomain": - err = unpopulate(val, "DefaultDomain", &c.DefaultDomain) - delete(rawMsg, key) - case "deploymentErrors": - err = unpopulate(val, "DeploymentErrors", &c.DeploymentErrors) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - case "staticIp": - err = unpopulate(val, "StaticIP", &c.StaticIP) + case "identity": + err = unpopulate(val, "Identity", &c.Identity) 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 ConnectedEnvironmentStorage. -func (c ConnectedEnvironmentStorage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", c.ID) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "systemData", c.SystemData) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedEnvironmentStorage. -func (c *ConnectedEnvironmentStorage) 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) + case "location": + err = unpopulate(val, "Location", &c.Location) delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &c.Name) @@ -1440,6 +1082,9 @@ func (c *ConnectedEnvironmentStorage) UnmarshalJSON(data []byte) error { 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) @@ -1451,42 +1096,16 @@ func (c *ConnectedEnvironmentStorage) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ConnectedEnvironmentStorageProperties. -func (c ConnectedEnvironmentStorageProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "azureFile", c.AzureFile) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedEnvironmentStorageProperties. -func (c *ConnectedEnvironmentStorageProperties) 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 "azureFile": - err = unpopulate(val, "AzureFile", &c.AzureFile) - 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 ConnectedEnvironmentStoragesCollection. -func (c ConnectedEnvironmentStoragesCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContainerAppCollection. +func (c ContainerAppCollection) 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 ConnectedEnvironmentStoragesCollection. -func (c *ConnectedEnvironmentStoragesCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppCollection. +func (c *ContainerAppCollection) 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) @@ -1494,6 +1113,9 @@ func (c *ConnectedEnvironmentStoragesCollection) UnmarshalJSON(data []byte) erro 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) delete(rawMsg, key) @@ -1505,78 +1127,23 @@ func (c *ConnectedEnvironmentStoragesCollection) UnmarshalJSON(data []byte) erro return nil } -// MarshalJSON implements the json.Marshaller interface for type Container. -func (c Container) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "args", c.Args) - populate(objectMap, "command", c.Command) - populate(objectMap, "env", c.Env) - populate(objectMap, "image", c.Image) - populate(objectMap, "name", c.Name) - populate(objectMap, "probes", c.Probes) - populate(objectMap, "resources", c.Resources) - populate(objectMap, "volumeMounts", c.VolumeMounts) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Container. -func (c *Container) 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 "args": - err = unpopulate(val, "Args", &c.Args) - delete(rawMsg, key) - case "command": - err = unpopulate(val, "Command", &c.Command) - delete(rawMsg, key) - case "env": - err = unpopulate(val, "Env", &c.Env) - delete(rawMsg, key) - case "image": - err = unpopulate(val, "Image", &c.Image) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "probes": - err = unpopulate(val, "Probes", &c.Probes) - delete(rawMsg, key) - case "resources": - err = unpopulate(val, "Resources", &c.Resources) - delete(rawMsg, key) - case "volumeMounts": - err = unpopulate(val, "VolumeMounts", &c.VolumeMounts) - 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 ContainerApp. -func (c ContainerApp) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContainerAppProbe. +func (c ContainerAppProbe) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "extendedLocation", c.ExtendedLocation) - populate(objectMap, "id", c.ID) - populate(objectMap, "identity", c.Identity) - 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, "failureThreshold", c.FailureThreshold) + populate(objectMap, "httpGet", c.HTTPGet) + populate(objectMap, "initialDelaySeconds", c.InitialDelaySeconds) + populate(objectMap, "periodSeconds", c.PeriodSeconds) + populate(objectMap, "successThreshold", c.SuccessThreshold) + populate(objectMap, "tcpSocket", c.TCPSocket) + populate(objectMap, "terminationGracePeriodSeconds", c.TerminationGracePeriodSeconds) + populate(objectMap, "timeoutSeconds", c.TimeoutSeconds) populate(objectMap, "type", c.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerApp. -func (c *ContainerApp) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppProbe. +func (c *ContainerAppProbe) 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) @@ -1584,29 +1151,29 @@ func (c *ContainerApp) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "extendedLocation": - err = unpopulate(val, "ExtendedLocation", &c.ExtendedLocation) + case "failureThreshold": + err = unpopulate(val, "FailureThreshold", &c.FailureThreshold) delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &c.ID) + case "httpGet": + err = unpopulate(val, "HTTPGet", &c.HTTPGet) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &c.Identity) + case "initialDelaySeconds": + err = unpopulate(val, "InitialDelaySeconds", &c.InitialDelaySeconds) delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &c.Location) + case "periodSeconds": + err = unpopulate(val, "PeriodSeconds", &c.PeriodSeconds) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) + case "successThreshold": + err = unpopulate(val, "SuccessThreshold", &c.SuccessThreshold) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) + case "tcpSocket": + err = unpopulate(val, "TCPSocket", &c.TCPSocket) delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &c.SystemData) + case "terminationGracePeriodSeconds": + err = unpopulate(val, "TerminationGracePeriodSeconds", &c.TerminationGracePeriodSeconds) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &c.Tags) + case "timeoutSeconds": + err = unpopulate(val, "TimeoutSeconds", &c.TimeoutSeconds) delete(rawMsg, key) case "type": err = unpopulate(val, "Type", &c.Type) @@ -1619,21 +1186,19 @@ func (c *ContainerApp) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ContainerAppAuthToken. -func (c ContainerAppAuthToken) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContainerAppProbeHTTPGet. +func (c ContainerAppProbeHTTPGet) 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) + populate(objectMap, "httpHeaders", c.HTTPHeaders) + populate(objectMap, "host", c.Host) + populate(objectMap, "path", c.Path) + populate(objectMap, "port", c.Port) + populate(objectMap, "scheme", c.Scheme) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppAuthToken. -func (c *ContainerAppAuthToken) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppProbeHTTPGet. +func (c *ContainerAppProbeHTTPGet) 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) @@ -1641,1394 +1206,470 @@ func (c *ContainerAppAuthToken) UnmarshalJSON(data []byte) error { 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) + case "httpHeaders": + err = unpopulate(val, "HTTPHeaders", &c.HTTPHeaders) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &c.Tags) + case "host": + err = unpopulate(val, "Host", &c.Host) 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 ContainerAppAuthTokenProperties. -func (c ContainerAppAuthTokenProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "expires", c.Expires) - populate(objectMap, "token", c.Token) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppAuthTokenProperties. -func (c *ContainerAppAuthTokenProperties) 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 "expires": - err = unpopulateTimeRFC3339(val, "Expires", &c.Expires) - delete(rawMsg, key) - case "token": - err = unpopulate(val, "Token", &c.Token) - 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 ContainerAppCollection. -func (c ContainerAppCollection) 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 ContainerAppCollection. -func (c *ContainerAppCollection) 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) - 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 ContainerAppProbe. -func (c ContainerAppProbe) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "failureThreshold", c.FailureThreshold) - populate(objectMap, "httpGet", c.HTTPGet) - populate(objectMap, "initialDelaySeconds", c.InitialDelaySeconds) - populate(objectMap, "periodSeconds", c.PeriodSeconds) - populate(objectMap, "successThreshold", c.SuccessThreshold) - populate(objectMap, "tcpSocket", c.TCPSocket) - populate(objectMap, "terminationGracePeriodSeconds", c.TerminationGracePeriodSeconds) - populate(objectMap, "timeoutSeconds", c.TimeoutSeconds) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppProbe. -func (c *ContainerAppProbe) 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 "failureThreshold": - err = unpopulate(val, "FailureThreshold", &c.FailureThreshold) - delete(rawMsg, key) - case "httpGet": - err = unpopulate(val, "HTTPGet", &c.HTTPGet) - delete(rawMsg, key) - case "initialDelaySeconds": - err = unpopulate(val, "InitialDelaySeconds", &c.InitialDelaySeconds) - delete(rawMsg, key) - case "periodSeconds": - err = unpopulate(val, "PeriodSeconds", &c.PeriodSeconds) - delete(rawMsg, key) - case "successThreshold": - err = unpopulate(val, "SuccessThreshold", &c.SuccessThreshold) - delete(rawMsg, key) - case "tcpSocket": - err = unpopulate(val, "TCPSocket", &c.TCPSocket) - delete(rawMsg, key) - case "terminationGracePeriodSeconds": - err = unpopulate(val, "TerminationGracePeriodSeconds", &c.TerminationGracePeriodSeconds) - delete(rawMsg, key) - case "timeoutSeconds": - err = unpopulate(val, "TimeoutSeconds", &c.TimeoutSeconds) - 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 ContainerAppProbeHTTPGet. -func (c ContainerAppProbeHTTPGet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "httpHeaders", c.HTTPHeaders) - populate(objectMap, "host", c.Host) - populate(objectMap, "path", c.Path) - populate(objectMap, "port", c.Port) - populate(objectMap, "scheme", c.Scheme) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppProbeHTTPGet. -func (c *ContainerAppProbeHTTPGet) 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 "httpHeaders": - err = unpopulate(val, "HTTPHeaders", &c.HTTPHeaders) - delete(rawMsg, key) - case "host": - err = unpopulate(val, "Host", &c.Host) - delete(rawMsg, key) - case "path": - err = unpopulate(val, "Path", &c.Path) - delete(rawMsg, key) - case "port": - err = unpopulate(val, "Port", &c.Port) - delete(rawMsg, key) - case "scheme": - err = unpopulate(val, "Scheme", &c.Scheme) - 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 ContainerAppProbeHTTPGetHTTPHeadersItem. -func (c ContainerAppProbeHTTPGetHTTPHeadersItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", c.Name) - populate(objectMap, "value", c.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppProbeHTTPGetHTTPHeadersItem. -func (c *ContainerAppProbeHTTPGetHTTPHeadersItem) 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 "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &c.Value) - 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 ContainerAppProbeTCPSocket. -func (c ContainerAppProbeTCPSocket) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "host", c.Host) - populate(objectMap, "port", c.Port) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppProbeTCPSocket. -func (c *ContainerAppProbeTCPSocket) 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 "host": - err = unpopulate(val, "Host", &c.Host) + case "path": + err = unpopulate(val, "Path", &c.Path) delete(rawMsg, key) case "port": - err = unpopulate(val, "Port", &c.Port) - 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 ContainerAppProperties. -func (c ContainerAppProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "configuration", c.Configuration) - populate(objectMap, "customDomainVerificationId", c.CustomDomainVerificationID) - populate(objectMap, "environmentId", c.EnvironmentID) - populate(objectMap, "eventStreamEndpoint", c.EventStreamEndpoint) - populate(objectMap, "latestRevisionFqdn", c.LatestRevisionFqdn) - populate(objectMap, "latestRevisionName", c.LatestRevisionName) - populate(objectMap, "managedEnvironmentId", c.ManagedEnvironmentID) - populate(objectMap, "outboundIPAddresses", c.OutboundIPAddresses) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "template", c.Template) - populate(objectMap, "workloadProfileType", c.WorkloadProfileType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppProperties. -func (c *ContainerAppProperties) 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 "configuration": - err = unpopulate(val, "Configuration", &c.Configuration) - delete(rawMsg, key) - case "customDomainVerificationId": - err = unpopulate(val, "CustomDomainVerificationID", &c.CustomDomainVerificationID) - delete(rawMsg, key) - case "environmentId": - err = unpopulate(val, "EnvironmentID", &c.EnvironmentID) - delete(rawMsg, key) - case "eventStreamEndpoint": - err = unpopulate(val, "EventStreamEndpoint", &c.EventStreamEndpoint) - delete(rawMsg, key) - case "latestRevisionFqdn": - err = unpopulate(val, "LatestRevisionFqdn", &c.LatestRevisionFqdn) - delete(rawMsg, key) - case "latestRevisionName": - err = unpopulate(val, "LatestRevisionName", &c.LatestRevisionName) - delete(rawMsg, key) - case "managedEnvironmentId": - err = unpopulate(val, "ManagedEnvironmentID", &c.ManagedEnvironmentID) - delete(rawMsg, key) - case "outboundIPAddresses": - err = unpopulate(val, "OutboundIPAddresses", &c.OutboundIPAddresses) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - case "template": - err = unpopulate(val, "Template", &c.Template) - delete(rawMsg, key) - case "workloadProfileType": - err = unpopulate(val, "WorkloadProfileType", &c.WorkloadProfileType) - 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 ContainerAppSecret. -func (c ContainerAppSecret) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", c.Name) - populate(objectMap, "value", c.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppSecret. -func (c *ContainerAppSecret) 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 "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &c.Value) - 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 ContainerResources. -func (c ContainerResources) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "cpu", c.CPU) - populate(objectMap, "ephemeralStorage", c.EphemeralStorage) - populate(objectMap, "memory", c.Memory) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerResources. -func (c *ContainerResources) 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 "cpu": - err = unpopulate(val, "CPU", &c.CPU) - delete(rawMsg, key) - case "ephemeralStorage": - err = unpopulate(val, "EphemeralStorage", &c.EphemeralStorage) - delete(rawMsg, key) - case "memory": - err = unpopulate(val, "Memory", &c.Memory) - 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 CookieExpiration. -func (c CookieExpiration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "convention", c.Convention) - populate(objectMap, "timeToExpiration", c.TimeToExpiration) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CookieExpiration. -func (c *CookieExpiration) 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 "convention": - err = unpopulate(val, "Convention", &c.Convention) - delete(rawMsg, key) - case "timeToExpiration": - err = unpopulate(val, "TimeToExpiration", &c.TimeToExpiration) - 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 CustomDomain. -func (c CustomDomain) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "bindingType", c.BindingType) - populate(objectMap, "certificateId", c.CertificateID) - populate(objectMap, "name", c.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomain. -func (c *CustomDomain) 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 "bindingType": - err = unpopulate(val, "BindingType", &c.BindingType) - delete(rawMsg, key) - case "certificateId": - err = unpopulate(val, "CertificateID", &c.CertificateID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - 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 CustomDomainConfiguration. -func (c CustomDomainConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateByteArray(objectMap, "certificatePassword", c.CertificatePassword, runtime.Base64StdFormat) - populateByteArray(objectMap, "certificateValue", c.CertificateValue, runtime.Base64StdFormat) - populate(objectMap, "customDomainVerificationId", c.CustomDomainVerificationID) - populate(objectMap, "dnsSuffix", c.DNSSuffix) - populateTimeRFC3339(objectMap, "expirationDate", c.ExpirationDate) - populate(objectMap, "subjectName", c.SubjectName) - populate(objectMap, "thumbprint", c.Thumbprint) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainConfiguration. -func (c *CustomDomainConfiguration) 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 "certificatePassword": - err = runtime.DecodeByteArray(string(val), &c.CertificatePassword, runtime.Base64StdFormat) - delete(rawMsg, key) - case "certificateValue": - err = runtime.DecodeByteArray(string(val), &c.CertificateValue, runtime.Base64StdFormat) - delete(rawMsg, key) - case "customDomainVerificationId": - err = unpopulate(val, "CustomDomainVerificationID", &c.CustomDomainVerificationID) - delete(rawMsg, key) - case "dnsSuffix": - err = unpopulate(val, "DNSSuffix", &c.DNSSuffix) - delete(rawMsg, key) - case "expirationDate": - err = unpopulateTimeRFC3339(val, "ExpirationDate", &c.ExpirationDate) - delete(rawMsg, key) - case "subjectName": - err = unpopulate(val, "SubjectName", &c.SubjectName) - delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &c.Thumbprint) - 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 CustomHostnameAnalysisResult. -func (c CustomHostnameAnalysisResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "aRecords", c.ARecords) - populate(objectMap, "alternateCNameRecords", c.AlternateCNameRecords) - populate(objectMap, "alternateTxtRecords", c.AlternateTxtRecords) - populate(objectMap, "cNameRecords", c.CNameRecords) - populate(objectMap, "conflictWithEnvironmentCustomDomain", c.ConflictWithEnvironmentCustomDomain) - populate(objectMap, "conflictingContainerAppResourceId", c.ConflictingContainerAppResourceID) - populate(objectMap, "customDomainVerificationFailureInfo", c.CustomDomainVerificationFailureInfo) - populate(objectMap, "customDomainVerificationTest", c.CustomDomainVerificationTest) - populate(objectMap, "hasConflictOnManagedEnvironment", c.HasConflictOnManagedEnvironment) - populate(objectMap, "hostName", c.HostName) - populate(objectMap, "isHostnameAlreadyVerified", c.IsHostnameAlreadyVerified) - populate(objectMap, "txtRecords", c.TxtRecords) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomHostnameAnalysisResult. -func (c *CustomHostnameAnalysisResult) 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 "aRecords": - err = unpopulate(val, "ARecords", &c.ARecords) - delete(rawMsg, key) - case "alternateCNameRecords": - err = unpopulate(val, "AlternateCNameRecords", &c.AlternateCNameRecords) - delete(rawMsg, key) - case "alternateTxtRecords": - err = unpopulate(val, "AlternateTxtRecords", &c.AlternateTxtRecords) - delete(rawMsg, key) - case "cNameRecords": - err = unpopulate(val, "CNameRecords", &c.CNameRecords) - delete(rawMsg, key) - case "conflictWithEnvironmentCustomDomain": - err = unpopulate(val, "ConflictWithEnvironmentCustomDomain", &c.ConflictWithEnvironmentCustomDomain) - delete(rawMsg, key) - case "conflictingContainerAppResourceId": - err = unpopulate(val, "ConflictingContainerAppResourceID", &c.ConflictingContainerAppResourceID) - delete(rawMsg, key) - case "customDomainVerificationFailureInfo": - err = unpopulate(val, "CustomDomainVerificationFailureInfo", &c.CustomDomainVerificationFailureInfo) - delete(rawMsg, key) - case "customDomainVerificationTest": - err = unpopulate(val, "CustomDomainVerificationTest", &c.CustomDomainVerificationTest) - delete(rawMsg, key) - case "hasConflictOnManagedEnvironment": - err = unpopulate(val, "HasConflictOnManagedEnvironment", &c.HasConflictOnManagedEnvironment) - delete(rawMsg, key) - case "hostName": - err = unpopulate(val, "HostName", &c.HostName) - delete(rawMsg, key) - case "isHostnameAlreadyVerified": - err = unpopulate(val, "IsHostnameAlreadyVerified", &c.IsHostnameAlreadyVerified) - delete(rawMsg, key) - case "txtRecords": - err = unpopulate(val, "TxtRecords", &c.TxtRecords) - 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 CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo. -func (c CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "code", c.Code) - populate(objectMap, "details", c.Details) - populate(objectMap, "message", c.Message) - populate(objectMap, "target", c.Target) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo. -func (c *CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo) 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 "code": - err = unpopulate(val, "Code", &c.Code) - delete(rawMsg, key) - case "details": - err = unpopulate(val, "Details", &c.Details) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &c.Message) - delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &c.Target) - 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 CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem. -func (c CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "code", c.Code) - populate(objectMap, "message", c.Message) - populate(objectMap, "target", c.Target) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem. -func (c *CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem) 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 "code": - err = unpopulate(val, "Code", &c.Code) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &c.Message) - delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &c.Target) - 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 CustomOpenIDConnectProvider. -func (c CustomOpenIDConnectProvider) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", c.Enabled) - populate(objectMap, "login", c.Login) - populate(objectMap, "registration", c.Registration) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomOpenIDConnectProvider. -func (c *CustomOpenIDConnectProvider) 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 "enabled": - err = unpopulate(val, "Enabled", &c.Enabled) - delete(rawMsg, key) - case "login": - err = unpopulate(val, "Login", &c.Login) - delete(rawMsg, key) - case "registration": - err = unpopulate(val, "Registration", &c.Registration) - 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 CustomScaleRule. -func (c CustomScaleRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "auth", c.Auth) - populate(objectMap, "metadata", c.Metadata) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomScaleRule. -func (c *CustomScaleRule) 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 "auth": - err = unpopulate(val, "Auth", &c.Auth) - delete(rawMsg, key) - case "metadata": - err = unpopulate(val, "Metadata", &c.Metadata) - 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 Dapr. -func (d Dapr) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "appId", d.AppID) - populate(objectMap, "appPort", d.AppPort) - populate(objectMap, "appProtocol", d.AppProtocol) - populate(objectMap, "enableApiLogging", d.EnableAPILogging) - populate(objectMap, "enabled", d.Enabled) - populate(objectMap, "httpMaxRequestSize", d.HTTPMaxRequestSize) - populate(objectMap, "httpReadBufferSize", d.HTTPReadBufferSize) - populate(objectMap, "logLevel", d.LogLevel) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Dapr. -func (d *Dapr) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appId": - err = unpopulate(val, "AppID", &d.AppID) - delete(rawMsg, key) - case "appPort": - err = unpopulate(val, "AppPort", &d.AppPort) - delete(rawMsg, key) - case "appProtocol": - err = unpopulate(val, "AppProtocol", &d.AppProtocol) - delete(rawMsg, key) - case "enableApiLogging": - err = unpopulate(val, "EnableAPILogging", &d.EnableAPILogging) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &d.Enabled) - delete(rawMsg, key) - case "httpMaxRequestSize": - err = unpopulate(val, "HTTPMaxRequestSize", &d.HTTPMaxRequestSize) - delete(rawMsg, key) - case "httpReadBufferSize": - err = unpopulate(val, "HTTPReadBufferSize", &d.HTTPReadBufferSize) - delete(rawMsg, key) - case "logLevel": - err = unpopulate(val, "LogLevel", &d.LogLevel) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DaprComponent. -func (d DaprComponent) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", d.ID) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "systemData", d.SystemData) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprComponent. -func (d *DaprComponent) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &d.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &d.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DaprComponentProperties. -func (d DaprComponentProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "componentType", d.ComponentType) - populate(objectMap, "ignoreErrors", d.IgnoreErrors) - populate(objectMap, "initTimeout", d.InitTimeout) - populate(objectMap, "metadata", d.Metadata) - populate(objectMap, "scopes", d.Scopes) - populate(objectMap, "secretStoreComponent", d.SecretStoreComponent) - populate(objectMap, "secrets", d.Secrets) - populate(objectMap, "version", d.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprComponentProperties. -func (d *DaprComponentProperties) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "componentType": - err = unpopulate(val, "ComponentType", &d.ComponentType) - delete(rawMsg, key) - case "ignoreErrors": - err = unpopulate(val, "IgnoreErrors", &d.IgnoreErrors) - delete(rawMsg, key) - case "initTimeout": - err = unpopulate(val, "InitTimeout", &d.InitTimeout) - delete(rawMsg, key) - case "metadata": - err = unpopulate(val, "Metadata", &d.Metadata) - delete(rawMsg, key) - case "scopes": - err = unpopulate(val, "Scopes", &d.Scopes) - delete(rawMsg, key) - case "secretStoreComponent": - err = unpopulate(val, "SecretStoreComponent", &d.SecretStoreComponent) - delete(rawMsg, key) - case "secrets": - err = unpopulate(val, "Secrets", &d.Secrets) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &d.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DaprComponentsCollection. -func (d DaprComponentsCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", d.NextLink) - populate(objectMap, "value", d.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprComponentsCollection. -func (d *DaprComponentsCollection) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &d.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &d.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DaprMetadata. -func (d DaprMetadata) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", d.Name) - populate(objectMap, "secretRef", d.SecretRef) - populate(objectMap, "value", d.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprMetadata. -func (d *DaprMetadata) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "secretRef": - err = unpopulate(val, "SecretRef", &d.SecretRef) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &d.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DaprSecret. -func (d DaprSecret) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", d.Name) - populate(objectMap, "value", d.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprSecret. -func (d *DaprSecret) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &d.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DaprSecretsCollection. -func (d DaprSecretsCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", d.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprSecretsCollection. -func (d *DaprSecretsCollection) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &d.Value) + err = unpopulate(val, "Port", &c.Port) + delete(rawMsg, key) + case "scheme": + err = unpopulate(val, "Scheme", &c.Scheme) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DefaultAuthorizationPolicy. -func (d DefaultAuthorizationPolicy) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContainerAppProbeHTTPGetHTTPHeadersItem. +func (c ContainerAppProbeHTTPGetHTTPHeadersItem) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "allowedApplications", d.AllowedApplications) - populate(objectMap, "allowedPrincipals", d.AllowedPrincipals) + populate(objectMap, "name", c.Name) + populate(objectMap, "value", c.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultAuthorizationPolicy. -func (d *DefaultAuthorizationPolicy) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppProbeHTTPGetHTTPHeadersItem. +func (c *ContainerAppProbeHTTPGetHTTPHeadersItem) 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", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "allowedApplications": - err = unpopulate(val, "AllowedApplications", &d.AllowedApplications) + case "name": + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) - case "allowedPrincipals": - err = unpopulate(val, "AllowedPrincipals", &d.AllowedPrincipals) + case "value": + err = unpopulate(val, "Value", &c.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DefaultErrorResponse. -func (d DefaultErrorResponse) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContainerAppProbeTCPSocket. +func (c ContainerAppProbeTCPSocket) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "error", d.Error) + populate(objectMap, "host", c.Host) + populate(objectMap, "port", c.Port) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultErrorResponse. -func (d *DefaultErrorResponse) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppProbeTCPSocket. +func (c *ContainerAppProbeTCPSocket) 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", d, err) + 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", &d.Error) + case "host": + err = unpopulate(val, "Host", &c.Host) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &c.Port) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DefaultErrorResponseError. -func (d DefaultErrorResponseError) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContainerAppProperties. +func (c ContainerAppProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "code", d.Code) - populate(objectMap, "details", d.Details) - populate(objectMap, "innererror", d.Innererror) - populate(objectMap, "message", d.Message) - populate(objectMap, "target", d.Target) + populate(objectMap, "configuration", c.Configuration) + populate(objectMap, "customDomainVerificationId", c.CustomDomainVerificationID) + populate(objectMap, "latestRevisionFqdn", c.LatestRevisionFqdn) + populate(objectMap, "latestRevisionName", c.LatestRevisionName) + populate(objectMap, "managedEnvironmentId", c.ManagedEnvironmentID) + populate(objectMap, "outboundIPAddresses", c.OutboundIPAddresses) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "template", c.Template) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultErrorResponseError. -func (d *DefaultErrorResponseError) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppProperties. +func (c *ContainerAppProperties) 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", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "code": - err = unpopulate(val, "Code", &d.Code) + case "configuration": + err = unpopulate(val, "Configuration", &c.Configuration) delete(rawMsg, key) - case "details": - err = unpopulate(val, "Details", &d.Details) + case "customDomainVerificationId": + err = unpopulate(val, "CustomDomainVerificationID", &c.CustomDomainVerificationID) delete(rawMsg, key) - case "innererror": - err = unpopulate(val, "Innererror", &d.Innererror) + case "latestRevisionFqdn": + err = unpopulate(val, "LatestRevisionFqdn", &c.LatestRevisionFqdn) delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &d.Message) + case "latestRevisionName": + err = unpopulate(val, "LatestRevisionName", &c.LatestRevisionName) delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &d.Target) + case "managedEnvironmentId": + err = unpopulate(val, "ManagedEnvironmentID", &c.ManagedEnvironmentID) + delete(rawMsg, key) + case "outboundIPAddresses": + err = unpopulate(val, "OutboundIPAddresses", &c.OutboundIPAddresses) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "template": + err = unpopulate(val, "Template", &c.Template) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DefaultErrorResponseErrorDetailsItem. -func (d DefaultErrorResponseErrorDetailsItem) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContainerAppSecret. +func (c ContainerAppSecret) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "code", d.Code) - populate(objectMap, "message", d.Message) - populate(objectMap, "target", d.Target) + populate(objectMap, "name", c.Name) + populate(objectMap, "value", c.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultErrorResponseErrorDetailsItem. -func (d *DefaultErrorResponseErrorDetailsItem) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppSecret. +func (c *ContainerAppSecret) 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", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "code": - err = unpopulate(val, "Code", &d.Code) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &d.Message) + case "name": + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &d.Target) + case "value": + err = unpopulate(val, "Value", &c.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DiagnosticDataProviderMetadata. -func (d DiagnosticDataProviderMetadata) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContainerResources. +func (c ContainerResources) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "propertyBag", d.PropertyBag) - populate(objectMap, "providerName", d.ProviderName) + populate(objectMap, "cpu", c.CPU) + populate(objectMap, "ephemeralStorage", c.EphemeralStorage) + populate(objectMap, "memory", c.Memory) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticDataProviderMetadata. -func (d *DiagnosticDataProviderMetadata) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerResources. +func (c *ContainerResources) 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", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "propertyBag": - err = unpopulate(val, "PropertyBag", &d.PropertyBag) + case "cpu": + err = unpopulate(val, "CPU", &c.CPU) + delete(rawMsg, key) + case "ephemeralStorage": + err = unpopulate(val, "EphemeralStorage", &c.EphemeralStorage) delete(rawMsg, key) - case "providerName": - err = unpopulate(val, "ProviderName", &d.ProviderName) + case "memory": + err = unpopulate(val, "Memory", &c.Memory) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DiagnosticDataProviderMetadataPropertyBagItem. -func (d DiagnosticDataProviderMetadataPropertyBagItem) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CookieExpiration. +func (c CookieExpiration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "name", d.Name) - populate(objectMap, "value", d.Value) + populate(objectMap, "convention", c.Convention) + populate(objectMap, "timeToExpiration", c.TimeToExpiration) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticDataProviderMetadataPropertyBagItem. -func (d *DiagnosticDataProviderMetadataPropertyBagItem) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CookieExpiration. +func (c *CookieExpiration) 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", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) + case "convention": + err = unpopulate(val, "Convention", &c.Convention) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &d.Value) + case "timeToExpiration": + err = unpopulate(val, "TimeToExpiration", &c.TimeToExpiration) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DiagnosticDataTableResponseColumn. -func (d DiagnosticDataTableResponseColumn) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CustomDomain. +func (c CustomDomain) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "columnName", d.ColumnName) - populate(objectMap, "columnType", d.ColumnType) - populate(objectMap, "dataType", d.DataType) + populate(objectMap, "bindingType", c.BindingType) + populate(objectMap, "certificateId", c.CertificateID) + populate(objectMap, "name", c.Name) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticDataTableResponseColumn. -func (d *DiagnosticDataTableResponseColumn) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomain. +func (c *CustomDomain) 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", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "columnName": - err = unpopulate(val, "ColumnName", &d.ColumnName) + case "bindingType": + err = unpopulate(val, "BindingType", &c.BindingType) delete(rawMsg, key) - case "columnType": - err = unpopulate(val, "ColumnType", &d.ColumnType) + case "certificateId": + err = unpopulate(val, "CertificateID", &c.CertificateID) delete(rawMsg, key) - case "dataType": - err = unpopulate(val, "DataType", &d.DataType) + case "name": + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DiagnosticDataTableResponseObject. -func (d DiagnosticDataTableResponseObject) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CustomHostnameAnalysisResult. +func (c CustomHostnameAnalysisResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "columns", d.Columns) - populate(objectMap, "rows", d.Rows) - populate(objectMap, "tableName", d.TableName) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "type", c.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticDataTableResponseObject. -func (d *DiagnosticDataTableResponseObject) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomHostnameAnalysisResult. +func (c *CustomHostnameAnalysisResult) 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", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "columns": - err = unpopulate(val, "Columns", &d.Columns) + case "id": + err = unpopulate(val, "ID", &c.ID) + 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 "rows": - err = unpopulate(val, "Rows", &d.Rows) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) delete(rawMsg, key) - case "tableName": - err = unpopulate(val, "TableName", &d.TableName) + case "type": + err = unpopulate(val, "Type", &c.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DiagnosticRendering. -func (d DiagnosticRendering) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CustomHostnameAnalysisResultProperties. +func (c CustomHostnameAnalysisResultProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "description", d.Description) - populate(objectMap, "isVisible", d.IsVisible) - populate(objectMap, "title", d.Title) - populate(objectMap, "type", d.Type) + populate(objectMap, "aRecords", c.ARecords) + populate(objectMap, "alternateCNameRecords", c.AlternateCNameRecords) + populate(objectMap, "alternateTxtRecords", c.AlternateTxtRecords) + populate(objectMap, "cNameRecords", c.CNameRecords) + populate(objectMap, "conflictingContainerAppResourceId", c.ConflictingContainerAppResourceID) + populate(objectMap, "customDomainVerificationFailureInfo", c.CustomDomainVerificationFailureInfo) + populate(objectMap, "customDomainVerificationTest", c.CustomDomainVerificationTest) + populate(objectMap, "hasConflictOnManagedEnvironment", c.HasConflictOnManagedEnvironment) + populate(objectMap, "hostName", c.HostName) + populate(objectMap, "isHostnameAlreadyVerified", c.IsHostnameAlreadyVerified) + populate(objectMap, "txtRecords", c.TxtRecords) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticRendering. -func (d *DiagnosticRendering) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomHostnameAnalysisResultProperties. +func (c *CustomHostnameAnalysisResultProperties) 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", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "description": - err = unpopulate(val, "Description", &d.Description) + case "aRecords": + err = unpopulate(val, "ARecords", &c.ARecords) + delete(rawMsg, key) + case "alternateCNameRecords": + err = unpopulate(val, "AlternateCNameRecords", &c.AlternateCNameRecords) + delete(rawMsg, key) + case "alternateTxtRecords": + err = unpopulate(val, "AlternateTxtRecords", &c.AlternateTxtRecords) + delete(rawMsg, key) + case "cNameRecords": + err = unpopulate(val, "CNameRecords", &c.CNameRecords) delete(rawMsg, key) - case "isVisible": - err = unpopulate(val, "IsVisible", &d.IsVisible) + case "conflictingContainerAppResourceId": + err = unpopulate(val, "ConflictingContainerAppResourceID", &c.ConflictingContainerAppResourceID) + delete(rawMsg, key) + case "customDomainVerificationFailureInfo": + err = unpopulate(val, "CustomDomainVerificationFailureInfo", &c.CustomDomainVerificationFailureInfo) + delete(rawMsg, key) + case "customDomainVerificationTest": + err = unpopulate(val, "CustomDomainVerificationTest", &c.CustomDomainVerificationTest) delete(rawMsg, key) - case "title": - err = unpopulate(val, "Title", &d.Title) + case "hasConflictOnManagedEnvironment": + err = unpopulate(val, "HasConflictOnManagedEnvironment", &c.HasConflictOnManagedEnvironment) + delete(rawMsg, key) + case "hostName": + err = unpopulate(val, "HostName", &c.HostName) + delete(rawMsg, key) + case "isHostnameAlreadyVerified": + err = unpopulate(val, "IsHostnameAlreadyVerified", &c.IsHostnameAlreadyVerified) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) + case "txtRecords": + err = unpopulate(val, "TxtRecords", &c.TxtRecords) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DiagnosticSupportTopic. -func (d DiagnosticSupportTopic) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CustomOpenIDConnectProvider. +func (c CustomOpenIDConnectProvider) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", d.ID) - populate(objectMap, "pesId", d.PesID) + populate(objectMap, "enabled", c.Enabled) + populate(objectMap, "login", c.Login) + populate(objectMap, "registration", c.Registration) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticSupportTopic. -func (d *DiagnosticSupportTopic) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomOpenIDConnectProvider. +func (c *CustomOpenIDConnectProvider) 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", d, err) + 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", &d.ID) + case "enabled": + err = unpopulate(val, "Enabled", &c.Enabled) delete(rawMsg, key) - case "pesId": - err = unpopulate(val, "PesID", &d.PesID) + case "login": + err = unpopulate(val, "Login", &c.Login) + delete(rawMsg, key) + case "registration": + err = unpopulate(val, "Registration", &c.Registration) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type Diagnostics. -func (d Diagnostics) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CustomScaleRule. +func (c CustomScaleRule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", d.ID) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "systemData", d.SystemData) - populate(objectMap, "type", d.Type) + populate(objectMap, "auth", c.Auth) + populate(objectMap, "metadata", c.Metadata) + populate(objectMap, "type", c.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Diagnostics. -func (d *Diagnostics) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomScaleRule. +func (c *CustomScaleRule) 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", d, err) + 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", &d.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &d.Properties) + case "auth": + err = unpopulate(val, "Auth", &c.Auth) delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &d.SystemData) + case "metadata": + err = unpopulate(val, "Metadata", &c.Metadata) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &d.Type) + err = unpopulate(val, "Type", &c.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DiagnosticsCollection. -func (d DiagnosticsCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Dapr. +func (d Dapr) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", d.NextLink) - populate(objectMap, "value", d.Value) + populate(objectMap, "appId", d.AppID) + populate(objectMap, "appPort", d.AppPort) + populate(objectMap, "appProtocol", d.AppProtocol) + populate(objectMap, "enabled", d.Enabled) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticsCollection. -func (d *DiagnosticsCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Dapr. +func (d *Dapr) 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", d, err) @@ -3036,42 +1677,17 @@ func (d *DiagnosticsCollection) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &d.NextLink) + case "appId": + err = unpopulate(val, "AppID", &d.AppID) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &d.Value) + case "appPort": + err = unpopulate(val, "AppPort", &d.AppPort) delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DiagnosticsDataAPIResponse. -func (d DiagnosticsDataAPIResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "renderingProperties", d.RenderingProperties) - populate(objectMap, "table", d.Table) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticsDataAPIResponse. -func (d *DiagnosticsDataAPIResponse) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "renderingProperties": - err = unpopulate(val, "RenderingProperties", &d.RenderingProperties) + case "appProtocol": + err = unpopulate(val, "AppProtocol", &d.AppProtocol) delete(rawMsg, key) - case "table": - err = unpopulate(val, "Table", &d.Table) + case "enabled": + err = unpopulate(val, "Enabled", &d.Enabled) delete(rawMsg, key) } if err != nil { @@ -3081,23 +1697,19 @@ func (d *DiagnosticsDataAPIResponse) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DiagnosticsDefinition. -func (d DiagnosticsDefinition) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DaprComponent. +func (d DaprComponent) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "analysisTypes", d.AnalysisTypes) - populate(objectMap, "author", d.Author) - populate(objectMap, "category", d.Category) - populate(objectMap, "description", d.Description) populate(objectMap, "id", d.ID) populate(objectMap, "name", d.Name) - populate(objectMap, "score", d.Score) - populate(objectMap, "supportTopicList", d.SupportTopicList) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "systemData", d.SystemData) populate(objectMap, "type", d.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticsDefinition. -func (d *DiagnosticsDefinition) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DaprComponent. +func (d *DaprComponent) 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", d, err) @@ -3105,29 +1717,17 @@ func (d *DiagnosticsDefinition) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "analysisTypes": - err = unpopulate(val, "AnalysisTypes", &d.AnalysisTypes) - delete(rawMsg, key) - case "author": - err = unpopulate(val, "Author", &d.Author) - delete(rawMsg, key) - case "category": - err = unpopulate(val, "Category", &d.Category) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &d.Description) - delete(rawMsg, key) case "id": err = unpopulate(val, "ID", &d.ID) delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &d.Name) delete(rawMsg, key) - case "score": - err = unpopulate(val, "Score", &d.Score) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) delete(rawMsg, key) - case "supportTopicList": - err = unpopulate(val, "SupportTopicList", &d.SupportTopicList) + case "systemData": + err = unpopulate(val, "SystemData", &d.SystemData) delete(rawMsg, key) case "type": err = unpopulate(val, "Type", &d.Type) @@ -3140,18 +1740,21 @@ func (d *DiagnosticsDefinition) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DiagnosticsProperties. -func (d DiagnosticsProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DaprComponentProperties. +func (d DaprComponentProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "dataProviderMetadata", d.DataProviderMetadata) - populate(objectMap, "dataset", d.Dataset) + populate(objectMap, "componentType", d.ComponentType) + populate(objectMap, "ignoreErrors", d.IgnoreErrors) + populate(objectMap, "initTimeout", d.InitTimeout) populate(objectMap, "metadata", d.Metadata) - populate(objectMap, "status", d.Status) + populate(objectMap, "scopes", d.Scopes) + populate(objectMap, "secrets", d.Secrets) + populate(objectMap, "version", d.Version) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticsProperties. -func (d *DiagnosticsProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DaprComponentProperties. +func (d *DaprComponentProperties) 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", d, err) @@ -3159,17 +1762,26 @@ func (d *DiagnosticsProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "dataProviderMetadata": - err = unpopulate(val, "DataProviderMetadata", &d.DataProviderMetadata) + case "componentType": + err = unpopulate(val, "ComponentType", &d.ComponentType) + delete(rawMsg, key) + case "ignoreErrors": + err = unpopulate(val, "IgnoreErrors", &d.IgnoreErrors) delete(rawMsg, key) - case "dataset": - err = unpopulate(val, "Dataset", &d.Dataset) + case "initTimeout": + err = unpopulate(val, "InitTimeout", &d.InitTimeout) delete(rawMsg, key) case "metadata": err = unpopulate(val, "Metadata", &d.Metadata) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &d.Status) + case "scopes": + err = unpopulate(val, "Scopes", &d.Scopes) + delete(rawMsg, key) + case "secrets": + err = unpopulate(val, "Secrets", &d.Secrets) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &d.Version) delete(rawMsg, key) } if err != nil { @@ -3179,16 +1791,16 @@ func (d *DiagnosticsProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DiagnosticsStatus. -func (d DiagnosticsStatus) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DaprComponentsCollection. +func (d DaprComponentsCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "message", d.Message) - populate(objectMap, "statusId", d.StatusID) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticsStatus. -func (d *DiagnosticsStatus) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DaprComponentsCollection. +func (d *DaprComponentsCollection) 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", d, err) @@ -3196,11 +1808,11 @@ func (d *DiagnosticsStatus) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "message": - err = unpopulate(val, "Message", &d.Message) + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) delete(rawMsg, key) - case "statusId": - err = unpopulate(val, "StatusID", &d.StatusID) + case "value": + err = unpopulate(val, "Value", &d.Value) delete(rawMsg, key) } if err != nil { @@ -3210,261 +1822,215 @@ func (d *DiagnosticsStatus) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type EnvironmentAuthToken. -func (e EnvironmentAuthToken) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DaprMetadata. +func (d DaprMetadata) 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) + populate(objectMap, "name", d.Name) + populate(objectMap, "secretRef", d.SecretRef) + populate(objectMap, "value", d.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentAuthToken. -func (e *EnvironmentAuthToken) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DaprMetadata. +func (d *DaprMetadata) 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) + return fmt.Errorf("unmarshalling type %T: %v", d, 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) + err = unpopulate(val, "Name", &d.Name) 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 EnvironmentAuthTokenProperties. -func (e EnvironmentAuthTokenProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "expires", e.Expires) - populate(objectMap, "token", e.Token) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentAuthTokenProperties. -func (e *EnvironmentAuthTokenProperties) 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 "expires": - err = unpopulateTimeRFC3339(val, "Expires", &e.Expires) + case "secretRef": + err = unpopulate(val, "SecretRef", &d.SecretRef) delete(rawMsg, key) - case "token": - err = unpopulate(val, "Token", &e.Token) + case "value": + err = unpopulate(val, "Value", &d.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type EnvironmentSKUProperties. -func (e EnvironmentSKUProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DaprSecretsCollection. +func (d DaprSecretsCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "name", e.Name) + populate(objectMap, "value", d.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentSKUProperties. -func (e *EnvironmentSKUProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DaprSecretsCollection. +func (d *DaprSecretsCollection) 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) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "name": - err = unpopulate(val, "Name", &e.Name) + case "value": + err = unpopulate(val, "Value", &d.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type EnvironmentVar. -func (e EnvironmentVar) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DefaultAuthorizationPolicy. +func (d DefaultAuthorizationPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "name", e.Name) - populate(objectMap, "secretRef", e.SecretRef) - populate(objectMap, "value", e.Value) + populate(objectMap, "allowedApplications", d.AllowedApplications) + populate(objectMap, "allowedPrincipals", d.AllowedPrincipals) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentVar. -func (e *EnvironmentVar) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultAuthorizationPolicy. +func (d *DefaultAuthorizationPolicy) 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) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "secretRef": - err = unpopulate(val, "SecretRef", &e.SecretRef) + case "allowedApplications": + err = unpopulate(val, "AllowedApplications", &d.AllowedApplications) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) + case "allowedPrincipals": + err = unpopulate(val, "AllowedPrincipals", &d.AllowedPrincipals) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo. -func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DefaultErrorResponse. +func (d DefaultErrorResponse) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "info", &e.Info) - populate(objectMap, "type", e.Type) + populate(objectMap, "error", d.Error) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo. -func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultErrorResponse. +func (d *DefaultErrorResponse) 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) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "info": - err = unpopulate(val, "Info", &e.Info) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) + case "error": + err = unpopulate(val, "Error", &d.Error) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ErrorDetail. -func (e ErrorDetail) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DefaultErrorResponseError. +func (d DefaultErrorResponseError) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "additionalInfo", e.AdditionalInfo) - populate(objectMap, "code", e.Code) - populate(objectMap, "details", e.Details) - populate(objectMap, "message", e.Message) - populate(objectMap, "target", e.Target) + populate(objectMap, "code", d.Code) + populate(objectMap, "details", d.Details) + populate(objectMap, "innererror", d.Innererror) + populate(objectMap, "message", d.Message) + populate(objectMap, "target", d.Target) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail. -func (e *ErrorDetail) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultErrorResponseError. +func (d *DefaultErrorResponseError) 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) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "additionalInfo": - err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) - delete(rawMsg, key) case "code": - err = unpopulate(val, "Code", &e.Code) + err = unpopulate(val, "Code", &d.Code) delete(rawMsg, key) case "details": - err = unpopulate(val, "Details", &e.Details) + err = unpopulate(val, "Details", &d.Details) + delete(rawMsg, key) + case "innererror": + err = unpopulate(val, "Innererror", &d.Innererror) delete(rawMsg, key) case "message": - err = unpopulate(val, "Message", &e.Message) + err = unpopulate(val, "Message", &d.Message) delete(rawMsg, key) case "target": - err = unpopulate(val, "Target", &e.Target) + err = unpopulate(val, "Target", &d.Target) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ErrorResponse. -func (e ErrorResponse) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DefaultErrorResponseErrorDetailsItem. +func (d DefaultErrorResponseErrorDetailsItem) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "error", e.Error) + populate(objectMap, "code", d.Code) + populate(objectMap, "message", d.Message) + populate(objectMap, "target", d.Target) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse. -func (e *ErrorResponse) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultErrorResponseErrorDetailsItem. +func (d *DefaultErrorResponseErrorDetailsItem) 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) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "error": - err = unpopulate(val, "Error", &e.Error) + case "code": + err = unpopulate(val, "Code", &d.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &d.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &d.Target) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ExtendedLocation. -func (e ExtendedLocation) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type EnvironmentVar. +func (e EnvironmentVar) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "name", e.Name) - populate(objectMap, "type", e.Type) + populate(objectMap, "secretRef", e.SecretRef) + populate(objectMap, "value", e.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedLocation. -func (e *ExtendedLocation) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentVar. +func (e *EnvironmentVar) 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) @@ -3475,8 +2041,11 @@ func (e *ExtendedLocation) UnmarshalJSON(data []byte) error { case "name": err = unpopulate(val, "Name", &e.Name) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) + case "secretRef": + err = unpopulate(val, "SecretRef", &e.SecretRef) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) delete(rawMsg, key) } if err != nil { @@ -3817,45 +2386,6 @@ func (h *HTTPSettingsRoutes) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type IPSecurityRestrictionRule. -func (i IPSecurityRestrictionRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "action", i.Action) - populate(objectMap, "description", i.Description) - populate(objectMap, "ipAddressRange", i.IPAddressRange) - populate(objectMap, "name", i.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IPSecurityRestrictionRule. -func (i *IPSecurityRestrictionRule) 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", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "action": - err = unpopulate(val, "Action", &i.Action) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &i.Description) - delete(rawMsg, key) - case "ipAddressRange": - err = unpopulate(val, "IPAddressRange", &i.IPAddressRange) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type IdentityProviders. func (i IdentityProviders) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -3916,10 +2446,8 @@ func (i Ingress) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "allowInsecure", i.AllowInsecure) populate(objectMap, "customDomains", i.CustomDomains) - populate(objectMap, "exposedPort", i.ExposedPort) populate(objectMap, "external", i.External) populate(objectMap, "fqdn", i.Fqdn) - populate(objectMap, "ipSecurityRestrictions", i.IPSecurityRestrictions) populate(objectMap, "targetPort", i.TargetPort) populate(objectMap, "traffic", i.Traffic) populate(objectMap, "transport", i.Transport) @@ -3941,18 +2469,12 @@ func (i *Ingress) UnmarshalJSON(data []byte) error { case "customDomains": err = unpopulate(val, "CustomDomains", &i.CustomDomains) delete(rawMsg, key) - case "exposedPort": - err = unpopulate(val, "ExposedPort", &i.ExposedPort) - delete(rawMsg, key) case "external": err = unpopulate(val, "External", &i.External) delete(rawMsg, key) case "fqdn": err = unpopulate(val, "Fqdn", &i.Fqdn) delete(rawMsg, key) - case "ipSecurityRestrictions": - err = unpopulate(val, "IPSecurityRestrictions", &i.IPSecurityRestrictions) - delete(rawMsg, key) case "targetPort": err = unpopulate(val, "TargetPort", &i.TargetPort) delete(rawMsg, key) @@ -3970,57 +2492,6 @@ func (i *Ingress) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type InitContainer. -func (i InitContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "args", i.Args) - populate(objectMap, "command", i.Command) - populate(objectMap, "env", i.Env) - populate(objectMap, "image", i.Image) - populate(objectMap, "name", i.Name) - populate(objectMap, "resources", i.Resources) - populate(objectMap, "volumeMounts", i.VolumeMounts) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InitContainer. -func (i *InitContainer) 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", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "args": - err = unpopulate(val, "Args", &i.Args) - delete(rawMsg, key) - case "command": - err = unpopulate(val, "Command", &i.Command) - delete(rawMsg, key) - case "env": - err = unpopulate(val, "Env", &i.Env) - delete(rawMsg, key) - case "image": - err = unpopulate(val, "Image", &i.Image) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "resources": - err = unpopulate(val, "Resources", &i.Resources) - delete(rawMsg, key) - case "volumeMounts": - err = unpopulate(val, "VolumeMounts", &i.VolumeMounts) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type JwtClaimChecks. func (j JwtClaimChecks) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4187,7 +2658,6 @@ func (m ManagedEnvironment) MarshalJSON() ([]byte, error) { populate(objectMap, "location", m.Location) populate(objectMap, "name", m.Name) populate(objectMap, "properties", m.Properties) - populate(objectMap, "sku", m.SKU) populate(objectMap, "systemData", m.SystemData) populate(objectMap, "tags", m.Tags) populate(objectMap, "type", m.Type) @@ -4215,9 +2685,6 @@ func (m *ManagedEnvironment) UnmarshalJSON(data []byte) error { case "properties": err = unpopulate(val, "Properties", &m.Properties) delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &m.SKU) - delete(rawMsg, key) case "systemData": err = unpopulate(val, "SystemData", &m.SystemData) delete(rawMsg, key) @@ -4235,51 +2702,17 @@ func (m *ManagedEnvironment) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedEnvironmentOutboundSettings. -func (m ManagedEnvironmentOutboundSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "outBoundType", m.OutBoundType) - populate(objectMap, "virtualNetworkApplianceIp", m.VirtualNetworkApplianceIP) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedEnvironmentOutboundSettings. -func (m *ManagedEnvironmentOutboundSettings) 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 "outBoundType": - err = unpopulate(val, "OutBoundType", &m.OutBoundType) - delete(rawMsg, key) - case "virtualNetworkApplianceIp": - err = unpopulate(val, "VirtualNetworkApplianceIP", &m.VirtualNetworkApplianceIP) - 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 ManagedEnvironmentProperties. func (m ManagedEnvironmentProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "appLogsConfiguration", m.AppLogsConfiguration) - populate(objectMap, "customDomainConfiguration", m.CustomDomainConfiguration) populate(objectMap, "daprAIConnectionString", m.DaprAIConnectionString) populate(objectMap, "daprAIInstrumentationKey", m.DaprAIInstrumentationKey) populate(objectMap, "defaultDomain", m.DefaultDomain) populate(objectMap, "deploymentErrors", m.DeploymentErrors) - populate(objectMap, "eventStreamEndpoint", m.EventStreamEndpoint) populate(objectMap, "provisioningState", m.ProvisioningState) populate(objectMap, "staticIp", m.StaticIP) populate(objectMap, "vnetConfiguration", m.VnetConfiguration) - populate(objectMap, "workloadProfiles", m.WorkloadProfiles) populate(objectMap, "zoneRedundant", m.ZoneRedundant) return json.Marshal(objectMap) } @@ -4296,9 +2729,6 @@ func (m *ManagedEnvironmentProperties) UnmarshalJSON(data []byte) error { case "appLogsConfiguration": err = unpopulate(val, "AppLogsConfiguration", &m.AppLogsConfiguration) delete(rawMsg, key) - case "customDomainConfiguration": - err = unpopulate(val, "CustomDomainConfiguration", &m.CustomDomainConfiguration) - delete(rawMsg, key) case "daprAIConnectionString": err = unpopulate(val, "DaprAIConnectionString", &m.DaprAIConnectionString) delete(rawMsg, key) @@ -4311,9 +2741,6 @@ func (m *ManagedEnvironmentProperties) UnmarshalJSON(data []byte) error { case "deploymentErrors": err = unpopulate(val, "DeploymentErrors", &m.DeploymentErrors) delete(rawMsg, key) - case "eventStreamEndpoint": - err = unpopulate(val, "EventStreamEndpoint", &m.EventStreamEndpoint) - delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) delete(rawMsg, key) @@ -4323,9 +2750,6 @@ func (m *ManagedEnvironmentProperties) UnmarshalJSON(data []byte) error { case "vnetConfiguration": err = unpopulate(val, "VnetConfiguration", &m.VnetConfiguration) delete(rawMsg, key) - case "workloadProfiles": - err = unpopulate(val, "WorkloadProfiles", &m.WorkloadProfiles) - delete(rawMsg, key) case "zoneRedundant": err = unpopulate(val, "ZoneRedundant", &m.ZoneRedundant) delete(rawMsg, key) @@ -4975,8 +3399,6 @@ func (r *ReplicaCollection) UnmarshalJSON(data []byte) error { func (r ReplicaContainer) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "containerId", r.ContainerID) - populate(objectMap, "execEndpoint", r.ExecEndpoint) - populate(objectMap, "logStreamEndpoint", r.LogStreamEndpoint) populate(objectMap, "name", r.Name) populate(objectMap, "ready", r.Ready) populate(objectMap, "restartCount", r.RestartCount) @@ -4996,12 +3418,6 @@ func (r *ReplicaContainer) UnmarshalJSON(data []byte) error { case "containerId": err = unpopulate(val, "ContainerID", &r.ContainerID) delete(rawMsg, key) - case "execEndpoint": - err = unpopulate(val, "ExecEndpoint", &r.ExecEndpoint) - delete(rawMsg, key) - case "logStreamEndpoint": - err = unpopulate(val, "LogStreamEndpoint", &r.LogStreamEndpoint) - delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) @@ -5173,7 +3589,6 @@ func (r RevisionProperties) MarshalJSON() ([]byte, error) { populateTimeRFC3339(objectMap, "createdTime", r.CreatedTime) populate(objectMap, "fqdn", r.Fqdn) populate(objectMap, "healthState", r.HealthState) - populateTimeRFC3339(objectMap, "lastActiveTime", r.LastActiveTime) populate(objectMap, "provisioningError", r.ProvisioningError) populate(objectMap, "provisioningState", r.ProvisioningState) populate(objectMap, "replicas", r.Replicas) @@ -5203,9 +3618,6 @@ func (r *RevisionProperties) UnmarshalJSON(data []byte) error { case "healthState": err = unpopulate(val, "HealthState", &r.HealthState) delete(rawMsg, key) - case "lastActiveTime": - err = unpopulateTimeRFC3339(val, "LastActiveTime", &r.LastActiveTime) - delete(rawMsg, key) case "provisioningError": err = unpopulate(val, "ProvisioningError", &r.ProvisioningError) delete(rawMsg, key) @@ -5271,7 +3683,6 @@ func (s ScaleRule) MarshalJSON() ([]byte, error) { populate(objectMap, "custom", s.Custom) populate(objectMap, "http", s.HTTP) populate(objectMap, "name", s.Name) - populate(objectMap, "tcp", s.TCP) return json.Marshal(objectMap) } @@ -5296,9 +3707,6 @@ func (s *ScaleRule) UnmarshalJSON(data []byte) error { case "name": err = unpopulate(val, "Name", &s.Name) delete(rawMsg, key) - case "tcp": - err = unpopulate(val, "TCP", &s.TCP) - delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -5556,42 +3964,10 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type TCPScaleRule. -func (t TCPScaleRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "auth", t.Auth) - populate(objectMap, "metadata", t.Metadata) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TCPScaleRule. -func (t *TCPScaleRule) 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", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "auth": - err = unpopulate(val, "Auth", &t.Auth) - delete(rawMsg, key) - case "metadata": - err = unpopulate(val, "Metadata", &t.Metadata) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type Template. func (t Template) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "containers", t.Containers) - populate(objectMap, "initContainers", t.InitContainers) populate(objectMap, "revisionSuffix", t.RevisionSuffix) populate(objectMap, "scale", t.Scale) populate(objectMap, "volumes", t.Volumes) @@ -5610,9 +3986,6 @@ func (t *Template) UnmarshalJSON(data []byte) error { case "containers": err = unpopulate(val, "Containers", &t.Containers) delete(rawMsg, key) - case "initContainers": - err = unpopulate(val, "InitContainers", &t.InitContainers) - delete(rawMsg, key) case "revisionSuffix": err = unpopulate(val, "RevisionSuffix", &t.RevisionSuffix) delete(rawMsg, key) @@ -5815,7 +4188,6 @@ func (v VnetConfiguration) MarshalJSON() ([]byte, error) { populate(objectMap, "dockerBridgeCidr", v.DockerBridgeCidr) populate(objectMap, "infrastructureSubnetId", v.InfrastructureSubnetID) populate(objectMap, "internal", v.Internal) - populate(objectMap, "outboundSettings", v.OutboundSettings) populate(objectMap, "platformReservedCidr", v.PlatformReservedCidr) populate(objectMap, "platformReservedDnsIP", v.PlatformReservedDNSIP) populate(objectMap, "runtimeSubnetId", v.RuntimeSubnetID) @@ -5840,9 +4212,6 @@ func (v *VnetConfiguration) UnmarshalJSON(data []byte) error { case "internal": err = unpopulate(val, "Internal", &v.Internal) delete(rawMsg, key) - case "outboundSettings": - err = unpopulate(val, "OutboundSettings", &v.OutboundSettings) - delete(rawMsg, key) case "platformReservedCidr": err = unpopulate(val, "PlatformReservedCidr", &v.PlatformReservedCidr) delete(rawMsg, key) @@ -5926,150 +4295,6 @@ func (v *VolumeMount) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type WorkloadProfile. -func (w WorkloadProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "maximumCount", w.MaximumCount) - populate(objectMap, "minimumCount", w.MinimumCount) - populate(objectMap, "workloadProfileType", w.WorkloadProfileType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadProfile. -func (w *WorkloadProfile) 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", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "maximumCount": - err = unpopulate(val, "MaximumCount", &w.MaximumCount) - delete(rawMsg, key) - case "minimumCount": - err = unpopulate(val, "MinimumCount", &w.MinimumCount) - delete(rawMsg, key) - case "workloadProfileType": - err = unpopulate(val, "WorkloadProfileType", &w.WorkloadProfileType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WorkloadProfileStates. -func (w WorkloadProfileStates) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", w.ID) - populate(objectMap, "name", w.Name) - populate(objectMap, "properties", w.Properties) - populate(objectMap, "systemData", w.SystemData) - populate(objectMap, "type", w.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadProfileStates. -func (w *WorkloadProfileStates) 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", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &w.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &w.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &w.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &w.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &w.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WorkloadProfileStatesCollection. -func (w WorkloadProfileStatesCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", w.NextLink) - populate(objectMap, "value", w.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadProfileStatesCollection. -func (w *WorkloadProfileStatesCollection) 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", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &w.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &w.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WorkloadProfileStatesProperties. -func (w WorkloadProfileStatesProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "currentCount", w.CurrentCount) - populate(objectMap, "maximumCount", w.MaximumCount) - populate(objectMap, "minimumCount", w.MinimumCount) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadProfileStatesProperties. -func (w *WorkloadProfileStatesProperties) 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", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "currentCount": - err = unpopulate(val, "CurrentCount", &w.CurrentCount) - delete(rawMsg, key) - case "maximumCount": - err = unpopulate(val, "MaximumCount", &w.MaximumCount) - delete(rawMsg, key) - case "minimumCount": - err = unpopulate(val, "MinimumCount", &w.MinimumCount) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - func populate(m map[string]any, k string, v any) { if v == nil { return diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/namespaces_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/namespaces_client.go index 7e0abb7b6e89..42f125f1b113 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/namespaces_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/namespaces_client.go @@ -47,7 +47,7 @@ func NewNamespacesClient(subscriptionID string, credential azcore.TokenCredentia // CheckNameAvailability - Checks if resource name is available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - checkNameAvailabilityRequest - The check name availability request. @@ -88,7 +88,7 @@ func (client *NamespacesClient) checkNameAvailabilityCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, checkNameAvailabilityRequest) diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/namespaces_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/namespaces_client_example_test.go index a6927d9d2398..77dc19d2ffff 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/namespaces_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/namespaces_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/appcontainers/armappcontainers/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_CheckNameAvailability.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_CheckNameAvailability.json func ExampleNamespacesClient_CheckNameAvailability_certificatesCheckNameAvailability() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -46,7 +46,7 @@ func ExampleNamespacesClient_CheckNameAvailability_certificatesCheckNameAvailabi // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CheckNameAvailability.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_CheckNameAvailability.json func ExampleNamespacesClient_CheckNameAvailability_containerAppsCheckNameAvailability() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/operations_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/operations_client.go index 2d9d74d6d8e2..f7f9180caf95 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/operations_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/operations_client.go @@ -40,7 +40,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available RP operations. // -// Generated from API version 2022-06-01-preview +// Generated from API version 2022-03-01 // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -78,7 +78,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01-preview") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/operations_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/operations_client_example_test.go index 0ac264ac0881..17df72747dfd 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/operations_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/operations_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/212686c8383679e034b19143e13cbeb5a40ab454/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Operations_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9a65970ef1837c0af1800c906aa365ba95871b26/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Operations_List.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/response_types.go b/sdk/resourcemanager/appcontainers/armappcontainers/response_types.go index 18b61a435da5..657fb45ff4a6 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/response_types.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/response_types.go @@ -9,16 +9,6 @@ package armappcontainers -// AvailableWorkloadProfilesClientGetResponse contains the response from method AvailableWorkloadProfilesClient.NewGetPager. -type AvailableWorkloadProfilesClientGetResponse struct { - AvailableWorkloadProfilesCollection -} - -// BillingMetersClientGetResponse contains the response from method BillingMetersClient.Get. -type BillingMetersClientGetResponse struct { - BillingMeterCollection -} - // CertificatesClientCreateOrUpdateResponse contains the response from method CertificatesClient.CreateOrUpdate. type CertificatesClientCreateOrUpdateResponse struct { Certificate @@ -44,111 +34,6 @@ type CertificatesClientUpdateResponse struct { Certificate } -// ConnectedEnvironmentsCertificatesClientCreateOrUpdateResponse contains the response from method ConnectedEnvironmentsCertificatesClient.CreateOrUpdate. -type ConnectedEnvironmentsCertificatesClientCreateOrUpdateResponse struct { - Certificate -} - -// ConnectedEnvironmentsCertificatesClientDeleteResponse contains the response from method ConnectedEnvironmentsCertificatesClient.Delete. -type ConnectedEnvironmentsCertificatesClientDeleteResponse struct { - // placeholder for future response values -} - -// ConnectedEnvironmentsCertificatesClientGetResponse contains the response from method ConnectedEnvironmentsCertificatesClient.Get. -type ConnectedEnvironmentsCertificatesClientGetResponse struct { - Certificate -} - -// ConnectedEnvironmentsCertificatesClientListResponse contains the response from method ConnectedEnvironmentsCertificatesClient.NewListPager. -type ConnectedEnvironmentsCertificatesClientListResponse struct { - CertificateCollection -} - -// ConnectedEnvironmentsCertificatesClientUpdateResponse contains the response from method ConnectedEnvironmentsCertificatesClient.Update. -type ConnectedEnvironmentsCertificatesClientUpdateResponse struct { - Certificate -} - -// ConnectedEnvironmentsClientCheckNameAvailabilityResponse contains the response from method ConnectedEnvironmentsClient.CheckNameAvailability. -type ConnectedEnvironmentsClientCheckNameAvailabilityResponse struct { - CheckNameAvailabilityResponse -} - -// ConnectedEnvironmentsClientCreateOrUpdateResponse contains the response from method ConnectedEnvironmentsClient.BeginCreateOrUpdate. -type ConnectedEnvironmentsClientCreateOrUpdateResponse struct { - ConnectedEnvironment -} - -// ConnectedEnvironmentsClientDeleteResponse contains the response from method ConnectedEnvironmentsClient.BeginDelete. -type ConnectedEnvironmentsClientDeleteResponse struct { - // placeholder for future response values -} - -// ConnectedEnvironmentsClientGetResponse contains the response from method ConnectedEnvironmentsClient.Get. -type ConnectedEnvironmentsClientGetResponse struct { - ConnectedEnvironment -} - -// ConnectedEnvironmentsClientListByResourceGroupResponse contains the response from method ConnectedEnvironmentsClient.NewListByResourceGroupPager. -type ConnectedEnvironmentsClientListByResourceGroupResponse struct { - ConnectedEnvironmentCollection -} - -// ConnectedEnvironmentsClientListBySubscriptionResponse contains the response from method ConnectedEnvironmentsClient.NewListBySubscriptionPager. -type ConnectedEnvironmentsClientListBySubscriptionResponse struct { - ConnectedEnvironmentCollection -} - -// ConnectedEnvironmentsClientUpdateResponse contains the response from method ConnectedEnvironmentsClient.Update. -type ConnectedEnvironmentsClientUpdateResponse struct { - ConnectedEnvironment -} - -// ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateResponse contains the response from method ConnectedEnvironmentsDaprComponentsClient.CreateOrUpdate. -type ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateResponse struct { - DaprComponent -} - -// ConnectedEnvironmentsDaprComponentsClientDeleteResponse contains the response from method ConnectedEnvironmentsDaprComponentsClient.Delete. -type ConnectedEnvironmentsDaprComponentsClientDeleteResponse struct { - // placeholder for future response values -} - -// ConnectedEnvironmentsDaprComponentsClientGetResponse contains the response from method ConnectedEnvironmentsDaprComponentsClient.Get. -type ConnectedEnvironmentsDaprComponentsClientGetResponse struct { - DaprComponent -} - -// ConnectedEnvironmentsDaprComponentsClientListResponse contains the response from method ConnectedEnvironmentsDaprComponentsClient.NewListPager. -type ConnectedEnvironmentsDaprComponentsClientListResponse struct { - DaprComponentsCollection -} - -// ConnectedEnvironmentsDaprComponentsClientListSecretsResponse contains the response from method ConnectedEnvironmentsDaprComponentsClient.ListSecrets. -type ConnectedEnvironmentsDaprComponentsClientListSecretsResponse struct { - DaprSecretsCollection -} - -// ConnectedEnvironmentsStoragesClientCreateOrUpdateResponse contains the response from method ConnectedEnvironmentsStoragesClient.CreateOrUpdate. -type ConnectedEnvironmentsStoragesClientCreateOrUpdateResponse struct { - ConnectedEnvironmentStorage -} - -// ConnectedEnvironmentsStoragesClientDeleteResponse contains the response from method ConnectedEnvironmentsStoragesClient.Delete. -type ConnectedEnvironmentsStoragesClientDeleteResponse struct { - // placeholder for future response values -} - -// ConnectedEnvironmentsStoragesClientGetResponse contains the response from method ConnectedEnvironmentsStoragesClient.Get. -type ConnectedEnvironmentsStoragesClientGetResponse struct { - ConnectedEnvironmentStorage -} - -// ConnectedEnvironmentsStoragesClientListResponse contains the response from method ConnectedEnvironmentsStoragesClient.List. -type ConnectedEnvironmentsStoragesClientListResponse struct { - ConnectedEnvironmentStoragesCollection -} - // ContainerAppsAuthConfigsClientCreateOrUpdateResponse contains the response from method ContainerAppsAuthConfigsClient.CreateOrUpdate. type ContainerAppsAuthConfigsClientCreateOrUpdateResponse struct { AuthConfig @@ -179,11 +64,6 @@ type ContainerAppsClientDeleteResponse struct { // placeholder for future response values } -// ContainerAppsClientGetAuthTokenResponse contains the response from method ContainerAppsClient.GetAuthToken. -type ContainerAppsClientGetAuthTokenResponse struct { - ContainerAppAuthToken -} - // ContainerAppsClientGetResponse contains the response from method ContainerAppsClient.Get. type ContainerAppsClientGetResponse struct { ContainerApp @@ -214,31 +94,6 @@ type ContainerAppsClientUpdateResponse struct { // placeholder for future response values } -// ContainerAppsDiagnosticsClientGetDetectorResponse contains the response from method ContainerAppsDiagnosticsClient.GetDetector. -type ContainerAppsDiagnosticsClientGetDetectorResponse struct { - Diagnostics -} - -// ContainerAppsDiagnosticsClientGetRevisionResponse contains the response from method ContainerAppsDiagnosticsClient.GetRevision. -type ContainerAppsDiagnosticsClientGetRevisionResponse struct { - Revision -} - -// ContainerAppsDiagnosticsClientGetRootResponse contains the response from method ContainerAppsDiagnosticsClient.GetRoot. -type ContainerAppsDiagnosticsClientGetRootResponse struct { - ContainerApp -} - -// ContainerAppsDiagnosticsClientListDetectorsResponse contains the response from method ContainerAppsDiagnosticsClient.NewListDetectorsPager. -type ContainerAppsDiagnosticsClientListDetectorsResponse struct { - DiagnosticsCollection -} - -// ContainerAppsDiagnosticsClientListRevisionsResponse contains the response from method ContainerAppsDiagnosticsClient.NewListRevisionsPager. -type ContainerAppsDiagnosticsClientListRevisionsResponse struct { - RevisionCollection -} - // ContainerAppsRevisionReplicasClientGetReplicaResponse contains the response from method ContainerAppsRevisionReplicasClient.GetReplica. type ContainerAppsRevisionReplicasClientGetReplicaResponse struct { Replica @@ -319,16 +174,6 @@ type DaprComponentsClientListSecretsResponse struct { DaprSecretsCollection } -// ManagedEnvironmentDiagnosticsClientGetDetectorResponse contains the response from method ManagedEnvironmentDiagnosticsClient.GetDetector. -type ManagedEnvironmentDiagnosticsClientGetDetectorResponse struct { - Diagnostics -} - -// ManagedEnvironmentDiagnosticsClientListDetectorsResponse contains the response from method ManagedEnvironmentDiagnosticsClient.ListDetectors. -type ManagedEnvironmentDiagnosticsClientListDetectorsResponse struct { - DiagnosticsCollection -} - // ManagedEnvironmentsClientCreateOrUpdateResponse contains the response from method ManagedEnvironmentsClient.BeginCreateOrUpdate. type ManagedEnvironmentsClientCreateOrUpdateResponse struct { ManagedEnvironment @@ -339,11 +184,6 @@ type ManagedEnvironmentsClientDeleteResponse struct { // placeholder for future response values } -// ManagedEnvironmentsClientGetAuthTokenResponse contains the response from method ManagedEnvironmentsClient.GetAuthToken. -type ManagedEnvironmentsClientGetAuthTokenResponse struct { - EnvironmentAuthToken -} - // ManagedEnvironmentsClientGetResponse contains the response from method ManagedEnvironmentsClient.Get. type ManagedEnvironmentsClientGetResponse struct { ManagedEnvironment @@ -359,21 +199,11 @@ type ManagedEnvironmentsClientListBySubscriptionResponse struct { ManagedEnvironmentsCollection } -// ManagedEnvironmentsClientListWorkloadProfileStatesResponse contains the response from method ManagedEnvironmentsClient.NewListWorkloadProfileStatesPager. -type ManagedEnvironmentsClientListWorkloadProfileStatesResponse struct { - WorkloadProfileStatesCollection -} - // ManagedEnvironmentsClientUpdateResponse contains the response from method ManagedEnvironmentsClient.BeginUpdate. type ManagedEnvironmentsClientUpdateResponse struct { // placeholder for future response values } -// ManagedEnvironmentsDiagnosticsClientGetRootResponse contains the response from method ManagedEnvironmentsDiagnosticsClient.GetRoot. -type ManagedEnvironmentsDiagnosticsClientGetRootResponse struct { - ManagedEnvironment -} - // ManagedEnvironmentsStoragesClientCreateOrUpdateResponse contains the response from method ManagedEnvironmentsStoragesClient.CreateOrUpdate. type ManagedEnvironmentsStoragesClientCreateOrUpdateResponse struct { ManagedEnvironmentStorage diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/CHANGELOG.md b/sdk/resourcemanager/applicationinsights/armapplicationinsights/CHANGELOG.md index 21fb38f7429d..874d42c4d0e8 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/CHANGELOG.md +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/CHANGELOG.md @@ -1,166 +1,11 @@ # Release History -## 2.0.0-beta.2 (2023-03-27) +## 1.1.0 (2023-04-06) ### Features Added - New struct `ClientFactory` which is a client factory used to create any client in this module -## 2.0.0-beta.1 (2022-06-02) -### Breaking Changes - -- Function `*WorkbooksClient.Update` parameter(s) have been changed from `(context.Context, string, string, Workbook, *WorkbooksClientUpdateOptions)` to `(context.Context, string, string, *WorkbooksClientUpdateOptions)` -- Type of `MyWorkbook.Kind` has been changed from `*SharedTypeKind` to `*Kind` -- Type of `WorkbookProperties.TimeModified` has been changed from `*string` to `*time.Time` -- Type of `Workbook.Kind` has been changed from `*SharedTypeKind` to `*WorkbookSharedTypeKind` -- Const `SharedTypeKindUser` has been removed -- Const `SharedTypeKindShared` has been removed -- Function `PossibleSharedTypeKindValues` has been removed -- Struct `ErrorFieldContract` has been removed -- Struct `LinkProperties` has been removed -- Field `Code` of struct `WorkbookError` has been removed -- Field `Details` of struct `WorkbookError` has been removed -- Field `Message` of struct `WorkbookError` has been removed -- Field `SharedTypeKind` of struct `WorkbookProperties` has been removed -- Field `SourceResourceID` of struct `WorkbookProperties` has been removed -- Field `WorkbookID` of struct `WorkbookProperties` has been removed -- Field `Name` of struct `WorkbookProperties` has been removed -- Field `Code` of struct `MyWorkbookError` has been removed -- Field `Details` of struct `MyWorkbookError` has been removed -- Field `Message` of struct `MyWorkbookError` has been removed - -### Features Added - -- New const `MyWorkbookManagedIdentityTypeNone` -- New const `WorkbookUpdateSharedTypeKindShared` -- New const `CreatedByTypeManagedIdentity` -- New const `ManagedServiceIdentityTypeUserAssigned` -- New const `StorageTypeServiceProfiler` -- New const `KindUser` -- New const `CreatedByTypeApplication` -- New const `CreatedByTypeUser` -- New const `ManagedServiceIdentityTypeSystemAssignedUserAssigned` -- New const `MyWorkbookManagedIdentityTypeUserAssigned` -- New const `WorkbookSharedTypeKindShared` -- New const `CreatedByTypeKey` -- New const `KindShared` -- New const `ManagedServiceIdentityTypeNone` -- New const `ManagedServiceIdentityTypeSystemAssigned` -- New function `TrackedResource.MarshalJSON() ([]byte, error)` -- New function `PossibleWorkbookUpdateSharedTypeKindValues() []WorkbookUpdateSharedTypeKind` -- New function `WorkbookTemplate.MarshalJSON() ([]byte, error)` -- New function `*WorkbooksClient.RevisionGet(context.Context, string, string, string, *WorkbooksClientRevisionGetOptions) (WorkbooksClientRevisionGetResponse, error)` -- New function `WorkbookTemplateProperties.MarshalJSON() ([]byte, error)` -- New function `WorkbookTemplateLocalizedGallery.MarshalJSON() ([]byte, error)` -- New function `WorkbookTemplateResource.MarshalJSON() ([]byte, error)` -- New function `PossibleCreatedByTypeValues() []CreatedByType` -- New function `PossibleStorageTypeValues() []StorageType` -- New function `*WorkbookProperties.UnmarshalJSON([]byte) error` -- New function `WorkbookPropertiesUpdateParameters.MarshalJSON() ([]byte, error)` -- New function `PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType` -- New function `*WorkbooksClient.NewListBySubscriptionPager(CategoryType, *WorkbooksClientListBySubscriptionOptions) *runtime.Pager[WorkbooksClientListBySubscriptionResponse]` -- New function `WorkbookTemplateUpdateParameters.MarshalJSON() ([]byte, error)` -- New function `PossibleWorkbookSharedTypeKindValues() []WorkbookSharedTypeKind` -- New function `PossibleMyWorkbookManagedIdentityTypeValues() []MyWorkbookManagedIdentityType` -- New function `ComponentLinkedStorageAccountsPatch.MarshalJSON() ([]byte, error)` -- New function `WorkbookUpdateParameters.MarshalJSON() ([]byte, error)` -- New function `*WorkbooksClient.NewRevisionsListPager(string, string, *WorkbooksClientRevisionsListOptions) *runtime.Pager[WorkbooksClientRevisionsListResponse]` -- New function `PossibleKindValues() []Kind` -- New function `ManagedServiceIdentity.MarshalJSON() ([]byte, error)` -- New function `WorkbookResourceIdentity.MarshalJSON() ([]byte, error)` -- New function `*SystemData.UnmarshalJSON([]byte) error` -- New function `SystemData.MarshalJSON() ([]byte, error)` -- New struct `ComponentLinkedStorageAccounts` -- New struct `ComponentLinkedStorageAccountsClientCreateAndUpdateOptions` -- New struct `ComponentLinkedStorageAccountsClientCreateAndUpdateResponse` -- New struct `ComponentLinkedStorageAccountsClientDeleteOptions` -- New struct `ComponentLinkedStorageAccountsClientDeleteResponse` -- New struct `ComponentLinkedStorageAccountsClientGetOptions` -- New struct `ComponentLinkedStorageAccountsClientGetResponse` -- New struct `ComponentLinkedStorageAccountsClientUpdateOptions` -- New struct `ComponentLinkedStorageAccountsClientUpdateResponse` -- New struct `ComponentLinkedStorageAccountsPatch` -- New struct `ErrorDefinition` -- New struct `ErrorResponseLinkedStorage` -- New struct `ErrorResponseLinkedStorageError` -- New struct `InnerErrorTrace` -- New struct `LinkedStorageAccountsProperties` -- New struct `LiveTokenClientGetOptions` -- New struct `LiveTokenClientGetResponse` -- New struct `LiveTokenResponse` -- New struct `ManagedServiceIdentity` -- New struct `MyWorkbookManagedIdentity` -- New struct `MyWorkbookUserAssignedIdentities` -- New struct `OperationInfo` -- New struct `OperationLive` -- New struct `OperationsListResult` -- New struct `ProxyResource` -- New struct `Resource` -- New struct `SystemData` -- New struct `TrackedResource` -- New struct `UserAssignedIdentity` -- New struct `WorkbookErrorDefinition` -- New struct `WorkbookInnerErrorTrace` -- New struct `WorkbookPropertiesUpdateParameters` -- New struct `WorkbookResourceIdentity` -- New struct `WorkbookTemplate` -- New struct `WorkbookTemplateError` -- New struct `WorkbookTemplateErrorBody` -- New struct `WorkbookTemplateErrorFieldContract` -- New struct `WorkbookTemplateGallery` -- New struct `WorkbookTemplateLocalizedGallery` -- New struct `WorkbookTemplateProperties` -- New struct `WorkbookTemplateResource` -- New struct `WorkbookTemplateUpdateParameters` -- New struct `WorkbookTemplatesClientCreateOrUpdateOptions` -- New struct `WorkbookTemplatesClientCreateOrUpdateResponse` -- New struct `WorkbookTemplatesClientDeleteOptions` -- New struct `WorkbookTemplatesClientDeleteResponse` -- New struct `WorkbookTemplatesClientGetOptions` -- New struct `WorkbookTemplatesClientGetResponse` -- New struct `WorkbookTemplatesClientListByResourceGroupOptions` -- New struct `WorkbookTemplatesClientListByResourceGroupResponse` -- New struct `WorkbookTemplatesClientUpdateOptions` -- New struct `WorkbookTemplatesClientUpdateResponse` -- New struct `WorkbookTemplatesListResult` -- New struct `WorkbookUpdateParameters` -- New struct `WorkbooksClientListBySubscriptionOptions` -- New struct `WorkbooksClientListBySubscriptionResponse` -- New struct `WorkbooksClientRevisionGetOptions` -- New struct `WorkbooksClientRevisionGetResponse` -- New struct `WorkbooksClientRevisionsListOptions` -- New struct `WorkbooksClientRevisionsListResponse` -- New field `CanFetchContent` in struct `WorkbooksClientGetOptions` -- New field `SourceID` in struct `MyWorkbooksClientListByResourceGroupOptions` -- New field `NextLink` in struct `WorkbooksListResult` -- New field `Etag` in struct `WorkbookResource` -- New field `Identity` in struct `WorkbookResource` -- New field `Kind` in struct `WorkbookResource` -- New field `SystemData` in struct `Workbook` -- New field `Etag` in struct `Workbook` -- New field `Identity` in struct `Workbook` -- New field `Etag` in struct `MyWorkbook` -- New field `Identity` in struct `MyWorkbook` -- New field `SystemData` in struct `MyWorkbook` -- New field `Error` in struct `WorkbookError` -- New field `SourceID` in struct `WorkbooksClientUpdateOptions` -- New field `WorkbookUpdateParameters` in struct `WorkbooksClientUpdateOptions` -- New field `StorageURI` in struct `MyWorkbookProperties` -- New field `SourceID` in struct `MyWorkbooksClientUpdateOptions` -- New field `NextLink` in struct `MyWorkbooksListResult` -- New field `Error` in struct `MyWorkbookError` -- New field `SourceID` in struct `MyWorkbooksClientCreateOrUpdateOptions` -- New field `SourceID` in struct `WorkbooksClientListByResourceGroupOptions` -- New field `SourceID` in struct `WorkbookProperties` -- New field `DisplayName` in struct `WorkbookProperties` -- New field `Revision` in struct `WorkbookProperties` -- New field `StorageURI` in struct `WorkbookProperties` -- New field `Description` in struct `WorkbookProperties` -- New field `Identity` in struct `MyWorkbookResource` -- New field `Etag` in struct `MyWorkbookResource` -- New field `SourceID` in struct `WorkbooksClientCreateOrUpdateOptions` - - ## 1.0.0 (2022-06-02) The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/analyticsitems_client_example_test.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/analyticsitems_client_example_test.go index 6e8b1ba05715..bf67c3157498 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/analyticsitems_client_example_test.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/analyticsitems_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/applicationinsights/armapplicationinsights/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemList.json func ExampleAnalyticsItemsClient_List() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -108,7 +108,7 @@ func ExampleAnalyticsItemsClient_List() { // }} } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemGet.json func ExampleAnalyticsItemsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -140,7 +140,7 @@ func ExampleAnalyticsItemsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemPut.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemPut.json func ExampleAnalyticsItemsClient_Put() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -175,7 +175,7 @@ func ExampleAnalyticsItemsClient_Put() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemDelete.json func ExampleAnalyticsItemsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/annotations_client_example_test.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/annotations_client_example_test.go index 4a689991787e..d011da79f3ac 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/annotations_client_example_test.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/annotations_client_example_test.go @@ -17,10 +17,10 @@ import ( "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/applicationinsights/armapplicationinsights/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsList.json func ExampleAnnotationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -47,7 +47,7 @@ func ExampleAnnotationsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsCreate.json func ExampleAnnotationsClient_Create() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -81,7 +81,7 @@ func ExampleAnnotationsClient_Create() { // }} } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsDelete.json func ExampleAnnotationsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -98,7 +98,7 @@ func ExampleAnnotationsClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsGet.json func ExampleAnnotationsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/apikeys_client_example_test.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/apikeys_client_example_test.go index a444d43f28ea..ff80fe32b077 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/apikeys_client_example_test.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/apikeys_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/applicationinsights/armapplicationinsights/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysList.json func ExampleAPIKeysClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -74,7 +74,7 @@ func ExampleAPIKeysClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysCreate.json func ExampleAPIKeysClient_Create() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -112,7 +112,7 @@ func ExampleAPIKeysClient_Create() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysDelete.json func ExampleAPIKeysClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -146,7 +146,7 @@ func ExampleAPIKeysClient_Delete() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysGet.json func ExampleAPIKeysClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/autorest.md b/sdk/resourcemanager/applicationinsights/armapplicationinsights/autorest.md index 78077bd893e0..3fe334ee2a85 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/autorest.md +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 2.0.0-beta.2 - +module-version: 1.1.0 +tag: package-2020-02-02 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/client_factory.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/client_factory.go index c7b930054861..f484711feb3d 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/client_factory.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/client_factory.go @@ -103,8 +103,8 @@ func (c *ClientFactory) NewAnalyticsItemsClient() *AnalyticsItemsClient { return subClient } -func (c *ClientFactory) NewWorkbookTemplatesClient() *WorkbookTemplatesClient { - subClient, _ := NewWorkbookTemplatesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewWorkbooksClient() *WorkbooksClient { + subClient, _ := NewWorkbooksClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -113,22 +113,7 @@ func (c *ClientFactory) NewMyWorkbooksClient() *MyWorkbooksClient { return subClient } -func (c *ClientFactory) NewWorkbooksClient() *WorkbooksClient { - subClient, _ := NewWorkbooksClient(c.subscriptionID, c.credential, c.options) - return subClient -} - func (c *ClientFactory) NewComponentsClient() *ComponentsClient { subClient, _ := NewComponentsClient(c.subscriptionID, c.credential, c.options) return subClient } - -func (c *ClientFactory) NewComponentLinkedStorageAccountsClient() *ComponentLinkedStorageAccountsClient { - subClient, _ := NewComponentLinkedStorageAccountsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewLiveTokenClient() *LiveTokenClient { - subClient, _ := NewLiveTokenClient(c.credential, c.options) - return subClient -} diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentavailablefeatures_client_example_test.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentavailablefeatures_client_example_test.go index 640ecf120ad7..0d2aec46f546 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentavailablefeatures_client_example_test.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentavailablefeatures_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AvailableBillingFeaturesGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AvailableBillingFeaturesGet.json func ExampleComponentAvailableFeaturesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentcurrentbillingfeatures_client_example_test.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentcurrentbillingfeatures_client_example_test.go index ffe03f9bc038..a98a751d8e33 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentcurrentbillingfeatures_client_example_test.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentcurrentbillingfeatures_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/applicationinsights/armapplicationinsights/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/CurrentBillingFeaturesGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/CurrentBillingFeaturesGet.json func ExampleComponentCurrentBillingFeaturesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -50,7 +50,7 @@ func ExampleComponentCurrentBillingFeaturesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/CurrentBillingFeaturesUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/CurrentBillingFeaturesUpdate.json func ExampleComponentCurrentBillingFeaturesClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentfeaturecapabilities_client_example_test.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentfeaturecapabilities_client_example_test.go index fd5a410a3311..2bec2d8f6a94 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentfeaturecapabilities_client_example_test.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentfeaturecapabilities_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FeatureCapabilitiesGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FeatureCapabilitiesGet.json func ExampleComponentFeatureCapabilitiesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentlinkedstorageaccounts_client.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentlinkedstorageaccounts_client.go deleted file mode 100644 index 8651634fbf7d..000000000000 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentlinkedstorageaccounts_client.go +++ /dev/null @@ -1,292 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armapplicationinsights - -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" -) - -// ComponentLinkedStorageAccountsClient contains the methods for the ComponentLinkedStorageAccounts group. -// Don't use this type directly, use NewComponentLinkedStorageAccountsClient() instead. -type ComponentLinkedStorageAccountsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewComponentLinkedStorageAccountsClient creates a new instance of ComponentLinkedStorageAccountsClient with the specified values. -// - subscriptionID - The ID of the target subscription. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewComponentLinkedStorageAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ComponentLinkedStorageAccountsClient, error) { - cl, err := arm.NewClient(moduleName+".ComponentLinkedStorageAccountsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &ComponentLinkedStorageAccountsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// CreateAndUpdate - Replace current linked storage account for an Application Insights component. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2020-03-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the Application Insights component resource. -// - storageType - The type of the Application Insights component data source for the linked storage account. -// - linkedStorageAccountsProperties - Properties that need to be specified to update linked storage accounts for an Application -// Insights component. -// - options - ComponentLinkedStorageAccountsClientCreateAndUpdateOptions contains the optional parameters for the ComponentLinkedStorageAccountsClient.CreateAndUpdate -// method. -func (client *ComponentLinkedStorageAccountsClient) CreateAndUpdate(ctx context.Context, resourceGroupName string, resourceName string, storageType StorageType, linkedStorageAccountsProperties ComponentLinkedStorageAccounts, options *ComponentLinkedStorageAccountsClientCreateAndUpdateOptions) (ComponentLinkedStorageAccountsClientCreateAndUpdateResponse, error) { - req, err := client.createAndUpdateCreateRequest(ctx, resourceGroupName, resourceName, storageType, linkedStorageAccountsProperties, options) - if err != nil { - return ComponentLinkedStorageAccountsClientCreateAndUpdateResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ComponentLinkedStorageAccountsClientCreateAndUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ComponentLinkedStorageAccountsClientCreateAndUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createAndUpdateHandleResponse(resp) -} - -// createAndUpdateCreateRequest creates the CreateAndUpdate request. -func (client *ComponentLinkedStorageAccountsClient) createAndUpdateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, storageType StorageType, linkedStorageAccountsProperties ComponentLinkedStorageAccounts, options *ComponentLinkedStorageAccountsClientCreateAndUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if storageType == "" { - return nil, errors.New("parameter storageType cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageType}", url.PathEscape(string(storageType))) - 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", "2020-03-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, linkedStorageAccountsProperties) -} - -// createAndUpdateHandleResponse handles the CreateAndUpdate response. -func (client *ComponentLinkedStorageAccountsClient) createAndUpdateHandleResponse(resp *http.Response) (ComponentLinkedStorageAccountsClientCreateAndUpdateResponse, error) { - result := ComponentLinkedStorageAccountsClientCreateAndUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ComponentLinkedStorageAccounts); err != nil { - return ComponentLinkedStorageAccountsClientCreateAndUpdateResponse{}, err - } - return result, nil -} - -// Delete - Delete linked storage accounts for an Application Insights component. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2020-03-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the Application Insights component resource. -// - storageType - The type of the Application Insights component data source for the linked storage account. -// - options - ComponentLinkedStorageAccountsClientDeleteOptions contains the optional parameters for the ComponentLinkedStorageAccountsClient.Delete -// method. -func (client *ComponentLinkedStorageAccountsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, storageType StorageType, options *ComponentLinkedStorageAccountsClientDeleteOptions) (ComponentLinkedStorageAccountsClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, storageType, options) - if err != nil { - return ComponentLinkedStorageAccountsClientDeleteResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ComponentLinkedStorageAccountsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ComponentLinkedStorageAccountsClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return ComponentLinkedStorageAccountsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ComponentLinkedStorageAccountsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, storageType StorageType, options *ComponentLinkedStorageAccountsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if storageType == "" { - return nil, errors.New("parameter storageType cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageType}", url.PathEscape(string(storageType))) - 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", "2020-03-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Returns the current linked storage settings for an Application Insights component. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2020-03-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the Application Insights component resource. -// - storageType - The type of the Application Insights component data source for the linked storage account. -// - options - ComponentLinkedStorageAccountsClientGetOptions contains the optional parameters for the ComponentLinkedStorageAccountsClient.Get -// method. -func (client *ComponentLinkedStorageAccountsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, storageType StorageType, options *ComponentLinkedStorageAccountsClientGetOptions) (ComponentLinkedStorageAccountsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, storageType, options) - if err != nil { - return ComponentLinkedStorageAccountsClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ComponentLinkedStorageAccountsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ComponentLinkedStorageAccountsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ComponentLinkedStorageAccountsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, storageType StorageType, options *ComponentLinkedStorageAccountsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if storageType == "" { - return nil, errors.New("parameter storageType cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageType}", url.PathEscape(string(storageType))) - 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", "2020-03-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 *ComponentLinkedStorageAccountsClient) getHandleResponse(resp *http.Response) (ComponentLinkedStorageAccountsClientGetResponse, error) { - result := ComponentLinkedStorageAccountsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ComponentLinkedStorageAccounts); err != nil { - return ComponentLinkedStorageAccountsClientGetResponse{}, err - } - return result, nil -} - -// Update - Update linked storage accounts for an Application Insights component. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2020-03-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the Application Insights component resource. -// - storageType - The type of the Application Insights component data source for the linked storage account. -// - linkedStorageAccountsProperties - Properties that need to be specified to update a linked storage accounts for an Application -// Insights component. -// - options - ComponentLinkedStorageAccountsClientUpdateOptions contains the optional parameters for the ComponentLinkedStorageAccountsClient.Update -// method. -func (client *ComponentLinkedStorageAccountsClient) Update(ctx context.Context, resourceGroupName string, resourceName string, storageType StorageType, linkedStorageAccountsProperties ComponentLinkedStorageAccountsPatch, options *ComponentLinkedStorageAccountsClientUpdateOptions) (ComponentLinkedStorageAccountsClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, resourceName, storageType, linkedStorageAccountsProperties, options) - if err != nil { - return ComponentLinkedStorageAccountsClientUpdateResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ComponentLinkedStorageAccountsClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ComponentLinkedStorageAccountsClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *ComponentLinkedStorageAccountsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, storageType StorageType, linkedStorageAccountsProperties ComponentLinkedStorageAccountsPatch, options *ComponentLinkedStorageAccountsClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if storageType == "" { - return nil, errors.New("parameter storageType cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageType}", url.PathEscape(string(storageType))) - 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", "2020-03-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, linkedStorageAccountsProperties) -} - -// updateHandleResponse handles the Update response. -func (client *ComponentLinkedStorageAccountsClient) updateHandleResponse(resp *http.Response) (ComponentLinkedStorageAccountsClientUpdateResponse, error) { - result := ComponentLinkedStorageAccountsClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ComponentLinkedStorageAccounts); err != nil { - return ComponentLinkedStorageAccountsClientUpdateResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentlinkedstorageaccounts_client_example_test.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentlinkedstorageaccounts_client_example_test.go deleted file mode 100644 index 522aca8b0849..000000000000 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentlinkedstorageaccounts_client_example_test.go +++ /dev/null @@ -1,128 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armapplicationinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsGet.json -func ExampleComponentLinkedStorageAccountsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armapplicationinsights.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewComponentLinkedStorageAccountsClient().Get(ctx, "someResourceGroupName", "myComponent", armapplicationinsights.StorageTypeServiceProfiler, 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.ComponentLinkedStorageAccounts = armapplicationinsights.ComponentLinkedStorageAccounts{ - // Name: to.Ptr("serviceprofile"), - // Type: to.Ptr("microsoft.insights/components/linkedStorageAccounts"), - // ID: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/someResourceGroupName/providers/microsoft.insights/components/myComponent/linkedStorageAccounts/serviceprofiler"), - // Properties: &armapplicationinsights.LinkedStorageAccountsProperties{ - // LinkedStorageAccount: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/someResourceGroupName/providers/Microsoft.Storage/storageAccounts/storageaccountname"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsCreateAndUpdate.json -func ExampleComponentLinkedStorageAccountsClient_CreateAndUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armapplicationinsights.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewComponentLinkedStorageAccountsClient().CreateAndUpdate(ctx, "someResourceGroupName", "myComponent", armapplicationinsights.StorageTypeServiceProfiler, armapplicationinsights.ComponentLinkedStorageAccounts{ - Properties: &armapplicationinsights.LinkedStorageAccountsProperties{ - LinkedStorageAccount: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/someResourceGroupName/providers/Microsoft.Storage/storageAccounts/storageaccountname"), - }, - }, 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.ComponentLinkedStorageAccounts = armapplicationinsights.ComponentLinkedStorageAccounts{ - // Name: to.Ptr("serviceprofile"), - // Type: to.Ptr("microsoft.insights/components/linkedStorageAccounts"), - // ID: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/someResourceGroupNameproviders/microsoft.insights/components/myComponent/linkedStorageAccounts/serviceprofiler"), - // Properties: &armapplicationinsights.LinkedStorageAccountsProperties{ - // LinkedStorageAccount: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/someResourceGroupName/providers/Microsoft.Storage/storageAccounts/storageaccountname"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsUpdate.json -func ExampleComponentLinkedStorageAccountsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armapplicationinsights.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewComponentLinkedStorageAccountsClient().Update(ctx, "someResourceGroupName", "myComponent", armapplicationinsights.StorageTypeServiceProfiler, armapplicationinsights.ComponentLinkedStorageAccountsPatch{ - Properties: &armapplicationinsights.LinkedStorageAccountsProperties{ - LinkedStorageAccount: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/someResourceGroupName/providers/Microsoft.Storage/storageAccounts/storageaccountname"), - }, - }, 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.ComponentLinkedStorageAccounts = armapplicationinsights.ComponentLinkedStorageAccounts{ - // Name: to.Ptr("serviceprofile"), - // Type: to.Ptr("microsoft.insights/components/linkedStorageAccounts"), - // ID: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/someResourceGroupName/providers/microsoft.insights/components/myComponent/linkedStorageAccounts/serviceprofiler"), - // Properties: &armapplicationinsights.LinkedStorageAccountsProperties{ - // LinkedStorageAccount: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/someResourceGroupName/providers/Microsoft.Storage/storageAccounts/storageaccountname"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsDelete.json -func ExampleComponentLinkedStorageAccountsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armapplicationinsights.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewComponentLinkedStorageAccountsClient().Delete(ctx, "someResourceGroupName", "myComponent", armapplicationinsights.StorageTypeServiceProfiler, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentquotastatus_client_example_test.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentquotastatus_client_example_test.go index 20e1e89ec16b..a017fb3ba42e 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentquotastatus_client_example_test.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentquotastatus_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/QuotaStatusGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/QuotaStatusGet.json func ExampleComponentQuotaStatusClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/components_client_example_test.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/components_client_example_test.go index 9b2e03ad218a..3292b81f2fc6 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/components_client_example_test.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/components_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/applicationinsights/armapplicationinsights/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsList.json func ExampleComponentsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -104,7 +104,7 @@ func ExampleComponentsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsListByResourceGroup.json func ExampleComponentsClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -190,7 +190,7 @@ func ExampleComponentsClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsDelete.json func ExampleComponentsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -207,7 +207,7 @@ func ExampleComponentsClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsGet.json func ExampleComponentsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -256,7 +256,7 @@ func ExampleComponentsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsCreate.json func ExampleComponentsClient_CreateOrUpdate_componentCreate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -314,7 +314,7 @@ func ExampleComponentsClient_CreateOrUpdate_componentCreate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsUpdate.json func ExampleComponentsClient_CreateOrUpdate_componentUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -372,7 +372,7 @@ func ExampleComponentsClient_CreateOrUpdate_componentUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsUpdateTagsOnly.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsUpdateTagsOnly.json func ExampleComponentsClient_UpdateTags() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -434,7 +434,7 @@ func ExampleComponentsClient_UpdateTags() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsPurge.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsPurge.json func ExampleComponentsClient_Purge() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -459,7 +459,7 @@ func ExampleComponentsClient_Purge() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsPurgeStatus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsPurgeStatus.json func ExampleComponentsClient_GetPurgeStatus() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/constants.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/constants.go index 1de6581dd7dd..8a0b8cd9e4ad 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/constants.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/constants.go @@ -11,7 +11,7 @@ package armapplicationinsights const ( moduleName = "armapplicationinsights" - moduleVersion = "v2.0.0-beta.2" + moduleVersion = "v1.1.0" ) // ApplicationType - Type of application being monitored. @@ -49,26 +49,6 @@ func PossibleCategoryTypeValues() []CategoryType { } } -// CreatedByType - The type of identity that created the resource. -type CreatedByType string - -const ( - CreatedByTypeApplication CreatedByType = "Application" - CreatedByTypeKey CreatedByType = "Key" - CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" - CreatedByTypeUser CreatedByType = "User" -) - -// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. -func PossibleCreatedByTypeValues() []CreatedByType { - return []CreatedByType{ - CreatedByTypeApplication, - CreatedByTypeKey, - CreatedByTypeManagedIdentity, - CreatedByTypeUser, - } -} - type FavoriteSourceType string const ( @@ -219,58 +199,6 @@ func PossibleItemTypeParameterValues() []ItemTypeParameter { } } -// Kind - The kind of workbook. Choices are user and shared. -type Kind string - -const ( - KindShared Kind = "shared" - KindUser Kind = "user" -) - -// PossibleKindValues returns the possible values for the Kind const type. -func PossibleKindValues() []Kind { - return []Kind{ - KindShared, - KindUser, - } -} - -// ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). -type ManagedServiceIdentityType string - -const ( - ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" - ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned" - ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned,UserAssigned" - ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" -) - -// PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type. -func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { - return []ManagedServiceIdentityType{ - ManagedServiceIdentityTypeNone, - ManagedServiceIdentityTypeSystemAssigned, - ManagedServiceIdentityTypeSystemAssignedUserAssigned, - ManagedServiceIdentityTypeUserAssigned, - } -} - -// MyWorkbookManagedIdentityType - The identity type. -type MyWorkbookManagedIdentityType string - -const ( - MyWorkbookManagedIdentityTypeNone MyWorkbookManagedIdentityType = "None" - MyWorkbookManagedIdentityTypeUserAssigned MyWorkbookManagedIdentityType = "UserAssigned" -) - -// PossibleMyWorkbookManagedIdentityTypeValues returns the possible values for the MyWorkbookManagedIdentityType const type. -func PossibleMyWorkbookManagedIdentityTypeValues() []MyWorkbookManagedIdentityType { - return []MyWorkbookManagedIdentityType{ - MyWorkbookManagedIdentityTypeNone, - MyWorkbookManagedIdentityTypeUserAssigned, - } -} - // PublicNetworkAccessType - The network access type for operating on the Application Insights Component. By default it is // Enabled type PublicNetworkAccessType string @@ -321,16 +249,19 @@ func PossibleRequestSourceValues() []RequestSource { } } -type StorageType string +// SharedTypeKind - The kind of workbook. Choices are user and shared. +type SharedTypeKind string const ( - StorageTypeServiceProfiler StorageType = "ServiceProfiler" + SharedTypeKindShared SharedTypeKind = "shared" + SharedTypeKindUser SharedTypeKind = "user" ) -// PossibleStorageTypeValues returns the possible values for the StorageType const type. -func PossibleStorageTypeValues() []StorageType { - return []StorageType{ - StorageTypeServiceProfiler, +// PossibleSharedTypeKindValues returns the possible values for the SharedTypeKind const type. +func PossibleSharedTypeKindValues() []SharedTypeKind { + return []SharedTypeKind{ + SharedTypeKindShared, + SharedTypeKindUser, } } @@ -349,31 +280,3 @@ func PossibleWebTestKindValues() []WebTestKind { WebTestKindMultistep, } } - -// WorkbookSharedTypeKind - The kind of workbook. Only valid value is shared. -type WorkbookSharedTypeKind string - -const ( - WorkbookSharedTypeKindShared WorkbookSharedTypeKind = "shared" -) - -// PossibleWorkbookSharedTypeKindValues returns the possible values for the WorkbookSharedTypeKind const type. -func PossibleWorkbookSharedTypeKindValues() []WorkbookSharedTypeKind { - return []WorkbookSharedTypeKind{ - WorkbookSharedTypeKindShared, - } -} - -// WorkbookUpdateSharedTypeKind - The kind of workbook. Only valid value is shared. -type WorkbookUpdateSharedTypeKind string - -const ( - WorkbookUpdateSharedTypeKindShared WorkbookUpdateSharedTypeKind = "shared" -) - -// PossibleWorkbookUpdateSharedTypeKindValues returns the possible values for the WorkbookUpdateSharedTypeKind const type. -func PossibleWorkbookUpdateSharedTypeKindValues() []WorkbookUpdateSharedTypeKind { - return []WorkbookUpdateSharedTypeKind{ - WorkbookUpdateSharedTypeKindShared, - } -} diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/exportconfigurations_client_example_test.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/exportconfigurations_client_example_test.go index 9d7ba2bea6d7..8149befa4866 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/exportconfigurations_client_example_test.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/exportconfigurations_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/applicationinsights/armapplicationinsights/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationsList.json func ExampleExportConfigurationsClient_List() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -60,7 +60,7 @@ func ExampleExportConfigurationsClient_List() { // }} } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationsPost.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationsPost.json func ExampleExportConfigurationsClient_Create() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -112,7 +112,7 @@ func ExampleExportConfigurationsClient_Create() { // }} } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationDelete.json func ExampleExportConfigurationsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -153,7 +153,7 @@ func ExampleExportConfigurationsClient_Delete() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationGet.json func ExampleExportConfigurationsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -194,7 +194,7 @@ func ExampleExportConfigurationsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationUpdate.json func ExampleExportConfigurationsClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/favorites_client_example_test.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/favorites_client_example_test.go index 654994d85b5c..868b06414a08 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/favorites_client_example_test.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/favorites_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/applicationinsights/armapplicationinsights/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoritesList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoritesList.json func ExampleFavoritesClient_List() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -66,7 +66,7 @@ func ExampleFavoritesClient_List() { // }} } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteGet.json func ExampleFavoritesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -98,7 +98,7 @@ func ExampleFavoritesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteAdd.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteAdd.json func ExampleFavoritesClient_Add() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -142,7 +142,7 @@ func ExampleFavoritesClient_Add() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteUpdate.json func ExampleFavoritesClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -187,7 +187,7 @@ func ExampleFavoritesClient_Update() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteDelete.json func ExampleFavoritesClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/go.mod b/sdk/resourcemanager/applicationinsights/armapplicationinsights/go.mod index 2e2dc1880021..97cc8a662d0c 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/go.mod +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/go.mod @@ -1,4 +1,4 @@ -module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/v2 +module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights go 1.18 diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/livetoken_client.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/livetoken_client.go deleted file mode 100644 index 747b02c44f09..000000000000 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/livetoken_client.go +++ /dev/null @@ -1,85 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armapplicationinsights - -import ( - "context" - "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" - "strings" -) - -// LiveTokenClient contains the methods for the LiveToken group. -// Don't use this type directly, use NewLiveTokenClient() instead. -type LiveTokenClient struct { - internal *arm.Client -} - -// NewLiveTokenClient creates a new instance of LiveTokenClient with the specified values. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewLiveTokenClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*LiveTokenClient, error) { - cl, err := arm.NewClient(moduleName+".LiveTokenClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &LiveTokenClient{ - internal: cl, - } - return client, nil -} - -// Get - Gets an access token for live metrics stream data. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-10-14 -// - resourceURI - The identifier of the resource. -// - options - LiveTokenClientGetOptions contains the optional parameters for the LiveTokenClient.Get method. -func (client *LiveTokenClient) Get(ctx context.Context, resourceURI string, options *LiveTokenClientGetOptions) (LiveTokenClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceURI, options) - if err != nil { - return LiveTokenClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return LiveTokenClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LiveTokenClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *LiveTokenClient) getCreateRequest(ctx context.Context, resourceURI string, options *LiveTokenClientGetOptions) (*policy.Request, error) { - urlPath := "/{resourceUri}/providers/Microsoft.Insights/generatelivetoken" - urlPath = strings.ReplaceAll(urlPath, "{resourceUri}", resourceURI) - 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", "2021-10-14") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *LiveTokenClient) getHandleResponse(resp *http.Response) (LiveTokenClientGetResponse, error) { - result := LiveTokenClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LiveTokenResponse); err != nil { - return LiveTokenClientGetResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/livetoken_client_example_test.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/livetoken_client_example_test.go deleted file mode 100644 index 633d2265d252..000000000000 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/livetoken_client_example_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armapplicationinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-10-14/examples/LiveTokenGet.json -func ExampleLiveTokenClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armapplicationinsights.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLiveTokenClient().Get(ctx, "subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/FabrikamFiberApp/providers/microsoft.insights/components/CustomAvailabilityTest/providers/microsoft.insights/generatelivetoken", 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.LiveTokenResponse = armapplicationinsights.LiveTokenResponse{ - // LiveToken: to.Ptr("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"), - // } -} diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/models.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/models.go index 6615e3f88563..0abd158940ee 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/models.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/models.go @@ -529,51 +529,6 @@ type ComponentFeatureCapability struct { Value *string `json:"Value,omitempty" azure:"ro"` } -// ComponentLinkedStorageAccounts - An Application Insights component linked storage accounts -type ComponentLinkedStorageAccounts struct { - // The properties of the linked storage accounts. - Properties *LinkedStorageAccountsProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ComponentLinkedStorageAccountsClientCreateAndUpdateOptions contains the optional parameters for the ComponentLinkedStorageAccountsClient.CreateAndUpdate -// method. -type ComponentLinkedStorageAccountsClientCreateAndUpdateOptions struct { - // placeholder for future optional parameters -} - -// ComponentLinkedStorageAccountsClientDeleteOptions contains the optional parameters for the ComponentLinkedStorageAccountsClient.Delete -// method. -type ComponentLinkedStorageAccountsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ComponentLinkedStorageAccountsClientGetOptions contains the optional parameters for the ComponentLinkedStorageAccountsClient.Get -// method. -type ComponentLinkedStorageAccountsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ComponentLinkedStorageAccountsClientUpdateOptions contains the optional parameters for the ComponentLinkedStorageAccountsClient.Update -// method. -type ComponentLinkedStorageAccountsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// ComponentLinkedStorageAccountsPatch - An Application Insights component linked storage accounts patch -type ComponentLinkedStorageAccountsPatch struct { - // The properties of the linked storage accounts. - Properties *LinkedStorageAccountsProperties `json:"properties,omitempty"` -} - // ComponentListResult - Describes the list of Application Insights Resources. type ComponentListResult struct { // REQUIRED; List of Application Insights component definitions. @@ -842,16 +797,16 @@ type ComponentsResource struct { Type *string `json:"type,omitempty" azure:"ro"` } -// ErrorDefinition - Error definition. -type ErrorDefinition struct { - // READ-ONLY; Service specific error code which serves as the substatus for the HTTP error code. - Code *string `json:"code,omitempty" azure:"ro"` +// ErrorFieldContract - Error Field contract. +type ErrorFieldContract struct { + // Property level error code. + Code *string `json:"code,omitempty"` - // READ-ONLY; Internal error details. - Innererror any `json:"innererror,omitempty" azure:"ro"` + // Human-readable representation of property-level error. + Message *string `json:"message,omitempty"` - // READ-ONLY; Description of the error. - Message *string `json:"message,omitempty" azure:"ro"` + // Property name. + Target *string `json:"target,omitempty"` } // ErrorResponse - Error response indicates Insights service is not able to process the incoming request. The reason is provided @@ -880,22 +835,6 @@ type ErrorResponseComponentsError struct { Message *string `json:"message,omitempty" azure:"ro"` } -type ErrorResponseLinkedStorage struct { - // Error response indicates Insights service is not able to process the incoming request. The reason is provided in the error - // message. - Error *ErrorResponseLinkedStorageError `json:"error,omitempty"` -} - -// ErrorResponseLinkedStorageError - Error response indicates Insights service is not able to process the incoming request. -// The reason is provided in the error message. -type ErrorResponseLinkedStorageError struct { - // READ-ONLY; Error code. - Code *string `json:"code,omitempty" azure:"ro"` - - // READ-ONLY; Error message indicating why the operation failed. - Message *string `json:"message,omitempty" azure:"ro"` -} - // ExportConfigurationsClientCreateOptions contains the optional parameters for the ExportConfigurationsClient.Create method. type ExportConfigurationsClientCreateOptions struct { // placeholder for future optional parameters @@ -963,62 +902,25 @@ type InnerError struct { Time *time.Time `json:"time,omitempty"` } -// InnerErrorTrace - Error details -type InnerErrorTrace struct { - // READ-ONLY; detailed error trace - Trace []*string `json:"trace,omitempty" azure:"ro"` -} - -// LinkedStorageAccountsProperties - An Application Insights component linked storage account -type LinkedStorageAccountsProperties struct { - // Linked storage account resource ID - LinkedStorageAccount *string `json:"linkedStorageAccount,omitempty"` -} - -// LiveTokenClientGetOptions contains the optional parameters for the LiveTokenClient.Get method. -type LiveTokenClientGetOptions struct { - // placeholder for future optional parameters -} - -// LiveTokenResponse - The response to a live token query. -type LiveTokenResponse struct { - // READ-ONLY; JWT token for accessing live metrics stream data. - LiveToken *string `json:"liveToken,omitempty" azure:"ro"` -} - -// ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities) -type ManagedServiceIdentity struct { - // REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - Type *ManagedServiceIdentityType `json:"type,omitempty"` - - // The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM - // resource ids in the form: - // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - // The dictionary values can be empty objects ({}) in - // requests. - UserAssignedIdentities map[string]*UserAssignedIdentity `json:"userAssignedIdentities,omitempty"` +// LinkProperties - Contains a sourceId and workbook resource id to link two resources. +type LinkProperties struct { + // The category of workbook + Category *string `json:"category,omitempty"` - // READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned - // identity. - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` + // The source Azure resource id + SourceID *string `json:"sourceId,omitempty"` - // READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. - TenantID *string `json:"tenantId,omitempty" azure:"ro"` + // The workbook Azure resource id + TargetID *string `json:"targetId,omitempty"` } // MyWorkbook - An Application Insights private workbook definition. type MyWorkbook struct { - // Resource etag - Etag map[string]*string `json:"etag,omitempty"` - // Azure resource Id ID *string `json:"id,omitempty"` - // Identity used for BYOS - Identity *MyWorkbookManagedIdentity `json:"identity,omitempty"` - // The kind of workbook. Choices are user and shared. - Kind *Kind `json:"kind,omitempty"` + Kind *SharedTypeKind `json:"kind,omitempty"` // Resource location Location *string `json:"location,omitempty"` @@ -1034,24 +936,18 @@ type MyWorkbook struct { // Azure resource type Type *string `json:"type,omitempty"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` } -// MyWorkbookError - Error response. +// MyWorkbookError - Error message body that will indicate why the operation failed. type MyWorkbookError struct { - // The error details. - Error *ErrorDefinition `json:"error,omitempty"` -} + // Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. + Code *string `json:"code,omitempty"` -// MyWorkbookManagedIdentity - Customer Managed Identity -type MyWorkbookManagedIdentity struct { - // The identity type. - Type *MyWorkbookManagedIdentityType `json:"type,omitempty"` + // The list of invalid fields send in request, in case of validation error. + Details []*ErrorFieldContract `json:"details,omitempty"` - // Customer Managed Identity - UserAssignedIdentities *MyWorkbookUserAssignedIdentities `json:"userAssignedIdentities,omitempty"` + // Human-readable representation of the error. + Message *string `json:"message,omitempty"` } // MyWorkbookProperties - Properties that contain a private workbook. @@ -1068,9 +964,6 @@ type MyWorkbookProperties struct { // Optional resourceId for a source resource. SourceID *string `json:"sourceId,omitempty"` - // BYOS Storage Account URI - StorageURI *string `json:"storageUri,omitempty"` - // A list of 0 or more tags that are associated with this private workbook definition Tags []*string `json:"tags,omitempty"` @@ -1086,15 +979,9 @@ type MyWorkbookProperties struct { // MyWorkbookResource - An azure resource object type MyWorkbookResource struct { - // Resource etag - Etag map[string]*string `json:"etag,omitempty"` - // Azure resource Id ID *string `json:"id,omitempty"` - // Identity used for BYOS - Identity *MyWorkbookManagedIdentity `json:"identity,omitempty"` - // Resource location Location *string `json:"location,omitempty"` @@ -1108,19 +995,9 @@ type MyWorkbookResource struct { Type *string `json:"type,omitempty"` } -// MyWorkbookUserAssignedIdentities - Customer Managed Identity -type MyWorkbookUserAssignedIdentities struct { - // READ-ONLY; The principal ID of resource identity. - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` - - // READ-ONLY; The tenant ID of resource. - TenantID *string `json:"tenantId,omitempty" azure:"ro"` -} - // MyWorkbooksClientCreateOrUpdateOptions contains the optional parameters for the MyWorkbooksClient.CreateOrUpdate method. type MyWorkbooksClientCreateOrUpdateOptions struct { - // Azure Resource Id that will fetch all linked workbooks. - SourceID *string + // placeholder for future optional parameters } // MyWorkbooksClientDeleteOptions contains the optional parameters for the MyWorkbooksClient.Delete method. @@ -1139,8 +1016,6 @@ type MyWorkbooksClientListByResourceGroupOptions struct { // Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content // for workbooks. CanFetchContent *bool - // Azure Resource Id that will fetch all linked workbooks. - SourceID *string // Tags presents on each workbook returned. Tags []string } @@ -1157,14 +1032,11 @@ type MyWorkbooksClientListBySubscriptionOptions struct { // MyWorkbooksClientUpdateOptions contains the optional parameters for the MyWorkbooksClient.Update method. type MyWorkbooksClientUpdateOptions struct { - // Azure Resource Id that will fetch all linked workbooks. - SourceID *string + // placeholder for future optional parameters } // MyWorkbooksListResult - Workbook list result. type MyWorkbooksListResult struct { - NextLink *string `json:"nextLink,omitempty"` - // READ-ONLY; An array of private workbooks. Value []*MyWorkbook `json:"value,omitempty" azure:"ro"` } @@ -1190,21 +1062,6 @@ type OperationDisplay struct { Resource *string `json:"resource,omitempty"` } -// OperationInfo - Information about an operation -type OperationInfo struct { - // Description of the operation - Description *string `json:"description,omitempty"` - - // Name of the operation - Operation *string `json:"operation,omitempty"` - - // Name of the provider - Provider *string `json:"provider,omitempty"` - - // Name of the resource type - Resource *string `json:"resource,omitempty"` -} - // OperationListResult - Result of the request to list CDN operations. It contains a list of operations and a URL link to // get the next set of results. type OperationListResult struct { @@ -1215,33 +1072,6 @@ type OperationListResult struct { Value []*Operation `json:"value,omitempty"` } -// OperationLive - Represents an operation returned by the GetOperations request -type OperationLive struct { - // Display name of the operation - Display *OperationInfo `json:"display,omitempty"` - - // Indicates whether the operation is a data action - IsDataAction *bool `json:"isDataAction,omitempty"` - - // Name of the operation - Name *string `json:"name,omitempty"` - - // Origin of the operation - Origin *string `json:"origin,omitempty"` - - // Properties of the operation - Properties any `json:"properties,omitempty"` -} - -// OperationsListResult - Result of the List Operations operation -type OperationsListResult struct { - // URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` - - // A collection of operations - Value []*OperationLive `json:"value,omitempty"` -} - // PrivateLinkScopedResource - The private link scope resource reference. type PrivateLinkScopedResource struct { // The full resource Id of the private link scope resource. @@ -1269,86 +1099,12 @@ type ProactiveDetectionConfigurationsClientUpdateOptions struct { // placeholder for future optional parameters } -// ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a -// location -type ProxyResource struct { - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// Resource - Common fields that are returned in the response for all Azure Resource Manager resources -type Resource struct { - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SystemData - Metadata pertaining to creation and last modification of the resource. -type SystemData struct { - // The timestamp of resource creation (UTC). - CreatedAt *time.Time `json:"createdAt,omitempty"` - - // The identity that created the resource. - CreatedBy *string `json:"createdBy,omitempty"` - - // The type of identity that created the resource. - CreatedByType *CreatedByType `json:"createdByType,omitempty"` - - // The timestamp of resource last modification (UTC) - LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` - - // The identity that last modified the resource. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - - // The type of identity that last modified the resource. - LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` -} - // TagsResource - A container holding only the Tags for a resource, allowing the user to update the tags on a WebTest instance. type TagsResource struct { // Resource tags Tags map[string]*string `json:"tags,omitempty"` } -// TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' -// and a 'location' -type TrackedResource struct { - // REQUIRED; The geo-location where the resource lives - Location *string `json:"location,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// UserAssignedIdentity - User assigned identity properties -type UserAssignedIdentity struct { - // READ-ONLY; The client ID of the assigned identity. - ClientID *string `json:"clientId,omitempty" azure:"ro"` - - // READ-ONLY; The principal ID of the assigned identity. - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` -} - // WebTest - An Application Insights web test definition. type WebTest struct { // REQUIRED; Resource location @@ -1586,61 +1342,40 @@ type WorkItemCreateConfiguration struct { WorkItemProperties map[string]*string `json:"WorkItemProperties,omitempty"` } -// Workbook - A workbook definition. +// Workbook - An Application Insights workbook definition. type Workbook struct { - // REQUIRED; The geo-location where the resource lives - Location *string `json:"location,omitempty"` - - // Resource etag - Etag *string `json:"etag,omitempty"` - - // Identity used for BYOS - Identity *WorkbookResourceIdentity `json:"identity,omitempty"` + // The kind of workbook. Choices are user and shared. + Kind *SharedTypeKind `json:"kind,omitempty"` - // The kind of workbook. Only valid value is shared. - Kind *WorkbookSharedTypeKind `json:"kind,omitempty"` + // Resource location + Location *string `json:"location,omitempty"` - // Metadata describing a workbook for an Azure resource. + // Metadata describing a web test for an Azure resource. Properties *WorkbookProperties `json:"properties,omitempty"` - // Resource tags. + // Resource tags Tags map[string]*string `json:"tags,omitempty"` - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Azure resource Id ID *string `json:"id,omitempty" azure:"ro"` - // READ-ONLY; The name of the resource + // READ-ONLY; Azure resource name Name *string `json:"name,omitempty" azure:"ro"` - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; Azure resource type Type *string `json:"type,omitempty" azure:"ro"` } -// WorkbookError - Error response. +// WorkbookError - Error message body that will indicate why the operation failed. type WorkbookError struct { - // The error details. - Error *WorkbookErrorDefinition `json:"error,omitempty"` -} - -// WorkbookErrorDefinition - Error definition. -type WorkbookErrorDefinition struct { - // READ-ONLY; Service specific error code which serves as the substatus for the HTTP error code. - Code *string `json:"code,omitempty" azure:"ro"` - - // READ-ONLY; Internal error details. - InnerError any `json:"innerError,omitempty" azure:"ro"` + // Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. + Code *string `json:"code,omitempty"` - // READ-ONLY; Description of the error. - Message *string `json:"message,omitempty" azure:"ro"` -} + // The list of invalid fields send in request, in case of validation error. + Details []*ErrorFieldContract `json:"details,omitempty"` -// WorkbookInnerErrorTrace - Error details -type WorkbookInnerErrorTrace struct { - // READ-ONLY; detailed error trace - Trace []*string `json:"trace,omitempty" azure:"ro"` + // Human-readable representation of the error. + Message *string `json:"message,omitempty"` } // WorkbookProperties - Properties that contain a workbook. @@ -1648,204 +1383,38 @@ type WorkbookProperties struct { // REQUIRED; Workbook category, as defined by the user at creation time. Category *string `json:"category,omitempty"` - // REQUIRED; The user-defined name (display name) of the workbook. - DisplayName *string `json:"displayName,omitempty"` + // REQUIRED; The user-defined name of the workbook. + Name *string `json:"name,omitempty"` // REQUIRED; Configuration of this particular workbook. Configuration data is a string containing valid JSON SerializedData *string `json:"serializedData,omitempty"` - // The description of the workbook. - Description *string `json:"description,omitempty"` + // REQUIRED; Enum indicating if this workbook definition is owned by a specific user or is shared between all users with access + // to the Application Insights component. + SharedTypeKind *SharedTypeKind `json:"kind,omitempty"` - // ResourceId for a source resource. - SourceID *string `json:"sourceId,omitempty"` + // REQUIRED; Unique user id of the specific user that owns this workbook. + UserID *string `json:"userId,omitempty"` + + // REQUIRED; Internally assigned unique id of the workbook definition. + WorkbookID *string `json:"workbookId,omitempty"` - // The resourceId to the storage account when bring your own storage is used - StorageURI *string `json:"storageUri,omitempty"` + // Optional resourceId for a source resource. + SourceResourceID *string `json:"sourceResourceId,omitempty"` - // Being deprecated, please use the other tags field + // A list of 0 or more tags that are associated with this workbook definition Tags []*string `json:"tags,omitempty"` - // Workbook schema version format, like 'Notebook/1.0', which should match the workbook in serializedData + // This instance's version of the data model. This can change as new features are added that can be marked workbook. Version *string `json:"version,omitempty"` - // READ-ONLY; The unique revision id for this workbook definition - Revision *string `json:"revision,omitempty" azure:"ro"` - // READ-ONLY; Date and time in UTC of the last modification that was made to this workbook definition. - TimeModified *time.Time `json:"timeModified,omitempty" azure:"ro"` - - // READ-ONLY; Unique user id of the specific user that owns this workbook. - UserID *string `json:"userId,omitempty" azure:"ro"` -} - -// WorkbookPropertiesUpdateParameters - Properties that contain a workbook for PATCH operation. -type WorkbookPropertiesUpdateParameters struct { - // Workbook category, as defined by the user at creation time. - Category *string `json:"category,omitempty"` - - // The description of the workbook. - Description *string `json:"description,omitempty"` - - // The user-defined name (display name) of the workbook. - DisplayName *string `json:"displayName,omitempty"` - - // The unique revision id for this workbook definition - Revision *string `json:"revision,omitempty"` - - // Configuration of this particular workbook. Configuration data is a string containing valid JSON - SerializedData *string `json:"serializedData,omitempty"` - - // A list of 0 or more tags that are associated with this workbook definition - Tags []*string `json:"tags,omitempty"` + TimeModified *string `json:"timeModified,omitempty" azure:"ro"` } // WorkbookResource - An azure resource object type WorkbookResource struct { - // REQUIRED; The geo-location where the resource lives - Location *string `json:"location,omitempty"` - - // Resource etag - Etag *string `json:"etag,omitempty"` - - // Identity used for BYOS - Identity *WorkbookResourceIdentity `json:"identity,omitempty"` - - // The kind of workbook. Only valid value is shared. - Kind *WorkbookSharedTypeKind `json:"kind,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// WorkbookResourceIdentity - Identity used for BYOS -type WorkbookResourceIdentity struct { - // REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - Type *ManagedServiceIdentityType `json:"type,omitempty"` - - // The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM - // resource ids in the form: - // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - // The dictionary values can be empty objects ({}) in - // requests. - UserAssignedIdentities map[string]*UserAssignedIdentity `json:"userAssignedIdentities,omitempty"` - - // READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned - // identity. - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` - - // READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. - TenantID *string `json:"tenantId,omitempty" azure:"ro"` -} - -// WorkbookTemplate - An Application Insights workbook template definition. -type WorkbookTemplate struct { - // REQUIRED; Resource location - Location *string `json:"location,omitempty"` - - // Metadata describing a workbook template for an Azure resource. - Properties *WorkbookTemplateProperties `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// WorkbookTemplateError - Error message that will indicate why the operation failed. -type WorkbookTemplateError struct { - // Error message object that will indicate why the operation failed. - Error *WorkbookTemplateErrorBody `json:"error,omitempty"` -} - -// WorkbookTemplateErrorBody - Error message body that will indicate why the operation failed. -type WorkbookTemplateErrorBody struct { - // Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. - Code *string `json:"code,omitempty"` - - // The list of invalid fields send in request, in case of validation error. - Details []*WorkbookTemplateErrorFieldContract `json:"details,omitempty"` - - // Human-readable representation of the error. - Message *string `json:"message,omitempty"` -} - -// WorkbookTemplateErrorFieldContract - Error Field contract. -type WorkbookTemplateErrorFieldContract struct { - // Property level error code. - Code *string `json:"code,omitempty"` - - // Human-readable representation of property-level error. - Message *string `json:"message,omitempty"` - - // Property name. - Target *string `json:"target,omitempty"` -} - -// WorkbookTemplateGallery - Gallery information for a workbook template. -type WorkbookTemplateGallery struct { - // Category for the gallery. - Category *string `json:"category,omitempty"` - - // Name of the workbook template in the gallery. - Name *string `json:"name,omitempty"` - - // Order of the template within the gallery. - Order *int32 `json:"order,omitempty"` - - // Azure resource type supported by the gallery. - ResourceType *string `json:"resourceType,omitempty"` - - // Type of workbook supported by the workbook template. - Type *string `json:"type,omitempty"` -} - -// WorkbookTemplateLocalizedGallery - Localized template data and gallery information. -type WorkbookTemplateLocalizedGallery struct { - // Workbook galleries supported by the template. - Galleries []*WorkbookTemplateGallery `json:"galleries,omitempty"` - - // Valid JSON object containing workbook template payload. - TemplateData any `json:"templateData,omitempty"` -} - -// WorkbookTemplateProperties - Properties that contain a workbook template. -type WorkbookTemplateProperties struct { - // REQUIRED; Workbook galleries supported by the template. - Galleries []*WorkbookTemplateGallery `json:"galleries,omitempty"` - - // REQUIRED; Valid JSON object containing workbook template payload. - TemplateData any `json:"templateData,omitempty"` - - // Information about the author of the workbook template. - Author *string `json:"author,omitempty"` - - // Key value pair of localized gallery. Each key is the locale code of languages supported by the Azure portal. - Localized map[string][]*WorkbookTemplateLocalizedGallery `json:"localized,omitempty"` - - // Priority of the template. Determines which template to open when a workbook gallery is opened in viewer mode. - Priority *int32 `json:"priority,omitempty"` -} - -// WorkbookTemplateResource - An azure resource object -type WorkbookTemplateResource struct { - // REQUIRED; Resource location + // Resource location Location *string `json:"location,omitempty"` // Resource tags @@ -1854,72 +1423,16 @@ type WorkbookTemplateResource struct { // READ-ONLY; Azure resource Id ID *string `json:"id,omitempty" azure:"ro"` - // READ-ONLY; Azure resource name. + // READ-ONLY; Azure resource name Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure resource type Type *string `json:"type,omitempty" azure:"ro"` } -// WorkbookTemplateUpdateParameters - The parameters that can be provided when updating workbook template. -type WorkbookTemplateUpdateParameters struct { - // Metadata describing a workbook for an Azure resource. - Properties *WorkbookTemplateProperties `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` -} - -// WorkbookTemplatesClientCreateOrUpdateOptions contains the optional parameters for the WorkbookTemplatesClient.CreateOrUpdate -// method. -type WorkbookTemplatesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// WorkbookTemplatesClientDeleteOptions contains the optional parameters for the WorkbookTemplatesClient.Delete method. -type WorkbookTemplatesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// WorkbookTemplatesClientGetOptions contains the optional parameters for the WorkbookTemplatesClient.Get method. -type WorkbookTemplatesClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkbookTemplatesClientListByResourceGroupOptions contains the optional parameters for the WorkbookTemplatesClient.NewListByResourceGroupPager -// method. -type WorkbookTemplatesClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// WorkbookTemplatesClientUpdateOptions contains the optional parameters for the WorkbookTemplatesClient.Update method. -type WorkbookTemplatesClientUpdateOptions struct { - // Properties that need to be specified to patch a workbook template. - WorkbookTemplateUpdateParameters *WorkbookTemplateUpdateParameters -} - -// WorkbookTemplatesListResult - WorkbookTemplate list result. -type WorkbookTemplatesListResult struct { - // An array of workbook templates. - Value []*WorkbookTemplate `json:"value,omitempty"` -} - -// WorkbookUpdateParameters - The parameters that can be provided when updating workbook properties properties. -type WorkbookUpdateParameters struct { - // The kind of workbook. Only valid value is shared. - Kind *WorkbookUpdateSharedTypeKind `json:"kind,omitempty"` - - // Metadata describing a workbook for an Azure resource. - Properties *WorkbookPropertiesUpdateParameters `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` -} - // WorkbooksClientCreateOrUpdateOptions contains the optional parameters for the WorkbooksClient.CreateOrUpdate method. type WorkbooksClientCreateOrUpdateOptions struct { - // Azure Resource Id that will fetch all linked workbooks. - SourceID *string + // placeholder for future optional parameters } // WorkbooksClientDeleteOptions contains the optional parameters for the WorkbooksClient.Delete method. @@ -1929,26 +1442,12 @@ type WorkbooksClientDeleteOptions struct { // WorkbooksClientGetOptions contains the optional parameters for the WorkbooksClient.Get method. type WorkbooksClientGetOptions struct { - // Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content - // for workbooks. - CanFetchContent *bool + // placeholder for future optional parameters } // WorkbooksClientListByResourceGroupOptions contains the optional parameters for the WorkbooksClient.NewListByResourceGroupPager // method. type WorkbooksClientListByResourceGroupOptions struct { - // Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content - // for workbooks. - CanFetchContent *bool - // Azure Resource Id that will fetch all linked workbooks. - SourceID *string - // Tags presents on each workbook returned. - Tags []string -} - -// WorkbooksClientListBySubscriptionOptions contains the optional parameters for the WorkbooksClient.NewListBySubscriptionPager -// method. -type WorkbooksClientListBySubscriptionOptions struct { // Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content // for workbooks. CanFetchContent *bool @@ -1956,28 +1455,13 @@ type WorkbooksClientListBySubscriptionOptions struct { Tags []string } -// WorkbooksClientRevisionGetOptions contains the optional parameters for the WorkbooksClient.RevisionGet method. -type WorkbooksClientRevisionGetOptions struct { - // placeholder for future optional parameters -} - -// WorkbooksClientRevisionsListOptions contains the optional parameters for the WorkbooksClient.NewRevisionsListPager method. -type WorkbooksClientRevisionsListOptions struct { - // placeholder for future optional parameters -} - // WorkbooksClientUpdateOptions contains the optional parameters for the WorkbooksClient.Update method. type WorkbooksClientUpdateOptions struct { - // Azure Resource Id that will fetch all linked workbooks. - SourceID *string - // Properties that need to be specified to create a new workbook. - WorkbookUpdateParameters *WorkbookUpdateParameters + // placeholder for future optional parameters } // WorkbooksListResult - Workbook list result. type WorkbooksListResult struct { - NextLink *string `json:"nextLink,omitempty"` - // READ-ONLY; An array of workbooks. Value []*Workbook `json:"value,omitempty" azure:"ro"` } diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/models_serde.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/models_serde.go index dc1a2d108b81..95f100f193a9 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/models_serde.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/models_serde.go @@ -898,72 +898,6 @@ func (c *ComponentFeatureCapability) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ComponentLinkedStorageAccounts. -func (c ComponentLinkedStorageAccounts) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", c.ID) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ComponentLinkedStorageAccounts. -func (c *ComponentLinkedStorageAccounts) 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 "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - 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 ComponentLinkedStorageAccountsPatch. -func (c ComponentLinkedStorageAccountsPatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", c.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ComponentLinkedStorageAccountsPatch. -func (c *ComponentLinkedStorageAccountsPatch) 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 "properties": - err = unpopulate(val, "Properties", &c.Properties) - 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 ComponentListResult. func (c ComponentListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1453,17 +1387,17 @@ func (c *ComponentsResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ErrorDefinition. -func (e ErrorDefinition) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ErrorFieldContract. +func (e ErrorFieldContract) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "code", e.Code) - populate(objectMap, "innererror", &e.Innererror) populate(objectMap, "message", e.Message) + populate(objectMap, "target", e.Target) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDefinition. -func (e *ErrorDefinition) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorFieldContract. +func (e *ErrorFieldContract) 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) @@ -1474,12 +1408,12 @@ func (e *ErrorDefinition) UnmarshalJSON(data []byte) error { case "code": err = unpopulate(val, "Code", &e.Code) delete(rawMsg, key) - case "innererror": - err = unpopulate(val, "Innererror", &e.Innererror) - delete(rawMsg, key) case "message": err = unpopulate(val, "Message", &e.Message) delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &e.Target) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", e, err) @@ -1577,64 +1511,6 @@ func (e *ErrorResponseComponentsError) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ErrorResponseLinkedStorage. -func (e ErrorResponseLinkedStorage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "error", e.Error) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponseLinkedStorage. -func (e *ErrorResponseLinkedStorage) 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 "error": - err = unpopulate(val, "Error", &e.Error) - 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 ErrorResponseLinkedStorageError. -func (e ErrorResponseLinkedStorageError) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "code", e.Code) - populate(objectMap, "message", e.Message) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponseLinkedStorageError. -func (e *ErrorResponseLinkedStorageError) 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 "code": - err = unpopulate(val, "Code", &e.Code) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &e.Message) - 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 InnerError. func (i InnerError) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1666,69 +1542,17 @@ func (i *InnerError) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type InnerErrorTrace. -func (i InnerErrorTrace) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "trace", i.Trace) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InnerErrorTrace. -func (i *InnerErrorTrace) 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", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "trace": - err = unpopulate(val, "Trace", &i.Trace) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LinkedStorageAccountsProperties. -func (l LinkedStorageAccountsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "linkedStorageAccount", l.LinkedStorageAccount) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LinkedStorageAccountsProperties. -func (l *LinkedStorageAccountsProperties) 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", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "linkedStorageAccount": - err = unpopulate(val, "LinkedStorageAccount", &l.LinkedStorageAccount) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LiveTokenResponse. -func (l LiveTokenResponse) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type LinkProperties. +func (l LinkProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "liveToken", l.LiveToken) + populate(objectMap, "category", l.Category) + populate(objectMap, "sourceId", l.SourceID) + populate(objectMap, "targetId", l.TargetID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type LiveTokenResponse. -func (l *LiveTokenResponse) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type LinkProperties. +func (l *LinkProperties) 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", l, err) @@ -1736,51 +1560,18 @@ func (l *LiveTokenResponse) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "liveToken": - err = unpopulate(val, "LiveToken", &l.LiveToken) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. -func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "principalId", m.PrincipalID) - populate(objectMap, "tenantId", m.TenantID) - populate(objectMap, "type", m.Type) - populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity. -func (m *ManagedServiceIdentity) 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 "principalId": - err = unpopulate(val, "PrincipalID", &m.PrincipalID) - delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &m.TenantID) + case "category": + err = unpopulate(val, "Category", &l.Category) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) + case "sourceId": + err = unpopulate(val, "SourceID", &l.SourceID) delete(rawMsg, key) - case "userAssignedIdentities": - err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) + case "targetId": + err = unpopulate(val, "TargetID", &l.TargetID) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", l, err) } } return nil @@ -1789,14 +1580,11 @@ func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type MyWorkbook. func (m MyWorkbook) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "etag", m.Etag) populate(objectMap, "id", m.ID) - populate(objectMap, "identity", m.Identity) populate(objectMap, "kind", m.Kind) 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) @@ -1811,15 +1599,9 @@ func (m *MyWorkbook) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "etag": - err = unpopulate(val, "Etag", &m.Etag) - delete(rawMsg, key) case "id": err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &m.Identity) - delete(rawMsg, key) case "kind": err = unpopulate(val, "Kind", &m.Kind) delete(rawMsg, key) @@ -1832,9 +1614,6 @@ func (m *MyWorkbook) UnmarshalJSON(data []byte) error { 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) @@ -1852,7 +1631,9 @@ func (m *MyWorkbook) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type MyWorkbookError. func (m MyWorkbookError) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "error", m.Error) + populate(objectMap, "code", m.Code) + populate(objectMap, "details", m.Details) + populate(objectMap, "message", m.Message) return json.Marshal(objectMap) } @@ -1865,39 +1646,14 @@ func (m *MyWorkbookError) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "error": - err = unpopulate(val, "Error", &m.Error) + case "code": + err = unpopulate(val, "Code", &m.Code) 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 MyWorkbookManagedIdentity. -func (m MyWorkbookManagedIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "type", m.Type) - populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MyWorkbookManagedIdentity. -func (m *MyWorkbookManagedIdentity) 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 "type": - err = unpopulate(val, "Type", &m.Type) + case "details": + err = unpopulate(val, "Details", &m.Details) delete(rawMsg, key) - case "userAssignedIdentities": - err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) + case "message": + err = unpopulate(val, "Message", &m.Message) delete(rawMsg, key) } if err != nil { @@ -1914,7 +1670,6 @@ func (m MyWorkbookProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "displayName", m.DisplayName) populate(objectMap, "serializedData", m.SerializedData) populate(objectMap, "sourceId", m.SourceID) - populate(objectMap, "storageUri", m.StorageURI) populate(objectMap, "tags", m.Tags) populate(objectMap, "timeModified", m.TimeModified) populate(objectMap, "userId", m.UserID) @@ -1943,9 +1698,6 @@ func (m *MyWorkbookProperties) UnmarshalJSON(data []byte) error { case "sourceId": err = unpopulate(val, "SourceID", &m.SourceID) delete(rawMsg, key) - case "storageUri": - err = unpopulate(val, "StorageURI", &m.StorageURI) - delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &m.Tags) delete(rawMsg, key) @@ -1969,9 +1721,7 @@ func (m *MyWorkbookProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type MyWorkbookResource. func (m MyWorkbookResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "etag", m.Etag) populate(objectMap, "id", m.ID) - populate(objectMap, "identity", m.Identity) populate(objectMap, "location", m.Location) populate(objectMap, "name", m.Name) populate(objectMap, "tags", m.Tags) @@ -1988,15 +1738,9 @@ func (m *MyWorkbookResource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "etag": - err = unpopulate(val, "Etag", &m.Etag) - delete(rawMsg, key) case "id": err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &m.Identity) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &m.Location) delete(rawMsg, key) @@ -2017,41 +1761,9 @@ func (m *MyWorkbookResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MyWorkbookUserAssignedIdentities. -func (m MyWorkbookUserAssignedIdentities) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "principalId", m.PrincipalID) - populate(objectMap, "tenantId", m.TenantID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MyWorkbookUserAssignedIdentities. -func (m *MyWorkbookUserAssignedIdentities) 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 "principalId": - err = unpopulate(val, "PrincipalID", &m.PrincipalID) - delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &m.TenantID) - 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 MyWorkbooksListResult. func (m MyWorkbooksListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", m.NextLink) populate(objectMap, "value", m.Value) return json.Marshal(objectMap) } @@ -2065,9 +1777,6 @@ func (m *MyWorkbooksListResult) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &m.NextLink) - delete(rawMsg, key) case "value": err = unpopulate(val, "Value", &m.Value) delete(rawMsg, key) @@ -2145,18 +1854,16 @@ func (o *OperationDisplay) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type OperationInfo. -func (o OperationInfo) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type OperationListResult. +func (o OperationListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "description", o.Description) - populate(objectMap, "operation", o.Operation) - populate(objectMap, "provider", o.Provider) - populate(objectMap, "resource", o.Resource) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationInfo. -func (o *OperationInfo) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult. +func (o *OperationListResult) 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", o, err) @@ -2164,122 +1871,11 @@ func (o *OperationInfo) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "description": - err = unpopulate(val, "Description", &o.Description) - delete(rawMsg, key) - case "operation": - err = unpopulate(val, "Operation", &o.Operation) + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) delete(rawMsg, key) - case "provider": - err = unpopulate(val, "Provider", &o.Provider) - delete(rawMsg, key) - case "resource": - err = unpopulate(val, "Resource", &o.Resource) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationListResult. -func (o OperationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", o.NextLink) - populate(objectMap, "value", o.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult. -func (o *OperationListResult) 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", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &o.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &o.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationLive. -func (o OperationLive) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "display", o.Display) - populate(objectMap, "isDataAction", o.IsDataAction) - populate(objectMap, "name", o.Name) - populate(objectMap, "origin", o.Origin) - populate(objectMap, "properties", &o.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationLive. -func (o *OperationLive) 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", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "display": - err = unpopulate(val, "Display", &o.Display) - delete(rawMsg, key) - case "isDataAction": - err = unpopulate(val, "IsDataAction", &o.IsDataAction) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "origin": - err = unpopulate(val, "Origin", &o.Origin) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &o.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationsListResult. -func (o OperationsListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", o.NextLink) - populate(objectMap, "value", o.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationsListResult. -func (o *OperationsListResult) 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", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &o.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &o.Value) + case "value": + err = unpopulate(val, "Value", &o.Value) delete(rawMsg, key) } if err != nil { @@ -2320,123 +1916,6 @@ func (p *PrivateLinkScopedResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ProxyResource. -func (p ProxyResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource. -func (p *ProxyResource) 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", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", r.ID) - populate(objectMap, "name", r.Name) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Resource. -func (r *Resource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SystemData. -func (s SystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) - populate(objectMap, "createdBy", s.CreatedBy) - populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) - populate(objectMap, "lastModifiedBy", s.LastModifiedBy) - populate(objectMap, "lastModifiedByType", s.LastModifiedByType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. -func (s *SystemData) 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", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) - delete(rawMsg, key) - case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) - delete(rawMsg, key) - case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) - delete(rawMsg, key) - case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) - delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) - delete(rawMsg, key) - case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type TagsResource. func (t TagsResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2464,80 +1943,6 @@ func (t *TagsResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type TrackedResource. -func (t TrackedResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", t.ID) - populate(objectMap, "location", t.Location) - populate(objectMap, "name", t.Name) - populate(objectMap, "tags", t.Tags) - populate(objectMap, "type", t.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource. -func (t *TrackedResource) 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", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &t.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &t.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &t.Name) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &t.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &t.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity. -func (u UserAssignedIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "clientId", u.ClientID) - populate(objectMap, "principalId", u.PrincipalID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity. -func (u *UserAssignedIdentity) 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", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "clientId": - err = unpopulate(val, "ClientID", &u.ClientID) - delete(rawMsg, key) - case "principalId": - err = unpopulate(val, "PrincipalID", &u.PrincipalID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type WebTest. func (w WebTest) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2958,14 +2363,11 @@ func (w *WorkItemCreateConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Workbook. func (w Workbook) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "etag", w.Etag) populate(objectMap, "id", w.ID) - populate(objectMap, "identity", w.Identity) populate(objectMap, "kind", w.Kind) populate(objectMap, "location", w.Location) populate(objectMap, "name", w.Name) populate(objectMap, "properties", w.Properties) - populate(objectMap, "systemData", w.SystemData) populate(objectMap, "tags", w.Tags) populate(objectMap, "type", w.Type) return json.Marshal(objectMap) @@ -2980,15 +2382,9 @@ func (w *Workbook) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "etag": - err = unpopulate(val, "Etag", &w.Etag) - delete(rawMsg, key) case "id": err = unpopulate(val, "ID", &w.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &w.Identity) - delete(rawMsg, key) case "kind": err = unpopulate(val, "Kind", &w.Kind) delete(rawMsg, key) @@ -3001,9 +2397,6 @@ func (w *Workbook) UnmarshalJSON(data []byte) error { case "properties": err = unpopulate(val, "Properties", &w.Properties) delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &w.SystemData) - delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &w.Tags) delete(rawMsg, key) @@ -3020,42 +2413,15 @@ func (w *Workbook) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type WorkbookError. func (w WorkbookError) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "error", w.Error) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookError. -func (w *WorkbookError) 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", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "error": - err = unpopulate(val, "Error", &w.Error) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WorkbookErrorDefinition. -func (w WorkbookErrorDefinition) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "code", w.Code) - populate(objectMap, "innerError", &w.InnerError) + populate(objectMap, "details", w.Details) populate(objectMap, "message", w.Message) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookErrorDefinition. -func (w *WorkbookErrorDefinition) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookError. +func (w *WorkbookError) 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", w, err) @@ -3066,8 +2432,8 @@ func (w *WorkbookErrorDefinition) UnmarshalJSON(data []byte) error { case "code": err = unpopulate(val, "Code", &w.Code) delete(rawMsg, key) - case "innerError": - err = unpopulate(val, "InnerError", &w.InnerError) + case "details": + err = unpopulate(val, "Details", &w.Details) delete(rawMsg, key) case "message": err = unpopulate(val, "Message", &w.Message) @@ -3080,15 +2446,24 @@ func (w *WorkbookErrorDefinition) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type WorkbookInnerErrorTrace. -func (w WorkbookInnerErrorTrace) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type WorkbookProperties. +func (w WorkbookProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "trace", w.Trace) + populate(objectMap, "category", w.Category) + populate(objectMap, "name", w.Name) + populate(objectMap, "serializedData", w.SerializedData) + populate(objectMap, "kind", w.SharedTypeKind) + populate(objectMap, "sourceResourceId", w.SourceResourceID) + populate(objectMap, "tags", w.Tags) + populate(objectMap, "timeModified", w.TimeModified) + populate(objectMap, "userId", w.UserID) + populate(objectMap, "version", w.Version) + populate(objectMap, "workbookId", w.WorkbookID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookInnerErrorTrace. -func (w *WorkbookInnerErrorTrace) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookProperties. +func (w *WorkbookProperties) 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", w, err) @@ -3096,69 +2471,26 @@ func (w *WorkbookInnerErrorTrace) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "trace": - err = unpopulate(val, "Trace", &w.Trace) + case "category": + err = unpopulate(val, "Category", &w.Category) delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WorkbookProperties. -func (w WorkbookProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "category", w.Category) - populate(objectMap, "description", w.Description) - populate(objectMap, "displayName", w.DisplayName) - populate(objectMap, "revision", w.Revision) - populate(objectMap, "serializedData", w.SerializedData) - populate(objectMap, "sourceId", w.SourceID) - populate(objectMap, "storageUri", w.StorageURI) - populate(objectMap, "tags", w.Tags) - populateTimeRFC3339(objectMap, "timeModified", w.TimeModified) - populate(objectMap, "userId", w.UserID) - populate(objectMap, "version", w.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookProperties. -func (w *WorkbookProperties) 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", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "category": - err = unpopulate(val, "Category", &w.Category) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &w.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &w.DisplayName) - delete(rawMsg, key) - case "revision": - err = unpopulate(val, "Revision", &w.Revision) + case "name": + err = unpopulate(val, "Name", &w.Name) delete(rawMsg, key) case "serializedData": err = unpopulate(val, "SerializedData", &w.SerializedData) delete(rawMsg, key) - case "sourceId": - err = unpopulate(val, "SourceID", &w.SourceID) + case "kind": + err = unpopulate(val, "SharedTypeKind", &w.SharedTypeKind) delete(rawMsg, key) - case "storageUri": - err = unpopulate(val, "StorageURI", &w.StorageURI) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &w.SourceResourceID) delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &w.Tags) delete(rawMsg, key) case "timeModified": - err = unpopulateTimeRFC3339(val, "TimeModified", &w.TimeModified) + err = unpopulate(val, "TimeModified", &w.TimeModified) delete(rawMsg, key) case "userId": err = unpopulate(val, "UserID", &w.UserID) @@ -3166,52 +2498,8 @@ func (w *WorkbookProperties) UnmarshalJSON(data []byte) error { case "version": err = unpopulate(val, "Version", &w.Version) delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WorkbookPropertiesUpdateParameters. -func (w WorkbookPropertiesUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "category", w.Category) - populate(objectMap, "description", w.Description) - populate(objectMap, "displayName", w.DisplayName) - populate(objectMap, "revision", w.Revision) - populate(objectMap, "serializedData", w.SerializedData) - populate(objectMap, "tags", w.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookPropertiesUpdateParameters. -func (w *WorkbookPropertiesUpdateParameters) 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", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "category": - err = unpopulate(val, "Category", &w.Category) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &w.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &w.DisplayName) - delete(rawMsg, key) - case "revision": - err = unpopulate(val, "Revision", &w.Revision) - delete(rawMsg, key) - case "serializedData": - err = unpopulate(val, "SerializedData", &w.SerializedData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &w.Tags) + case "workbookId": + err = unpopulate(val, "WorkbookID", &w.WorkbookID) delete(rawMsg, key) } if err != nil { @@ -3224,10 +2512,7 @@ func (w *WorkbookPropertiesUpdateParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type WorkbookResource. func (w WorkbookResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "etag", w.Etag) populate(objectMap, "id", w.ID) - populate(objectMap, "identity", w.Identity) - populate(objectMap, "kind", w.Kind) populate(objectMap, "location", w.Location) populate(objectMap, "name", w.Name) populate(objectMap, "tags", w.Tags) @@ -3244,18 +2529,9 @@ func (w *WorkbookResource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "etag": - err = unpopulate(val, "Etag", &w.Etag) - delete(rawMsg, key) case "id": err = unpopulate(val, "ID", &w.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &w.Identity) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &w.Kind) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &w.Location) delete(rawMsg, key) @@ -3276,446 +2552,9 @@ func (w *WorkbookResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type WorkbookResourceIdentity. -func (w WorkbookResourceIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "principalId", w.PrincipalID) - populate(objectMap, "tenantId", w.TenantID) - populate(objectMap, "type", w.Type) - populate(objectMap, "userAssignedIdentities", w.UserAssignedIdentities) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookResourceIdentity. -func (w *WorkbookResourceIdentity) 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", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "principalId": - err = unpopulate(val, "PrincipalID", &w.PrincipalID) - delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &w.TenantID) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &w.Type) - delete(rawMsg, key) - case "userAssignedIdentities": - err = unpopulate(val, "UserAssignedIdentities", &w.UserAssignedIdentities) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WorkbookTemplate. -func (w WorkbookTemplate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", w.ID) - populate(objectMap, "location", w.Location) - populate(objectMap, "name", w.Name) - populate(objectMap, "properties", w.Properties) - populate(objectMap, "tags", w.Tags) - populate(objectMap, "type", w.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookTemplate. -func (w *WorkbookTemplate) 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", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &w.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &w.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &w.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &w.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &w.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &w.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WorkbookTemplateError. -func (w WorkbookTemplateError) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "error", w.Error) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookTemplateError. -func (w *WorkbookTemplateError) 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", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "error": - err = unpopulate(val, "Error", &w.Error) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WorkbookTemplateErrorBody. -func (w WorkbookTemplateErrorBody) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "code", w.Code) - populate(objectMap, "details", w.Details) - populate(objectMap, "message", w.Message) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookTemplateErrorBody. -func (w *WorkbookTemplateErrorBody) 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", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "code": - err = unpopulate(val, "Code", &w.Code) - delete(rawMsg, key) - case "details": - err = unpopulate(val, "Details", &w.Details) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &w.Message) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WorkbookTemplateErrorFieldContract. -func (w WorkbookTemplateErrorFieldContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "code", w.Code) - populate(objectMap, "message", w.Message) - populate(objectMap, "target", w.Target) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookTemplateErrorFieldContract. -func (w *WorkbookTemplateErrorFieldContract) 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", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "code": - err = unpopulate(val, "Code", &w.Code) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &w.Message) - delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &w.Target) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WorkbookTemplateGallery. -func (w WorkbookTemplateGallery) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "category", w.Category) - populate(objectMap, "name", w.Name) - populate(objectMap, "order", w.Order) - populate(objectMap, "resourceType", w.ResourceType) - populate(objectMap, "type", w.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookTemplateGallery. -func (w *WorkbookTemplateGallery) 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", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "category": - err = unpopulate(val, "Category", &w.Category) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &w.Name) - delete(rawMsg, key) - case "order": - err = unpopulate(val, "Order", &w.Order) - delete(rawMsg, key) - case "resourceType": - err = unpopulate(val, "ResourceType", &w.ResourceType) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &w.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WorkbookTemplateLocalizedGallery. -func (w WorkbookTemplateLocalizedGallery) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "galleries", w.Galleries) - populate(objectMap, "templateData", &w.TemplateData) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookTemplateLocalizedGallery. -func (w *WorkbookTemplateLocalizedGallery) 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", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "galleries": - err = unpopulate(val, "Galleries", &w.Galleries) - delete(rawMsg, key) - case "templateData": - err = unpopulate(val, "TemplateData", &w.TemplateData) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WorkbookTemplateProperties. -func (w WorkbookTemplateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "author", w.Author) - populate(objectMap, "galleries", w.Galleries) - populate(objectMap, "localized", w.Localized) - populate(objectMap, "priority", w.Priority) - populate(objectMap, "templateData", &w.TemplateData) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookTemplateProperties. -func (w *WorkbookTemplateProperties) 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", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "author": - err = unpopulate(val, "Author", &w.Author) - delete(rawMsg, key) - case "galleries": - err = unpopulate(val, "Galleries", &w.Galleries) - delete(rawMsg, key) - case "localized": - err = unpopulate(val, "Localized", &w.Localized) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &w.Priority) - delete(rawMsg, key) - case "templateData": - err = unpopulate(val, "TemplateData", &w.TemplateData) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WorkbookTemplateResource. -func (w WorkbookTemplateResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", w.ID) - populate(objectMap, "location", w.Location) - populate(objectMap, "name", w.Name) - populate(objectMap, "tags", w.Tags) - populate(objectMap, "type", w.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookTemplateResource. -func (w *WorkbookTemplateResource) 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", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &w.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &w.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &w.Name) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &w.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &w.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WorkbookTemplateUpdateParameters. -func (w WorkbookTemplateUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", w.Properties) - populate(objectMap, "tags", w.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookTemplateUpdateParameters. -func (w *WorkbookTemplateUpdateParameters) 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", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &w.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &w.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WorkbookTemplatesListResult. -func (w WorkbookTemplatesListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", w.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookTemplatesListResult. -func (w *WorkbookTemplatesListResult) 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", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &w.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WorkbookUpdateParameters. -func (w WorkbookUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "kind", w.Kind) - populate(objectMap, "properties", w.Properties) - populate(objectMap, "tags", w.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookUpdateParameters. -func (w *WorkbookUpdateParameters) 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", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "kind": - err = unpopulate(val, "Kind", &w.Kind) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &w.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &w.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type WorkbooksListResult. func (w WorkbooksListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", w.NextLink) populate(objectMap, "value", w.Value) return json.Marshal(objectMap) } @@ -3729,9 +2568,6 @@ func (w *WorkbooksListResult) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &w.NextLink) - delete(rawMsg, key) case "value": err = unpopulate(val, "Value", &w.Value) delete(rawMsg, key) diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/myworkbooks_client.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/myworkbooks_client.go index 155d2f54a7c7..1fc87a48d719 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/myworkbooks_client.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/myworkbooks_client.go @@ -48,7 +48,7 @@ func NewMyWorkbooksClient(subscriptionID string, credential azcore.TokenCredenti // CreateOrUpdate - Create a new private workbook. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-03-08 +// Generated from API version 2015-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the Application Insights component resource. // - workbookProperties - Properties that need to be specified to create a new private workbook. @@ -89,10 +89,7 @@ func (client *MyWorkbooksClient) createOrUpdateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - if options != nil && options.SourceID != nil { - reqQP.Set("sourceId", *options.SourceID) - } - reqQP.Set("api-version", "2021-03-08") + reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, workbookProperties) @@ -110,7 +107,7 @@ func (client *MyWorkbooksClient) createOrUpdateHandleResponse(resp *http.Respons // Delete - Delete a private workbook. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-03-08 +// Generated from API version 2015-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the Application Insights component resource. // - options - MyWorkbooksClientDeleteOptions contains the optional parameters for the MyWorkbooksClient.Delete method. @@ -123,7 +120,7 @@ func (client *MyWorkbooksClient) Delete(ctx context.Context, resourceGroupName s if err != nil { return MyWorkbooksClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { + if !runtime.HasStatusCode(resp, http.StatusCreated, http.StatusNoContent) { return MyWorkbooksClientDeleteResponse{}, runtime.NewResponseError(resp) } return MyWorkbooksClientDeleteResponse{}, nil @@ -149,7 +146,7 @@ func (client *MyWorkbooksClient) deleteCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-08") + reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -158,7 +155,7 @@ func (client *MyWorkbooksClient) deleteCreateRequest(ctx context.Context, resour // Get - Get a single private workbook by its resourceName. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-03-08 +// Generated from API version 2015-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the Application Insights component resource. // - options - MyWorkbooksClientGetOptions contains the optional parameters for the MyWorkbooksClient.Get method. @@ -197,7 +194,7 @@ func (client *MyWorkbooksClient) getCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-08") + reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -214,7 +211,7 @@ func (client *MyWorkbooksClient) getHandleResponse(resp *http.Response) (MyWorkb // NewListByResourceGroupPager - Get all private workbooks defined within a specified resource group and category. // -// Generated from API version 2021-03-08 +// Generated from API version 2015-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - category - Category of workbook to return. // - options - MyWorkbooksClientListByResourceGroupOptions contains the optional parameters for the MyWorkbooksClient.NewListByResourceGroupPager @@ -222,16 +219,10 @@ func (client *MyWorkbooksClient) getHandleResponse(resp *http.Response) (MyWorkb func (client *MyWorkbooksClient) NewListByResourceGroupPager(resourceGroupName string, category CategoryType, options *MyWorkbooksClientListByResourceGroupOptions) *runtime.Pager[MyWorkbooksClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[MyWorkbooksClientListByResourceGroupResponse]{ More: func(page MyWorkbooksClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 + return false }, Fetcher: func(ctx context.Context, page *MyWorkbooksClientListByResourceGroupResponse) (MyWorkbooksClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, category, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + req, err := client.listByResourceGroupCreateRequest(ctx, resourceGroupName, category, options) if err != nil { return MyWorkbooksClientListByResourceGroupResponse{}, err } @@ -267,13 +258,10 @@ func (client *MyWorkbooksClient) listByResourceGroupCreateRequest(ctx context.Co if options != nil && options.Tags != nil { reqQP.Set("tags", strings.Join(options.Tags, ",")) } - if options != nil && options.SourceID != nil { - reqQP.Set("sourceId", *options.SourceID) - } if options != nil && options.CanFetchContent != nil { reqQP.Set("canFetchContent", strconv.FormatBool(*options.CanFetchContent)) } - reqQP.Set("api-version", "2021-03-08") + reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -290,23 +278,17 @@ func (client *MyWorkbooksClient) listByResourceGroupHandleResponse(resp *http.Re // NewListBySubscriptionPager - Get all private workbooks defined within a specified subscription and category. // -// Generated from API version 2021-03-08 +// Generated from API version 2015-05-01 // - category - Category of workbook to return. // - options - MyWorkbooksClientListBySubscriptionOptions contains the optional parameters for the MyWorkbooksClient.NewListBySubscriptionPager // method. func (client *MyWorkbooksClient) NewListBySubscriptionPager(category CategoryType, options *MyWorkbooksClientListBySubscriptionOptions) *runtime.Pager[MyWorkbooksClientListBySubscriptionResponse] { return runtime.NewPager(runtime.PagingHandler[MyWorkbooksClientListBySubscriptionResponse]{ More: func(page MyWorkbooksClientListBySubscriptionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 + return false }, Fetcher: func(ctx context.Context, page *MyWorkbooksClientListBySubscriptionResponse) (MyWorkbooksClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, category, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + req, err := client.listBySubscriptionCreateRequest(ctx, category, options) if err != nil { return MyWorkbooksClientListBySubscriptionResponse{}, err } @@ -341,7 +323,7 @@ func (client *MyWorkbooksClient) listBySubscriptionCreateRequest(ctx context.Con if options != nil && options.CanFetchContent != nil { reqQP.Set("canFetchContent", strconv.FormatBool(*options.CanFetchContent)) } - reqQP.Set("api-version", "2021-03-08") + reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -359,7 +341,7 @@ func (client *MyWorkbooksClient) listBySubscriptionHandleResponse(resp *http.Res // Update - Updates a private workbook that has already been added. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-03-08 +// Generated from API version 2015-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the Application Insights component resource. // - workbookProperties - Properties that need to be specified to create a new private workbook. @@ -373,7 +355,7 @@ func (client *MyWorkbooksClient) Update(ctx context.Context, resourceGroupName s if err != nil { return MyWorkbooksClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusCreated) { + if !runtime.HasStatusCode(resp, http.StatusOK) { return MyWorkbooksClientUpdateResponse{}, runtime.NewResponseError(resp) } return client.updateHandleResponse(resp) @@ -399,10 +381,7 @@ func (client *MyWorkbooksClient) updateCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - if options != nil && options.SourceID != nil { - reqQP.Set("sourceId", *options.SourceID) - } - reqQP.Set("api-version", "2021-03-08") + reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, workbookProperties) diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/myworkbooks_client_example_test.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/myworkbooks_client_example_test.go index 5dfc6000133e..4b73073e4eb5 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/myworkbooks_client_example_test.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/myworkbooks_client_example_test.go @@ -15,11 +15,11 @@ import ( "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/applicationinsights/armapplicationinsights/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbooksList.json -func ExampleMyWorkbooksClient_NewListByResourceGroupPager_workbooksList() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/MyWorkbooksList.json +func ExampleMyWorkbooksClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -30,7 +30,6 @@ func ExampleMyWorkbooksClient_NewListByResourceGroupPager_workbooksList() { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewMyWorkbooksClient().NewListByResourceGroupPager("my-resource-group", armapplicationinsights.CategoryTypeWorkbook, &armapplicationinsights.MyWorkbooksClientListByResourceGroupOptions{Tags: []string{}, - SourceID: nil, CanFetchContent: nil, }) for pager.More() { @@ -48,37 +47,7 @@ func ExampleMyWorkbooksClient_NewListByResourceGroupPager_workbooksList() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbooksList2.json -func ExampleMyWorkbooksClient_NewListByResourceGroupPager_workbooksList2() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armapplicationinsights.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewMyWorkbooksClient().NewListByResourceGroupPager("my-resource-group", armapplicationinsights.CategoryTypeWorkbook, &armapplicationinsights.MyWorkbooksClientListByResourceGroupOptions{Tags: []string{}, - SourceID: nil, - CanFetchContent: 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.MyWorkbooksListResult = armapplicationinsights.MyWorkbooksListResult{ - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/MyWorkbookGet.json func ExampleMyWorkbooksClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -98,14 +67,14 @@ func ExampleMyWorkbooksClient_Get() { // 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.MyWorkbook = armapplicationinsights.MyWorkbook{ // Name: to.Ptr("deadb33f-8bee-4d3b-a059-9be8dac93960"), - // Type: to.Ptr("Microsoft.Insights/myworkbooks"), - // ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Insights/myworkbooks/deadb33f-8bee-4d3b-a059-9be8dac93960"), + // Type: to.Ptr("microsoft.insights/myworkbooks"), + // ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/microsoft.insights/myworkbooks/deadb33f-8bee-4d3b-a059-9be8dac93960"), // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "0": to.Ptr("TagSample01"), // "1": to.Ptr("TagSample02"), // }, - // Kind: to.Ptr(armapplicationinsights.KindUser), + // Kind: to.Ptr(armapplicationinsights.SharedTypeKindUser), // Properties: &armapplicationinsights.MyWorkbookProperties{ // Category: to.Ptr("workbook"), // DisplayName: to.Ptr("My New Workbook"), @@ -117,7 +86,7 @@ func ExampleMyWorkbooksClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/MyWorkbookDelete.json func ExampleMyWorkbooksClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -134,7 +103,7 @@ func ExampleMyWorkbooksClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookAdd.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/MyWorkbookAdd.json func ExampleMyWorkbooksClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -153,14 +122,14 @@ func ExampleMyWorkbooksClient_CreateOrUpdate() { "0": to.Ptr("TagSample01"), "1": to.Ptr("TagSample02"), }, - Kind: to.Ptr(armapplicationinsights.KindUser), + Kind: to.Ptr(armapplicationinsights.SharedTypeKindUser), Properties: &armapplicationinsights.MyWorkbookProperties{ Category: to.Ptr("workbook"), DisplayName: to.Ptr("Blah Blah Blah"), SerializedData: to.Ptr("{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}"), SourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens"), }, - }, &armapplicationinsights.MyWorkbooksClientCreateOrUpdateOptions{SourceID: nil}) + }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } @@ -169,14 +138,14 @@ func ExampleMyWorkbooksClient_CreateOrUpdate() { // 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.MyWorkbook = armapplicationinsights.MyWorkbook{ // Name: to.Ptr("deadb33f-8bee-4d3b-a059-9be8dac93960"), - // Type: to.Ptr("Microsoft.Insights/myworkbooks"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/my-resource-group/providers/Microsoft.Insights/myworkbooks/deadb33f-8bee-4d3b-a059-9be8dac93960"), + // Type: to.Ptr("microsoft.insights/myworkbooks"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/my-resource-group/providers/microsoft.insights/myworkbooks/deadb33f-8bee-4d3b-a059-9be8dac93960"), // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "0": to.Ptr("TagSample01"), // "1": to.Ptr("TagSample02"), // }, - // Kind: to.Ptr(armapplicationinsights.KindUser), + // Kind: to.Ptr(armapplicationinsights.SharedTypeKindUser), // Properties: &armapplicationinsights.MyWorkbookProperties{ // Category: to.Ptr("workbook"), // DisplayName: to.Ptr("Blah Blah Blah"), @@ -187,7 +156,7 @@ func ExampleMyWorkbooksClient_CreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/MyWorkbookUpdate.json func ExampleMyWorkbooksClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -198,14 +167,14 @@ func ExampleMyWorkbooksClient_Update() { if err != nil { log.Fatalf("failed to create client: %v", err) } - _, err = clientFactory.NewMyWorkbooksClient().Update(ctx, "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", armapplicationinsights.MyWorkbook{ + res, err := clientFactory.NewMyWorkbooksClient().Update(ctx, "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", armapplicationinsights.MyWorkbook{ Name: to.Ptr("deadb33f-8bee-4d3b-a059-9be8dac93960"), Location: to.Ptr("west us"), Tags: map[string]*string{ "0": to.Ptr("TagSample01"), "1": to.Ptr("TagSample02"), }, - Kind: to.Ptr(armapplicationinsights.KindUser), + Kind: to.Ptr(armapplicationinsights.SharedTypeKindUser), Properties: &armapplicationinsights.MyWorkbookProperties{ Category: to.Ptr("workbook"), DisplayName: to.Ptr("Blah Blah Blah"), @@ -213,8 +182,29 @@ func ExampleMyWorkbooksClient_Update() { SourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens"), Version: to.Ptr("ME"), }, - }, &armapplicationinsights.MyWorkbooksClientUpdateOptions{SourceID: nil}) + }, 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.MyWorkbook = armapplicationinsights.MyWorkbook{ + // Name: to.Ptr("deadb33f-8bee-4d3b-a059-9be8dac93960"), + // Type: to.Ptr("microsoft.insights/myworkbooks"), + // ID: to.Ptr("c0deea5e-3344-40f2-96f8-6f8e1c3b5722"), + // Location: to.Ptr("westus"), + // Tags: map[string]*string{ + // "0": to.Ptr("TagSample01"), + // "1": to.Ptr("TagSample02"), + // }, + // Kind: to.Ptr(armapplicationinsights.SharedTypeKindUser), + // Properties: &armapplicationinsights.MyWorkbookProperties{ + // Category: to.Ptr("workbook"), + // DisplayName: to.Ptr("Blah Blah Blah"), + // SerializedData: to.Ptr("{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}"), + // SourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens"), + // Version: to.Ptr("ME"), + // }, + // } } diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/proactivedetectionconfigurations_client_example_test.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/proactivedetectionconfigurations_client_example_test.go index 7a1cc9e01b83..1d7943ba5211 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/proactivedetectionconfigurations_client_example_test.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/proactivedetectionconfigurations_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/applicationinsights/armapplicationinsights/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ProactiveDetectionConfigurationsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ProactiveDetectionConfigurationsList.json func ExampleProactiveDetectionConfigurationsClient_List() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -74,7 +74,7 @@ func ExampleProactiveDetectionConfigurationsClient_List() { // }} } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ProactiveDetectionConfigurationGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ProactiveDetectionConfigurationGet.json func ExampleProactiveDetectionConfigurationsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -112,7 +112,7 @@ func ExampleProactiveDetectionConfigurationsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ProactiveDetectionConfigurationUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ProactiveDetectionConfigurationUpdate.json func ExampleProactiveDetectionConfigurationsClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/response_types.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/response_types.go index 0f4e346f44aa..432595700a64 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/response_types.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/response_types.go @@ -92,26 +92,6 @@ type ComponentFeatureCapabilitiesClientGetResponse struct { ComponentFeatureCapabilities } -// ComponentLinkedStorageAccountsClientCreateAndUpdateResponse contains the response from method ComponentLinkedStorageAccountsClient.CreateAndUpdate. -type ComponentLinkedStorageAccountsClientCreateAndUpdateResponse struct { - ComponentLinkedStorageAccounts -} - -// ComponentLinkedStorageAccountsClientDeleteResponse contains the response from method ComponentLinkedStorageAccountsClient.Delete. -type ComponentLinkedStorageAccountsClientDeleteResponse struct { - // placeholder for future response values -} - -// ComponentLinkedStorageAccountsClientGetResponse contains the response from method ComponentLinkedStorageAccountsClient.Get. -type ComponentLinkedStorageAccountsClientGetResponse struct { - ComponentLinkedStorageAccounts -} - -// ComponentLinkedStorageAccountsClientUpdateResponse contains the response from method ComponentLinkedStorageAccountsClient.Update. -type ComponentLinkedStorageAccountsClientUpdateResponse struct { - ComponentLinkedStorageAccounts -} - // ComponentQuotaStatusClientGetResponse contains the response from method ComponentQuotaStatusClient.Get. type ComponentQuotaStatusClientGetResponse struct { ComponentQuotaStatus @@ -210,11 +190,6 @@ type FavoritesClientUpdateResponse struct { ComponentFavorite } -// LiveTokenClientGetResponse contains the response from method LiveTokenClient.Get. -type LiveTokenClientGetResponse struct { - LiveTokenResponse -} - // MyWorkbooksClientCreateOrUpdateResponse contains the response from method MyWorkbooksClient.CreateOrUpdate. type MyWorkbooksClientCreateOrUpdateResponse struct { MyWorkbook @@ -331,31 +306,6 @@ type WorkItemConfigurationsClientUpdateItemResponse struct { WorkItemConfiguration } -// WorkbookTemplatesClientCreateOrUpdateResponse contains the response from method WorkbookTemplatesClient.CreateOrUpdate. -type WorkbookTemplatesClientCreateOrUpdateResponse struct { - WorkbookTemplate -} - -// WorkbookTemplatesClientDeleteResponse contains the response from method WorkbookTemplatesClient.Delete. -type WorkbookTemplatesClientDeleteResponse struct { - // placeholder for future response values -} - -// WorkbookTemplatesClientGetResponse contains the response from method WorkbookTemplatesClient.Get. -type WorkbookTemplatesClientGetResponse struct { - WorkbookTemplate -} - -// WorkbookTemplatesClientListByResourceGroupResponse contains the response from method WorkbookTemplatesClient.NewListByResourceGroupPager. -type WorkbookTemplatesClientListByResourceGroupResponse struct { - WorkbookTemplatesListResult -} - -// WorkbookTemplatesClientUpdateResponse contains the response from method WorkbookTemplatesClient.Update. -type WorkbookTemplatesClientUpdateResponse struct { - WorkbookTemplate -} - // WorkbooksClientCreateOrUpdateResponse contains the response from method WorkbooksClient.CreateOrUpdate. type WorkbooksClientCreateOrUpdateResponse struct { Workbook @@ -376,21 +326,6 @@ type WorkbooksClientListByResourceGroupResponse struct { WorkbooksListResult } -// WorkbooksClientListBySubscriptionResponse contains the response from method WorkbooksClient.NewListBySubscriptionPager. -type WorkbooksClientListBySubscriptionResponse struct { - WorkbooksListResult -} - -// WorkbooksClientRevisionGetResponse contains the response from method WorkbooksClient.RevisionGet. -type WorkbooksClientRevisionGetResponse struct { - Workbook -} - -// WorkbooksClientRevisionsListResponse contains the response from method WorkbooksClient.NewRevisionsListPager. -type WorkbooksClientRevisionsListResponse struct { - WorkbooksListResult -} - // WorkbooksClientUpdateResponse contains the response from method WorkbooksClient.Update. type WorkbooksClientUpdateResponse struct { Workbook diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/webtestlocations_client_example_test.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/webtestlocations_client_example_test.go index 7fd5e8f116c1..2c684fda1fe1 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/webtestlocations_client_example_test.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/webtestlocations_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestLocationsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestLocationsList.json func ExampleWebTestLocationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/webtests_client_example_test.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/webtests_client_example_test.go index 36bce9c9fd3a..f1cb6c714595 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/webtests_client_example_test.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/webtests_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/applicationinsights/armapplicationinsights/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestListByResourceGroup.json func ExampleWebTestsClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -104,7 +104,7 @@ func ExampleWebTestsClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestGet.json func ExampleWebTestsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -156,7 +156,7 @@ func ExampleWebTestsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestCreate.json func ExampleWebTestsClient_CreateOrUpdate_webTestCreate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -225,7 +225,7 @@ func ExampleWebTestsClient_CreateOrUpdate_webTestCreate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestUpdate.json func ExampleWebTestsClient_CreateOrUpdate_webTestUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -297,7 +297,7 @@ func ExampleWebTestsClient_CreateOrUpdate_webTestUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestUpdateTagsOnly.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestUpdateTagsOnly.json func ExampleWebTestsClient_UpdateTags() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -360,7 +360,7 @@ func ExampleWebTestsClient_UpdateTags() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestDelete.json func ExampleWebTestsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -377,7 +377,7 @@ func ExampleWebTestsClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestList.json func ExampleWebTestsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -459,7 +459,7 @@ func ExampleWebTestsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestListByComponent.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestListByComponent.json func ExampleWebTestsClient_NewListByComponentPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/workbooks_client.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/workbooks_client.go index 0a29f36b044d..b46ea0055de2 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/workbooks_client.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/workbooks_client.go @@ -48,9 +48,9 @@ func NewWorkbooksClient(subscriptionID string, credential azcore.TokenCredential // CreateOrUpdate - Create a new workbook. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-04-01 +// Generated from API version 2015-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the resource. +// - resourceName - The name of the Application Insights component resource. // - workbookProperties - Properties that need to be specified to create a new workbook. // - options - WorkbooksClientCreateOrUpdateOptions contains the optional parameters for the WorkbooksClient.CreateOrUpdate // method. @@ -71,7 +71,7 @@ func (client *WorkbooksClient) CreateOrUpdate(ctx context.Context, resourceGroup // createOrUpdateCreateRequest creates the CreateOrUpdate request. func (client *WorkbooksClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, workbookProperties Workbook, options *WorkbooksClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}" + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") } @@ -89,10 +89,7 @@ func (client *WorkbooksClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - if options != nil && options.SourceID != nil { - reqQP.Set("sourceId", *options.SourceID) - } - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, workbookProperties) @@ -110,9 +107,9 @@ func (client *WorkbooksClient) createOrUpdateHandleResponse(resp *http.Response) // Delete - Delete a workbook. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-04-01 +// Generated from API version 2015-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the resource. +// - resourceName - The name of the Application Insights component resource. // - options - WorkbooksClientDeleteOptions contains the optional parameters for the WorkbooksClient.Delete method. func (client *WorkbooksClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, options *WorkbooksClientDeleteOptions) (WorkbooksClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, options) @@ -123,7 +120,7 @@ func (client *WorkbooksClient) Delete(ctx context.Context, resourceGroupName str if err != nil { return WorkbooksClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { + if !runtime.HasStatusCode(resp, http.StatusCreated, http.StatusNoContent) { return WorkbooksClientDeleteResponse{}, runtime.NewResponseError(resp) } return WorkbooksClientDeleteResponse{}, nil @@ -131,7 +128,7 @@ func (client *WorkbooksClient) Delete(ctx context.Context, resourceGroupName str // deleteCreateRequest creates the Delete request. func (client *WorkbooksClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *WorkbooksClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}" + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") } @@ -149,7 +146,7 @@ func (client *WorkbooksClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -158,9 +155,9 @@ func (client *WorkbooksClient) deleteCreateRequest(ctx context.Context, resource // Get - Get a single workbook by its resourceName. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-04-01 +// Generated from API version 2015-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the resource. +// - resourceName - The name of the Application Insights component resource. // - options - WorkbooksClientGetOptions contains the optional parameters for the WorkbooksClient.Get method. func (client *WorkbooksClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *WorkbooksClientGetOptions) (WorkbooksClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, options) @@ -179,7 +176,7 @@ func (client *WorkbooksClient) Get(ctx context.Context, resourceGroupName string // getCreateRequest creates the Get request. func (client *WorkbooksClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *WorkbooksClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}" + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") } @@ -197,10 +194,7 @@ func (client *WorkbooksClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - if options != nil && options.CanFetchContent != nil { - reqQP.Set("canFetchContent", strconv.FormatBool(*options.CanFetchContent)) - } + reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -217,7 +211,7 @@ func (client *WorkbooksClient) getHandleResponse(resp *http.Response) (Workbooks // NewListByResourceGroupPager - Get all Workbooks defined within a specified resource group and category. // -// Generated from API version 2022-04-01 +// Generated from API version 2015-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - category - Category of workbook to return. // - options - WorkbooksClientListByResourceGroupOptions contains the optional parameters for the WorkbooksClient.NewListByResourceGroupPager @@ -225,16 +219,10 @@ func (client *WorkbooksClient) getHandleResponse(resp *http.Response) (Workbooks func (client *WorkbooksClient) NewListByResourceGroupPager(resourceGroupName string, category CategoryType, options *WorkbooksClientListByResourceGroupOptions) *runtime.Pager[WorkbooksClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[WorkbooksClientListByResourceGroupResponse]{ More: func(page WorkbooksClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 + return false }, Fetcher: func(ctx context.Context, page *WorkbooksClientListByResourceGroupResponse) (WorkbooksClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, category, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + req, err := client.listByResourceGroupCreateRequest(ctx, resourceGroupName, category, options) if err != nil { return WorkbooksClientListByResourceGroupResponse{}, err } @@ -252,7 +240,7 @@ func (client *WorkbooksClient) NewListByResourceGroupPager(resourceGroupName str // listByResourceGroupCreateRequest creates the ListByResourceGroup request. func (client *WorkbooksClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, category CategoryType, options *WorkbooksClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks" + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") } @@ -270,13 +258,10 @@ func (client *WorkbooksClient) listByResourceGroupCreateRequest(ctx context.Cont if options != nil && options.Tags != nil { reqQP.Set("tags", strings.Join(options.Tags, ",")) } - if options != nil && options.SourceID != nil { - reqQP.Set("sourceId", *options.SourceID) - } if options != nil && options.CanFetchContent != nil { reqQP.Set("canFetchContent", strconv.FormatBool(*options.CanFetchContent)) } - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -291,215 +276,16 @@ func (client *WorkbooksClient) listByResourceGroupHandleResponse(resp *http.Resp return result, nil } -// NewListBySubscriptionPager - Get all Workbooks defined within a specified subscription and category. -// -// Generated from API version 2022-04-01 -// - category - Category of workbook to return. -// - options - WorkbooksClientListBySubscriptionOptions contains the optional parameters for the WorkbooksClient.NewListBySubscriptionPager -// method. -func (client *WorkbooksClient) NewListBySubscriptionPager(category CategoryType, options *WorkbooksClientListBySubscriptionOptions) *runtime.Pager[WorkbooksClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[WorkbooksClientListBySubscriptionResponse]{ - More: func(page WorkbooksClientListBySubscriptionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WorkbooksClientListBySubscriptionResponse) (WorkbooksClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, category, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WorkbooksClientListBySubscriptionResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkbooksClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkbooksClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } - return client.listBySubscriptionHandleResponse(resp) - }, - }) -} - -// listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *WorkbooksClient) listBySubscriptionCreateRequest(ctx context.Context, category CategoryType, options *WorkbooksClientListBySubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/workbooks" - 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("category", string(category)) - if options != nil && options.Tags != nil { - reqQP.Set("tags", strings.Join(options.Tags, ",")) - } - if options != nil && options.CanFetchContent != nil { - reqQP.Set("canFetchContent", strconv.FormatBool(*options.CanFetchContent)) - } - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionHandleResponse handles the ListBySubscription response. -func (client *WorkbooksClient) listBySubscriptionHandleResponse(resp *http.Response) (WorkbooksClientListBySubscriptionResponse, error) { - result := WorkbooksClientListBySubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WorkbooksListResult); err != nil { - return WorkbooksClientListBySubscriptionResponse{}, err - } - return result, nil -} - -// RevisionGet - Get a single workbook revision defined by its revisionId. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-04-01 -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the resource. -// - revisionID - The id of the workbook's revision. -// - options - WorkbooksClientRevisionGetOptions contains the optional parameters for the WorkbooksClient.RevisionGet method. -func (client *WorkbooksClient) RevisionGet(ctx context.Context, resourceGroupName string, resourceName string, revisionID string, options *WorkbooksClientRevisionGetOptions) (WorkbooksClientRevisionGetResponse, error) { - req, err := client.revisionGetCreateRequest(ctx, resourceGroupName, resourceName, revisionID, options) - if err != nil { - return WorkbooksClientRevisionGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkbooksClientRevisionGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkbooksClientRevisionGetResponse{}, runtime.NewResponseError(resp) - } - return client.revisionGetHandleResponse(resp) -} - -// revisionGetCreateRequest creates the RevisionGet request. -func (client *WorkbooksClient) revisionGetCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, revisionID string, options *WorkbooksClientRevisionGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}/revisions/{revisionId}" - 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 resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if revisionID == "" { - return nil, errors.New("parameter revisionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{revisionId}", url.PathEscape(revisionID)) - 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", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// revisionGetHandleResponse handles the RevisionGet response. -func (client *WorkbooksClient) revisionGetHandleResponse(resp *http.Response) (WorkbooksClientRevisionGetResponse, error) { - result := WorkbooksClientRevisionGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Workbook); err != nil { - return WorkbooksClientRevisionGetResponse{}, err - } - return result, nil -} - -// NewRevisionsListPager - Get the revisions for the workbook defined by its resourceName. -// -// Generated from API version 2022-04-01 -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the resource. -// - options - WorkbooksClientRevisionsListOptions contains the optional parameters for the WorkbooksClient.NewRevisionsListPager -// method. -func (client *WorkbooksClient) NewRevisionsListPager(resourceGroupName string, resourceName string, options *WorkbooksClientRevisionsListOptions) *runtime.Pager[WorkbooksClientRevisionsListResponse] { - return runtime.NewPager(runtime.PagingHandler[WorkbooksClientRevisionsListResponse]{ - More: func(page WorkbooksClientRevisionsListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WorkbooksClientRevisionsListResponse) (WorkbooksClientRevisionsListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.revisionsListCreateRequest(ctx, resourceGroupName, resourceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WorkbooksClientRevisionsListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkbooksClientRevisionsListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkbooksClientRevisionsListResponse{}, runtime.NewResponseError(resp) - } - return client.revisionsListHandleResponse(resp) - }, - }) -} - -// revisionsListCreateRequest creates the RevisionsList request. -func (client *WorkbooksClient) revisionsListCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *WorkbooksClientRevisionsListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}/revisions" - 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 resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - 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", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// revisionsListHandleResponse handles the RevisionsList response. -func (client *WorkbooksClient) revisionsListHandleResponse(resp *http.Response) (WorkbooksClientRevisionsListResponse, error) { - result := WorkbooksClientRevisionsListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WorkbooksListResult); err != nil { - return WorkbooksClientRevisionsListResponse{}, err - } - return result, nil -} - // Update - Updates a workbook that has already been added. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-04-01 +// Generated from API version 2015-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the resource. +// - resourceName - The name of the Application Insights component resource. +// - workbookProperties - Properties that need to be specified to create a new workbook. // - options - WorkbooksClientUpdateOptions contains the optional parameters for the WorkbooksClient.Update method. -func (client *WorkbooksClient) Update(ctx context.Context, resourceGroupName string, resourceName string, options *WorkbooksClientUpdateOptions) (WorkbooksClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, resourceName, options) +func (client *WorkbooksClient) Update(ctx context.Context, resourceGroupName string, resourceName string, workbookProperties Workbook, options *WorkbooksClientUpdateOptions) (WorkbooksClientUpdateResponse, error) { + req, err := client.updateCreateRequest(ctx, resourceGroupName, resourceName, workbookProperties, options) if err != nil { return WorkbooksClientUpdateResponse{}, err } @@ -507,15 +293,15 @@ func (client *WorkbooksClient) Update(ctx context.Context, resourceGroupName str if err != nil { return WorkbooksClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusCreated) { + if !runtime.HasStatusCode(resp, http.StatusOK) { return WorkbooksClientUpdateResponse{}, runtime.NewResponseError(resp) } return client.updateHandleResponse(resp) } // updateCreateRequest creates the Update request. -func (client *WorkbooksClient) updateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *WorkbooksClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}" +func (client *WorkbooksClient) updateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, workbookProperties Workbook, options *WorkbooksClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") } @@ -533,16 +319,10 @@ func (client *WorkbooksClient) updateCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - if options != nil && options.SourceID != nil { - reqQP.Set("sourceId", *options.SourceID) - } - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.WorkbookUpdateParameters != nil { - return req, runtime.MarshalAsJSON(req, *options.WorkbookUpdateParameters) - } - return req, nil + return req, runtime.MarshalAsJSON(req, workbookProperties) } // updateHandleResponse handles the Update response. diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/workbooks_client_example_test.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/workbooks_client_example_test.go index b0afc9c170d8..3aa0f450ae01 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/workbooks_client_example_test.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/workbooks_client_example_test.go @@ -15,187 +15,11 @@ import ( "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/applicationinsights/armapplicationinsights/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksList2.json -func ExampleWorkbooksClient_NewListBySubscriptionPager_workbooksList2() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armapplicationinsights.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkbooksClient().NewListBySubscriptionPager(armapplicationinsights.CategoryTypeWorkbook, &armapplicationinsights.WorkbooksClientListBySubscriptionOptions{Tags: []string{}, - CanFetchContent: 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.WorkbooksListResult = armapplicationinsights.WorkbooksListResult{ - // Value: []*armapplicationinsights.Workbook{ - // }, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksListSub.json -func ExampleWorkbooksClient_NewListBySubscriptionPager_workbooksListSub() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armapplicationinsights.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkbooksClient().NewListBySubscriptionPager(armapplicationinsights.CategoryTypeWorkbook, &armapplicationinsights.WorkbooksClientListBySubscriptionOptions{Tags: []string{}, - CanFetchContent: 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.WorkbooksListResult = armapplicationinsights.WorkbooksListResult{ - // Value: []*armapplicationinsights.Workbook{ - // { - // Name: to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"), - // Type: to.Ptr("Microsoft.Insights/workbooks"), - // ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // }, - // Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared), - // Properties: &armapplicationinsights.WorkbookProperties{ - // Description: to.Ptr("Sample workbook"), - // Category: to.Ptr("workbook"), - // DisplayName: to.Ptr("My Workbook 1"), - // Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1bb"), - // SerializedData: to.Ptr("{\"verion\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}"), - // SourceID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Web/sites/MyApp"), - // TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-20T22:00:26.4229554Z"); return t}()), - // UserID: to.Ptr("userId"), - // Version: to.Ptr("Notebook/1.0"), - // }, - // }, - // { - // Name: to.Ptr("c0deea5e-3344-40f2-96f8-6f8e1c3b5722"), - // Type: to.Ptr("Microsoft.Insights/workbooks"), - // ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/c0deea5e-3344-40f2-96f8-6f8e1c3b5722"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "TagSample01": to.Ptr("sample01"), - // "TagSample02": to.Ptr("sample02"), - // }, - // Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared), - // Properties: &armapplicationinsights.WorkbookProperties{ - // Description: to.Ptr("Sample workbook"), - // Category: to.Ptr("workbook"), - // DisplayName: to.Ptr("My Workbook 2"), - // Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1bc"), - // SerializedData: to.Ptr("{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}"), - // SourceID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Web/sites/MyApp"), - // TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-20T22:00:26.4229554Z"); return t}()), - // UserID: to.Ptr("userId"), - // Version: to.Ptr("Notebook/1.0"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksList.json -func ExampleWorkbooksClient_NewListByResourceGroupPager_workbooksList() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armapplicationinsights.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkbooksClient().NewListByResourceGroupPager("my-resource-group", armapplicationinsights.CategoryTypeWorkbook, &armapplicationinsights.WorkbooksClientListByResourceGroupOptions{Tags: []string{}, - SourceID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp"), - CanFetchContent: 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.WorkbooksListResult = armapplicationinsights.WorkbooksListResult{ - // Value: []*armapplicationinsights.Workbook{ - // { - // Name: to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"), - // Type: to.Ptr("Microsoft.Insights/workbooks"), - // ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // }, - // Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared), - // Properties: &armapplicationinsights.WorkbookProperties{ - // Description: to.Ptr("Sample workbook"), - // Category: to.Ptr("workbook"), - // DisplayName: to.Ptr("My Workbook 1"), - // Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1bb"), - // SerializedData: to.Ptr("{\"verion\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}"), - // SourceID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp"), - // TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-04T09:07:17.735638Z"); return t}()), - // UserID: to.Ptr("userId"), - // Version: to.Ptr("Notebook/1.0"), - // }, - // }, - // { - // Name: to.Ptr("c0deea5e-3344-40f2-96f8-6f8e1c3b5722"), - // Type: to.Ptr("Microsoft.Insights/workbooks"), - // ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/c0deea5e-3344-40f2-96f8-6f8e1c3b5722"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "TagSample01": to.Ptr("sample01"), - // "TagSample02": to.Ptr("sample02"), - // }, - // Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared), - // Properties: &armapplicationinsights.WorkbookProperties{ - // Description: to.Ptr("Sample workbook"), - // Category: to.Ptr("workbook"), - // DisplayName: to.Ptr("My Workbook 2"), - // Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1bc"), - // SerializedData: to.Ptr("{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}"), - // SourceID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp"), - // TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-04T09:07:17.735638Z"); return t}()), - // UserID: to.Ptr("userId"), - // Version: to.Ptr("Notebook/1.0"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksManagedList.json -func ExampleWorkbooksClient_NewListByResourceGroupPager_workbooksManagedList() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json +func ExampleWorkbooksClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -206,7 +30,6 @@ func ExampleWorkbooksClient_NewListByResourceGroupPager_workbooksManagedList() { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewWorkbooksClient().NewListByResourceGroupPager("my-resource-group", armapplicationinsights.CategoryTypeWorkbook, &armapplicationinsights.WorkbooksClientListByResourceGroupOptions{Tags: []string{}, - SourceID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac119r124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp"), CanFetchContent: nil, }) for pager.More() { @@ -220,106 +43,12 @@ func ExampleWorkbooksClient_NewListByResourceGroupPager_workbooksManagedList() { } // 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.WorkbooksListResult = armapplicationinsights.WorkbooksListResult{ - // Value: []*armapplicationinsights.Workbook{ - // { - // Name: to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"), - // Type: to.Ptr("Microsoft.Insights/workbooks"), - // ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // }, - // Identity: &armapplicationinsights.WorkbookResourceIdentity{ - // Type: to.Ptr(armapplicationinsights.ManagedServiceIdentityTypeUserAssigned), - // UserAssignedIdentities: map[string]*armapplicationinsights.UserAssignedIdentity{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myid": &armapplicationinsights.UserAssignedIdentity{ - // ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // }, - // }, - // }, - // Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared), - // Properties: &armapplicationinsights.WorkbookProperties{ - // Description: to.Ptr("Sample workbook"), - // Category: to.Ptr("workbook"), - // DisplayName: to.Ptr("My Workbook 1"), - // Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1bb"), - // SerializedData: to.Ptr("{\"verion\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}"), - // SourceID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac119r124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp"), - // StorageURI: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac119r124af/resourceGroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/mystorage/blobServices/default/containers/mycontainer"), - // TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-20T22:00:26.4229554Z"); return t}()), - // UserID: to.Ptr("userId"), - // Version: to.Ptr("Notebook/1.0"), - // }, - // }, - // { - // Name: to.Ptr("c0deea5e-3344-40f2-96f8-6f8e1cdd5722"), - // Type: to.Ptr("Microsoft.Insights/workbooks"), - // ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/c0deea5e-3344-40f2-96f8-6f8e1cdd5722"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "TagSample01": to.Ptr("sample01"), - // "TagSample02": to.Ptr("sample02"), - // }, - // Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared), - // Properties: &armapplicationinsights.WorkbookProperties{ - // Description: to.Ptr("Sample workbook"), - // Category: to.Ptr("workbook"), - // DisplayName: to.Ptr("My Workbook 2"), - // Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1bc"), - // SerializedData: to.Ptr("{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}"), - // SourceID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac119r124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp"), - // TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-20T21:00:26.4229555Z"); return t}()), - // UserID: to.Ptr("userId"), - // Version: to.Ptr("Notebook/1.0"), - // }, - // }}, // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookGet.json -func ExampleWorkbooksClient_Get_workbookGet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armapplicationinsights.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkbooksClient().Get(ctx, "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", &armapplicationinsights.WorkbooksClientGetOptions{CanFetchContent: 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.Workbook = armapplicationinsights.Workbook{ - // Name: to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"), - // Type: to.Ptr("Microsoft.Insights/workbooks"), - // ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/microsoft.insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "TagSample01": to.Ptr("sample01"), - // "TagSample02": to.Ptr("sample02"), - // }, - // Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared), - // Properties: &armapplicationinsights.WorkbookProperties{ - // Description: to.Ptr("Sample workbook"), - // Category: to.Ptr("workbook"), - // DisplayName: to.Ptr("Sample workbook"), - // Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1bb"), - // SerializedData: to.Ptr("{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}"), - // TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-24T06:56:31.6301521Z"); return t}()), - // UserID: to.Ptr("userId"), - // Version: to.Ptr("Notebook/1.0"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookGet1.json -func ExampleWorkbooksClient_Get_workbookGet1() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookGet.json +func ExampleWorkbooksClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -329,7 +58,7 @@ func ExampleWorkbooksClient_Get_workbookGet1() { if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := clientFactory.NewWorkbooksClient().Get(ctx, "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", &armapplicationinsights.WorkbooksClientGetOptions{CanFetchContent: nil}) + res, err := clientFactory.NewWorkbooksClient().Get(ctx, "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } @@ -337,75 +66,27 @@ func ExampleWorkbooksClient_Get_workbookGet1() { _ = 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.Workbook = armapplicationinsights.Workbook{ - // Name: to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"), - // Type: to.Ptr("Microsoft.Insights/workbooks"), - // ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/microsoft.insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"), + // Name: to.Ptr("deadb33f-8bee-4d3b-a059-9be8dac93960"), + // Type: to.Ptr(""), + // ID: to.Ptr("c0deea5e-3344-40f2-96f8-6f8e1c3b5722"), // Location: to.Ptr("westus"), // Tags: map[string]*string{ - // "TagSample01": to.Ptr("sample01"), - // "TagSample02": to.Ptr("sample02"), + // "0": to.Ptr("TagSample01"), + // "1": to.Ptr("TagSample02"), // }, - // Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared), // Properties: &armapplicationinsights.WorkbookProperties{ + // Name: to.Ptr("My New Workbook"), // Category: to.Ptr("workbook"), - // DisplayName: to.Ptr("Sample workbook"), + // SharedTypeKind: to.Ptr(armapplicationinsights.SharedTypeKindShared), // SerializedData: to.Ptr("{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}"), - // TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-24T06:56:31.6301521Z"); return t}()), // UserID: to.Ptr("userId"), - // Version: to.Ptr("Notebook/1.0"), + // Version: to.Ptr("ME"), + // WorkbookID: to.Ptr("deadb33f-8bee-4d3b-a059-9be8dac93960"), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookManagedGet.json -func ExampleWorkbooksClient_Get_workbookManagedGet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armapplicationinsights.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkbooksClient().Get(ctx, "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", &armapplicationinsights.WorkbooksClientGetOptions{CanFetchContent: 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.Workbook = armapplicationinsights.Workbook{ - // Name: to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"), - // Type: to.Ptr("Microsoft.Insights/workbooks"), - // ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"), - // Location: to.Ptr("westus"), - // Identity: &armapplicationinsights.WorkbookResourceIdentity{ - // Type: to.Ptr(armapplicationinsights.ManagedServiceIdentityTypeUserAssigned), - // UserAssignedIdentities: map[string]*armapplicationinsights.UserAssignedIdentity{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myid": &armapplicationinsights.UserAssignedIdentity{ - // ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // }, - // }, - // }, - // Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared), - // Properties: &armapplicationinsights.WorkbookProperties{ - // Description: to.Ptr("Sample workbook"), - // Category: to.Ptr("workbook"), - // DisplayName: to.Ptr("azuremon"), - // Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1bb"), - // SerializedData: to.Ptr("{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":{\"json\":\"testing1\"},\"showPin\":false,\"name\":\"text - 0\"}],\"isLocked\":true,\"fallbackResourceIds\":[\"Azure Monitor\"]}"), - // SourceID: to.Ptr("azure monitor"), - // StorageURI: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/mystorage/blobServices/default/containers/mycontainer"), - // TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-04T09:07:17.735638Z"); return t}()), - // UserID: to.Ptr("51d1409c-d725-4550-ac03-98c0bef9ef07"), - // Version: to.Ptr("Notebook/1.0"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDelete.json func ExampleWorkbooksClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -422,8 +103,8 @@ func ExampleWorkbooksClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookAdd.json -func ExampleWorkbooksClient_CreateOrUpdate_workbookAdd() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json +func ExampleWorkbooksClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -433,20 +114,24 @@ func ExampleWorkbooksClient_CreateOrUpdate_workbookAdd() { if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := clientFactory.NewWorkbooksClient().CreateOrUpdate(ctx, "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", armapplicationinsights.Workbook{ - Location: to.Ptr("westus"), + res, err := clientFactory.NewWorkbooksClient().CreateOrUpdate(ctx, "my-resource-group", "deadb33f-8bee-4d3b-a059-9be8dac93960", armapplicationinsights.Workbook{ + Name: to.Ptr("deadb33f-8bee-4d3b-a059-9be8dac93960"), + ID: to.Ptr("c0deea5e-3344-40f2-96f8-6f8e1c3b5722"), + Location: to.Ptr("west us"), Tags: map[string]*string{ - "TagSample01": to.Ptr("sample01"), - "TagSample02": to.Ptr("sample02"), + "0": to.Ptr("TagSample01"), + "1": to.Ptr("TagSample02"), }, - Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared), Properties: &armapplicationinsights.WorkbookProperties{ - Description: to.Ptr("Sample workbook"), - Category: to.Ptr("workbook"), - DisplayName: to.Ptr("Sample workbook"), - SerializedData: to.Ptr("{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}"), + Name: to.Ptr("Blah Blah Blah"), + Category: to.Ptr("workbook"), + SharedTypeKind: to.Ptr(armapplicationinsights.SharedTypeKindShared), + SerializedData: to.Ptr("{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}"), + SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens"), + UserID: to.Ptr("userId"), + WorkbookID: to.Ptr("deadb33f-8bee-4d3b-a059-9be8dac93960"), }, - }, &armapplicationinsights.WorkbooksClientCreateOrUpdateOptions{SourceID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group")}) + }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } @@ -454,31 +139,28 @@ func ExampleWorkbooksClient_CreateOrUpdate_workbookAdd() { _ = 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.Workbook = armapplicationinsights.Workbook{ - // Name: to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"), - // Type: to.Ptr("Microsoft.Insights/workbooks"), - // ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/microsoft.insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"), + // Name: to.Ptr("deadb33f-8bee-4d3b-a059-9be8dac93960"), + // Type: to.Ptr(""), + // ID: to.Ptr("c0deea5e-3344-40f2-96f8-6f8e1c3b5722"), // Location: to.Ptr("westus"), // Tags: map[string]*string{ - // "TagSample01": to.Ptr("sample01"), - // "TagSample02": to.Ptr("sample02"), + // "0": to.Ptr("TagSample01"), + // "1": to.Ptr("TagSample02"), // }, - // Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared), // Properties: &armapplicationinsights.WorkbookProperties{ - // Description: to.Ptr("Sample workbook"), + // Name: to.Ptr("Blah Blah Blah"), // Category: to.Ptr("workbook"), - // DisplayName: to.Ptr("Sample workbook"), - // Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1bb"), + // SharedTypeKind: to.Ptr(armapplicationinsights.SharedTypeKindShared), // SerializedData: to.Ptr("{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}"), - // SourceID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group"), - // TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-24T06:56:31.6301521Z"); return t}()), // UserID: to.Ptr("userId"), - // Version: to.Ptr("Notebook/1.0"), + // Version: to.Ptr("ME"), + // WorkbookID: to.Ptr("deadb33f-8bee-4d3b-a059-9be8dac93960"), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookManagedAdd.json -func ExampleWorkbooksClient_CreateOrUpdate_workbookManagedAdd() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json +func ExampleWorkbooksClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -488,178 +170,23 @@ func ExampleWorkbooksClient_CreateOrUpdate_workbookManagedAdd() { if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := clientFactory.NewWorkbooksClient().CreateOrUpdate(ctx, "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", armapplicationinsights.Workbook{ - Location: to.Ptr("westus"), - Identity: &armapplicationinsights.WorkbookResourceIdentity{ - Type: to.Ptr(armapplicationinsights.ManagedServiceIdentityTypeUserAssigned), - UserAssignedIdentities: map[string]*armapplicationinsights.UserAssignedIdentity{ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myid": {}, - }, + res, err := clientFactory.NewWorkbooksClient().Update(ctx, "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", armapplicationinsights.Workbook{ + Name: to.Ptr("deadb33f-8bee-4d3b-a059-9be8dac93960"), + Location: to.Ptr("west us"), + Tags: map[string]*string{ + "0": to.Ptr("TagSample01"), + "1": to.Ptr("TagSample02"), }, - Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared), Properties: &armapplicationinsights.WorkbookProperties{ - Description: to.Ptr("Sample workbook"), + Name: to.Ptr("Blah Blah Blah"), Category: to.Ptr("workbook"), - DisplayName: to.Ptr("Sample workbook"), - SerializedData: to.Ptr("{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":{\"json\":\"test\"},\"name\":\"text - 0\"}],\"isLocked\":false,\"fallbackResourceIds\":[\"/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/my-resource-group\"]}"), - StorageURI: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/mystorage/blobServices/default/containers/mycontainer"), - Version: to.Ptr("Notebook/1.0"), + SharedTypeKind: to.Ptr(armapplicationinsights.SharedTypeKindShared), + SerializedData: to.Ptr("{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}"), + UserID: to.Ptr("userId"), + Version: to.Ptr("ME"), + WorkbookID: to.Ptr("deadb33f-8bee-4d3b-a059-9be8dac93960"), }, - }, &armapplicationinsights.WorkbooksClientCreateOrUpdateOptions{SourceID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group")}) - 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.Workbook = armapplicationinsights.Workbook{ - // Name: to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"), - // Type: to.Ptr("Microsoft.Insights/workbooks"), - // ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"), - // Location: to.Ptr("westus"), - // Identity: &armapplicationinsights.WorkbookResourceIdentity{ - // Type: to.Ptr(armapplicationinsights.ManagedServiceIdentityTypeUserAssigned), - // UserAssignedIdentities: map[string]*armapplicationinsights.UserAssignedIdentity{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myid": &armapplicationinsights.UserAssignedIdentity{ - // ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // }, - // }, - // }, - // Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared), - // Properties: &armapplicationinsights.WorkbookProperties{ - // Description: to.Ptr("Sample workbook"), - // Category: to.Ptr("workbook"), - // DisplayName: to.Ptr("Sample workbook"), - // Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1bb"), - // SerializedData: to.Ptr("{\"version\":\"Notebook/1.0\",\"items\":[],\"isLocked\":false,\"fallbackResourceIds\":[\"/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/my-resource-group/providers/Microsoft.OperationalInsights/workspaces/test-ws\"]}"), - // SourceID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group"), - // StorageURI: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/mystorage/blobServices/default/containers/mycontainer"), - // TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-20T22:00:26.4229554Z"); return t}()), - // UserID: to.Ptr("70d90f65-8a70-4e42-b8d5-86gv25e0a90f"), - // Version: to.Ptr("Notebook/1.0"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookManagedUpdate.json -func ExampleWorkbooksClient_Update_workbookManagedUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armapplicationinsights.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewWorkbooksClient().Update(ctx, "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", &armapplicationinsights.WorkbooksClientUpdateOptions{SourceID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group"), - WorkbookUpdateParameters: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookUpdate.json -func ExampleWorkbooksClient_Update_workbookUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armapplicationinsights.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewWorkbooksClient().Update(ctx, "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", &armapplicationinsights.WorkbooksClientUpdateOptions{SourceID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp"), - WorkbookUpdateParameters: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookRevisionsList.json -func ExampleWorkbooksClient_NewRevisionsListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armapplicationinsights.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkbooksClient().NewRevisionsListPager("my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", 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.WorkbooksListResult = armapplicationinsights.WorkbooksListResult{ - // Value: []*armapplicationinsights.Workbook{ - // { - // Name: to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"), - // Type: to.Ptr("Microsoft.Insights/workbooks"), - // ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // }, - // Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared), - // Properties: &armapplicationinsights.WorkbookProperties{ - // Description: to.Ptr("Sample workbook"), - // Category: to.Ptr("workbook"), - // DisplayName: to.Ptr("My Workbook 1"), - // Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1ab"), - // SourceID: to.Ptr("Azure Monitor"), - // TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-04T09:07:17.735638Z"); return t}()), - // UserID: to.Ptr("userId"), - // Version: to.Ptr("Notebook/1.0"), - // }, - // }, - // { - // Name: to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"), - // Type: to.Ptr("Microsoft.Insights/workbooks"), - // ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "TagSample01": to.Ptr("sample01"), - // "TagSample02": to.Ptr("sample02"), - // }, - // Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared), - // Properties: &armapplicationinsights.WorkbookProperties{ - // Description: to.Ptr("Sample workbook"), - // Category: to.Ptr("workbook"), - // DisplayName: to.Ptr("My Workbook 2"), - // Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1bb"), - // SourceID: to.Ptr("Azure Monitor"), - // TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-04T09:07:17.735638Z"); return t}()), - // UserID: to.Ptr("userId"), - // Version: to.Ptr("Notebook/1.0"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookRevisionGet.json -func ExampleWorkbooksClient_RevisionGet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armapplicationinsights.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkbooksClient().RevisionGet(ctx, "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", "1e2f8435b98248febee70c64ac22e1ab", nil) + }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } @@ -667,24 +194,22 @@ func ExampleWorkbooksClient_RevisionGet() { _ = 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.Workbook = armapplicationinsights.Workbook{ - // Name: to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"), - // Type: to.Ptr("Microsoft.Insights/workbooks"), - // ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"), + // Name: to.Ptr("deadb33f-8bee-4d3b-a059-9be8dac93960"), + // Type: to.Ptr(""), + // ID: to.Ptr("c0deea5e-3344-40f2-96f8-6f8e1c3b5722"), // Location: to.Ptr("westus"), // Tags: map[string]*string{ - // "TagSample01": to.Ptr("sample01"), - // "TagSample02": to.Ptr("sample02"), + // "0": to.Ptr("TagSample01"), + // "1": to.Ptr("TagSample02"), // }, - // Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared), // Properties: &armapplicationinsights.WorkbookProperties{ - // Description: to.Ptr("Sample workbook"), + // Name: to.Ptr("Blah Blah Blah"), // Category: to.Ptr("workbook"), - // DisplayName: to.Ptr("My New Workbook"), - // Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1ab"), + // SharedTypeKind: to.Ptr(armapplicationinsights.SharedTypeKindShared), // SerializedData: to.Ptr("{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}"), - // TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-04T09:07:17.735638Z"); return t}()), // UserID: to.Ptr("userId"), - // Version: to.Ptr("Notebook/1.0"), + // Version: to.Ptr("ME"), + // WorkbookID: to.Ptr("deadb33f-8bee-4d3b-a059-9be8dac93960"), // }, // } } diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/workbooktemplates_client.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/workbooktemplates_client.go deleted file mode 100644 index e0fdc81d6036..000000000000 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/workbooktemplates_client.go +++ /dev/null @@ -1,330 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armapplicationinsights - -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" -) - -// WorkbookTemplatesClient contains the methods for the WorkbookTemplates group. -// Don't use this type directly, use NewWorkbookTemplatesClient() instead. -type WorkbookTemplatesClient struct { - internal *arm.Client - subscriptionID string -} - -// NewWorkbookTemplatesClient creates a new instance of WorkbookTemplatesClient with the specified values. -// - subscriptionID - The ID of the target subscription. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewWorkbookTemplatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkbookTemplatesClient, error) { - cl, err := arm.NewClient(moduleName+".WorkbookTemplatesClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &WorkbookTemplatesClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// CreateOrUpdate - Create a new workbook template. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2020-11-20 -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the Application Insights component resource. -// - workbookTemplateProperties - Properties that need to be specified to create a new workbook. -// - options - WorkbookTemplatesClientCreateOrUpdateOptions contains the optional parameters for the WorkbookTemplatesClient.CreateOrUpdate -// method. -func (client *WorkbookTemplatesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, workbookTemplateProperties WorkbookTemplate, options *WorkbookTemplatesClientCreateOrUpdateOptions) (WorkbookTemplatesClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, resourceName, workbookTemplateProperties, options) - if err != nil { - return WorkbookTemplatesClientCreateOrUpdateResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkbookTemplatesClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return WorkbookTemplatesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *WorkbookTemplatesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, workbookTemplateProperties WorkbookTemplate, options *WorkbookTemplatesClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates/{resourceName}" - 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 resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - 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", "2020-11-20") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, workbookTemplateProperties) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *WorkbookTemplatesClient) createOrUpdateHandleResponse(resp *http.Response) (WorkbookTemplatesClientCreateOrUpdateResponse, error) { - result := WorkbookTemplatesClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WorkbookTemplate); err != nil { - return WorkbookTemplatesClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Delete a workbook template. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2020-11-20 -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the Application Insights component resource. -// - options - WorkbookTemplatesClientDeleteOptions contains the optional parameters for the WorkbookTemplatesClient.Delete -// method. -func (client *WorkbookTemplatesClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, options *WorkbookTemplatesClientDeleteOptions) (WorkbookTemplatesClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, options) - if err != nil { - return WorkbookTemplatesClientDeleteResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkbookTemplatesClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WorkbookTemplatesClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return WorkbookTemplatesClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *WorkbookTemplatesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *WorkbookTemplatesClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates/{resourceName}" - 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 resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - 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", "2020-11-20") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get a single workbook template by its resourceName. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2020-11-20 -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the Application Insights component resource. -// - options - WorkbookTemplatesClientGetOptions contains the optional parameters for the WorkbookTemplatesClient.Get method. -func (client *WorkbookTemplatesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *WorkbookTemplatesClientGetOptions) (WorkbookTemplatesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, options) - if err != nil { - return WorkbookTemplatesClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkbookTemplatesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkbookTemplatesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *WorkbookTemplatesClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *WorkbookTemplatesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates/{resourceName}" - 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 resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - 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", "2020-11-20") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *WorkbookTemplatesClient) getHandleResponse(resp *http.Response) (WorkbookTemplatesClientGetResponse, error) { - result := WorkbookTemplatesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WorkbookTemplate); err != nil { - return WorkbookTemplatesClientGetResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Get all Workbook templates defined within a specified resource group. -// -// Generated from API version 2020-11-20 -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - options - WorkbookTemplatesClientListByResourceGroupOptions contains the optional parameters for the WorkbookTemplatesClient.NewListByResourceGroupPager -// method. -func (client *WorkbookTemplatesClient) NewListByResourceGroupPager(resourceGroupName string, options *WorkbookTemplatesClientListByResourceGroupOptions) *runtime.Pager[WorkbookTemplatesClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[WorkbookTemplatesClientListByResourceGroupResponse]{ - More: func(page WorkbookTemplatesClientListByResourceGroupResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *WorkbookTemplatesClientListByResourceGroupResponse) (WorkbookTemplatesClientListByResourceGroupResponse, error) { - req, err := client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - if err != nil { - return WorkbookTemplatesClientListByResourceGroupResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkbookTemplatesClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkbookTemplatesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *WorkbookTemplatesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *WorkbookTemplatesClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates" - 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", "2020-11-20") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *WorkbookTemplatesClient) listByResourceGroupHandleResponse(resp *http.Response) (WorkbookTemplatesClientListByResourceGroupResponse, error) { - result := WorkbookTemplatesClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WorkbookTemplatesListResult); err != nil { - return WorkbookTemplatesClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// Update - Updates a workbook template that has already been added. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2020-11-20 -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the Application Insights component resource. -// - options - WorkbookTemplatesClientUpdateOptions contains the optional parameters for the WorkbookTemplatesClient.Update -// method. -func (client *WorkbookTemplatesClient) Update(ctx context.Context, resourceGroupName string, resourceName string, options *WorkbookTemplatesClientUpdateOptions) (WorkbookTemplatesClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, resourceName, options) - if err != nil { - return WorkbookTemplatesClientUpdateResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkbookTemplatesClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkbookTemplatesClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *WorkbookTemplatesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *WorkbookTemplatesClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates/{resourceName}" - 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 resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - 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", "2020-11-20") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.WorkbookTemplateUpdateParameters != nil { - return req, runtime.MarshalAsJSON(req, *options.WorkbookTemplateUpdateParameters) - } - return req, nil -} - -// updateHandleResponse handles the Update response. -func (client *WorkbookTemplatesClient) updateHandleResponse(resp *http.Response) (WorkbookTemplatesClientUpdateResponse, error) { - result := WorkbookTemplatesClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WorkbookTemplate); err != nil { - return WorkbookTemplatesClientUpdateResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/workbooktemplates_client_example_test.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/workbooktemplates_client_example_test.go deleted file mode 100644 index ac42635fcdf0..000000000000 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/workbooktemplates_client_example_test.go +++ /dev/null @@ -1,298 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armapplicationinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/examples/WorkbookTemplatesList.json -func ExampleWorkbookTemplatesClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armapplicationinsights.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkbookTemplatesClient().NewListByResourceGroupPager("my-resource-group", 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.WorkbookTemplatesListResult = armapplicationinsights.WorkbookTemplatesListResult{ - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/examples/WorkbookTemplateGet.json -func ExampleWorkbookTemplatesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armapplicationinsights.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkbookTemplatesClient().Get(ctx, "my-resource-group", "my-resource-name", 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.WorkbookTemplate = armapplicationinsights.WorkbookTemplate{ - // Name: to.Ptr("my-resource-name"), - // Type: to.Ptr("microsoft.insights/workbooktemplate"), - // ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/microsoft.insights/workbooktemplates/my-resource-name"), - // Location: to.Ptr("westus"), - // Properties: &armapplicationinsights.WorkbookTemplateProperties{ - // Author: to.Ptr("Contoso"), - // Galleries: []*armapplicationinsights.WorkbookTemplateGallery{ - // { - // Name: to.Ptr("Simple Template"), - // Type: to.Ptr("tsg"), - // Category: to.Ptr("Failures"), - // Order: to.Ptr[int32](100), - // ResourceType: to.Ptr("microsoft.insights/components"), - // }}, - // Priority: to.Ptr[int32](1), - // TemplateData: map[string]any{ - // "$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json", - // "items":[]any{ - // map[string]any{ - // "name": "text - 2", - // "type": float64(1), - // "content":map[string]any{ - // "json": "## New workbook\n---\n\nWelcome to your new workbook. This area will display text formatted as markdown.\n\n\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.", - // }, - // }, - // map[string]any{ - // "name": "query - 2", - // "type": float64(3), - // "content":map[string]any{ - // "exportToExcelOptions": "visible", - // "query": "union withsource=TableName *\n| summarize Count=count() by TableName\n| render barchart", - // "queryType": float64(0), - // "resourceType": "microsoft.operationalinsights/workspaces", - // "size": float64(1), - // "version": "KqlItem/1.0", - // }, - // }, - // }, - // "styleSettings":map[string]any{ - // }, - // "version": "Notebook/1.0", - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/examples/WorkbookTemplateDelete.json -func ExampleWorkbookTemplatesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armapplicationinsights.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewWorkbookTemplatesClient().Delete(ctx, "my-resource-group", "my-template-resource", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/examples/WorkbookTemplateAdd.json -func ExampleWorkbookTemplatesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armapplicationinsights.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkbookTemplatesClient().CreateOrUpdate(ctx, "my-resource-group", "testtemplate2", armapplicationinsights.WorkbookTemplate{ - Location: to.Ptr("west us"), - Properties: &armapplicationinsights.WorkbookTemplateProperties{ - Author: to.Ptr("Contoso"), - Galleries: []*armapplicationinsights.WorkbookTemplateGallery{ - { - Name: to.Ptr("Simple Template"), - Type: to.Ptr("tsg"), - Category: to.Ptr("Failures"), - Order: to.Ptr[int32](100), - ResourceType: to.Ptr("microsoft.insights/components"), - }}, - Priority: to.Ptr[int32](1), - TemplateData: map[string]any{ - "$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json", - "items": []any{ - map[string]any{ - "name": "text - 2", - "type": float64(1), - "content": map[string]any{ - "json": "## New workbook\n---\n\nWelcome to your new workbook. This area will display text formatted as markdown.\n\n\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.", - }, - }, - map[string]any{ - "name": "query - 2", - "type": float64(3), - "content": map[string]any{ - "exportToExcelOptions": "visible", - "query": "union withsource=TableName *\n| summarize Count=count() by TableName\n| render barchart", - "queryType": float64(0), - "resourceType": "microsoft.operationalinsights/workspaces", - "size": float64(1), - "version": "KqlItem/1.0", - }, - }, - }, - "styleSettings": map[string]any{}, - "version": "Notebook/1.0", - }, - }, - }, 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.WorkbookTemplate = armapplicationinsights.WorkbookTemplate{ - // Name: to.Ptr("testtemplate2"), - // Type: to.Ptr("microsoft.insights/workbooktemplates"), - // ID: to.Ptr("/subscriptions/50359d91-7b9d-4823-85af-eb298a61ba95/resourceGroups/testrg/providers/microsoft.insights/workbooktemplates/testtemplate2"), - // Location: to.Ptr("westeurope"), - // Properties: &armapplicationinsights.WorkbookTemplateProperties{ - // Author: to.Ptr("Contoso"), - // Galleries: []*armapplicationinsights.WorkbookTemplateGallery{ - // { - // Name: to.Ptr("Simple Template"), - // Type: to.Ptr("tsg"), - // Category: to.Ptr("Failures"), - // Order: to.Ptr[int32](100), - // ResourceType: to.Ptr("microsoft.insights/components"), - // }}, - // Priority: to.Ptr[int32](1), - // TemplateData: map[string]any{ - // "$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json", - // "items":[]any{ - // map[string]any{ - // "name": "text - 2", - // "type": float64(1), - // "content":map[string]any{ - // "json": "## New workbook\n---\n\nWelcome to your new workbook. This area will display text formatted as markdown.\n\n\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.", - // }, - // }, - // map[string]any{ - // "name": "query - 2", - // "type": float64(3), - // "content":map[string]any{ - // "exportToExcelOptions": "visible", - // "query": "union withsource=TableName *\n| summarize Count=count() by TableName\n| render barchart", - // "queryType": float64(0), - // "resourceType": "microsoft.operationalinsights/workspaces", - // "size": float64(1), - // "version": "KqlItem/1.0", - // }, - // }, - // }, - // "styleSettings":map[string]any{ - // }, - // "version": "Notebook/1.0", - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/examples/WorkbookTemplateUpdate.json -func ExampleWorkbookTemplatesClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armapplicationinsights.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkbookTemplatesClient().Update(ctx, "my-resource-group", "my-template-resource", &armapplicationinsights.WorkbookTemplatesClientUpdateOptions{WorkbookTemplateUpdateParameters: 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.WorkbookTemplate = armapplicationinsights.WorkbookTemplate{ - // Name: to.Ptr("testtemplate2"), - // Type: to.Ptr("microsoft.insights/workbooktemplates"), - // ID: to.Ptr("/subscriptions/50359d91-7b9d-4823-85af-eb298a61ba95/resourceGroups/testrg/providers/microsoft.insights/workbooktemplates/testtemplate2"), - // Location: to.Ptr("westeurope"), - // Properties: &armapplicationinsights.WorkbookTemplateProperties{ - // Author: to.Ptr("Contoso"), - // Galleries: []*armapplicationinsights.WorkbookTemplateGallery{ - // { - // Name: to.Ptr("Simple Template"), - // Type: to.Ptr("tsg"), - // Category: to.Ptr("Failures"), - // Order: to.Ptr[int32](100), - // ResourceType: to.Ptr("microsoft.insights/components"), - // }}, - // Priority: to.Ptr[int32](1), - // TemplateData: map[string]any{ - // "$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json", - // "items":[]any{ - // map[string]any{ - // "name": "text - 2", - // "type": float64(1), - // "content":map[string]any{ - // "json": "## New workbook\n---\n\nWelcome to your new workbook. This area will display text formatted as markdown.\n\n\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.", - // }, - // }, - // map[string]any{ - // "name": "query - 2", - // "type": float64(3), - // "content":map[string]any{ - // "exportToExcelOptions": "visible", - // "query": "union withsource=TableName *\n| summarize Count=count() by TableName\n| render barchart", - // "queryType": float64(0), - // "resourceType": "microsoft.operationalinsights/workspaces", - // "size": float64(1), - // "version": "KqlItem/1.0", - // }, - // }, - // }, - // "styleSettings":map[string]any{ - // }, - // "version": "Notebook/1.0", - // }, - // }, - // } -} diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/workitemconfigurations_client_example_test.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/workitemconfigurations_client_example_test.go index 9fab1a2408a3..e79152b8a29d 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/workitemconfigurations_client_example_test.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/workitemconfigurations_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/applicationinsights/armapplicationinsights/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigsGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigsGet.json func ExampleWorkItemConfigurationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -45,7 +45,7 @@ func ExampleWorkItemConfigurationsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigCreate.json func ExampleWorkItemConfigurationsClient_Create() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -75,7 +75,7 @@ func ExampleWorkItemConfigurationsClient_Create() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigDefaultGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigDefaultGet.json func ExampleWorkItemConfigurationsClient_GetDefault() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -102,7 +102,7 @@ func ExampleWorkItemConfigurationsClient_GetDefault() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigDelete.json func ExampleWorkItemConfigurationsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -119,7 +119,7 @@ func ExampleWorkItemConfigurationsClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigGet.json func ExampleWorkItemConfigurationsClient_GetItem() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -146,7 +146,7 @@ func ExampleWorkItemConfigurationsClient_GetItem() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigUpdate.json func ExampleWorkItemConfigurationsClient_UpdateItem() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appplatform/armappplatform/CHANGELOG.md b/sdk/resourcemanager/appplatform/armappplatform/CHANGELOG.md index b3dd2ee2ecbb..a3b5bb71e864 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/CHANGELOG.md +++ b/sdk/resourcemanager/appplatform/armappplatform/CHANGELOG.md @@ -1,428 +1,11 @@ # Release History -## 1.1.0-beta.3 (2023-03-27) +## 1.1.0 (2023-04-06) ### Features Added - New struct `ClientFactory` which is a client factory used to create any client in this module -## 1.1.0-beta.2 (2022-11-09) -### Features Added - -- New const `ApplicationLiveViewProvisioningStateSucceeded` -- New const `CustomizedAcceleratorProvisioningStateFailed` -- New const `CustomizedAcceleratorProvisioningStateDeleting` -- New const `BindingTypeCACertificates` -- New const `CustomizedAcceleratorProvisioningStateCreating` -- New const `PredefinedAcceleratorProvisioningStateSucceeded` -- New const `DevToolPortalFeatureStateEnabled` -- New const `CustomizedAcceleratorValidateResultStateInvalid` -- New const `ApmTypeNewRelic` -- New const `ApplicationAcceleratorProvisioningStateSucceeded` -- New const `GatewayRouteConfigProtocolHTTPS` -- New const `ApmTypeApplicationInsights` -- New const `ApmTypeElasticAPM` -- New const `DevToolPortalFeatureStateDisabled` -- New const `ApplicationLiveViewProvisioningStateCreating` -- New const `BackendProtocolGRPC` -- New const `PredefinedAcceleratorProvisioningStateFailed` -- New const `SessionAffinityCookie` -- New const `DevToolPortalProvisioningStateCanceled` -- New const `DevToolPortalProvisioningStateDeleting` -- New const `ApplicationLiveViewProvisioningStateFailed` -- New const `ApplicationAcceleratorProvisioningStateFailed` -- New const `ApplicationLiveViewProvisioningStateCanceled` -- New const `ApplicationLiveViewProvisioningStateUpdating` -- New const `ApmTypeDynatrace` -- New const `PredefinedAcceleratorStateDisabled` -- New const `ApplicationLiveViewProvisioningStateDeleting` -- New const `DevToolPortalProvisioningStateUpdating` -- New const `GatewayRouteConfigProtocolHTTP` -- New const `PredefinedAcceleratorProvisioningStateCreating` -- New const `ApplicationAcceleratorProvisioningStateCreating` -- New const `ApplicationAcceleratorProvisioningStateUpdating` -- New const `SessionAffinityNone` -- New const `BackendProtocolDefault` -- New const `PredefinedAcceleratorStateEnabled` -- New const `DevToolPortalProvisioningStateCreating` -- New const `PredefinedAcceleratorProvisioningStateUpdating` -- New const `DevToolPortalProvisioningStateFailed` -- New const `CustomizedAcceleratorProvisioningStateSucceeded` -- New const `ApplicationAcceleratorProvisioningStateDeleting` -- New const `CustomizedAcceleratorValidateResultStateValid` -- New const `DevToolPortalProvisioningStateSucceeded` -- New const `ApmTypeAppDynamics` -- New const `CustomizedAcceleratorProvisioningStateUpdating` -- New type alias `ApplicationAcceleratorProvisioningState` -- New type alias `BackendProtocol` -- New type alias `PredefinedAcceleratorState` -- New type alias `CustomizedAcceleratorValidateResultState` -- New type alias `GatewayRouteConfigProtocol` -- New type alias `ApplicationLiveViewProvisioningState` -- New type alias `DevToolPortalFeatureState` -- New type alias `CustomizedAcceleratorProvisioningState` -- New type alias `SessionAffinity` -- New type alias `ApmType` -- New type alias `PredefinedAcceleratorProvisioningState` -- New type alias `DevToolPortalProvisioningState` -- New function `*BuildServiceBuilderClient.ListDeployments(context.Context, string, string, string, string, *BuildServiceBuilderClientListDeploymentsOptions) (BuildServiceBuilderClientListDeploymentsResponse, error)` -- New function `*ApplicationLiveViewsClient.BeginDelete(context.Context, string, string, string, *ApplicationLiveViewsClientBeginDeleteOptions) (*runtime.Poller[ApplicationLiveViewsClientDeleteResponse], error)` -- New function `NewCustomizedAcceleratorsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*CustomizedAcceleratorsClient, error)` -- New function `*PredefinedAcceleratorsClient.BeginEnable(context.Context, string, string, string, string, *PredefinedAcceleratorsClientBeginEnableOptions) (*runtime.Poller[PredefinedAcceleratorsClientEnableResponse], error)` -- New function `*CustomizedAcceleratorsClient.Validate(context.Context, string, string, string, string, CustomizedAcceleratorProperties, *CustomizedAcceleratorsClientValidateOptions) (CustomizedAcceleratorsClientValidateResponse, error)` -- New function `PossibleDevToolPortalFeatureStateValues() []DevToolPortalFeatureState` -- New function `*CustomizedAcceleratorsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, CustomizedAcceleratorResource, *CustomizedAcceleratorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[CustomizedAcceleratorsClientCreateOrUpdateResponse], error)` -- New function `*AcceleratorSSHSetting.GetAcceleratorAuthSetting() *AcceleratorAuthSetting` -- New function `PossibleCustomizedAcceleratorValidateResultStateValues() []CustomizedAcceleratorValidateResultState` -- New function `*DevToolPortalsClient.BeginCreateOrUpdate(context.Context, string, string, string, DevToolPortalResource, *DevToolPortalsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DevToolPortalsClientCreateOrUpdateResponse], error)` -- New function `*DeploymentsClient.BeginDisableRemoteDebugging(context.Context, string, string, string, string, *DeploymentsClientBeginDisableRemoteDebuggingOptions) (*runtime.Poller[DeploymentsClientDisableRemoteDebuggingResponse], error)` -- New function `*DevToolPortalsClient.NewListPager(string, string, *DevToolPortalsClientListOptions) *runtime.Pager[DevToolPortalsClientListResponse]` -- New function `*CustomizedAcceleratorsClient.BeginDelete(context.Context, string, string, string, string, *CustomizedAcceleratorsClientBeginDeleteOptions) (*runtime.Poller[CustomizedAcceleratorsClientDeleteResponse], error)` -- New function `PossibleDevToolPortalProvisioningStateValues() []DevToolPortalProvisioningState` -- New function `*DevToolPortalsClient.BeginDelete(context.Context, string, string, string, *DevToolPortalsClientBeginDeleteOptions) (*runtime.Poller[DevToolPortalsClientDeleteResponse], error)` -- New function `*PredefinedAcceleratorsClient.Get(context.Context, string, string, string, string, *PredefinedAcceleratorsClientGetOptions) (PredefinedAcceleratorsClientGetResponse, error)` -- New function `PossibleApmTypeValues() []ApmType` -- New function `*ApplicationLiveViewsClient.BeginCreateOrUpdate(context.Context, string, string, string, ApplicationLiveViewResource, *ApplicationLiveViewsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ApplicationLiveViewsClientCreateOrUpdateResponse], error)` -- New function `*DevToolPortalsClient.Get(context.Context, string, string, string, *DevToolPortalsClientGetOptions) (DevToolPortalsClientGetResponse, error)` -- New function `*AcceleratorBasicAuthSetting.GetAcceleratorAuthSetting() *AcceleratorAuthSetting` -- New function `*ApplicationLiveViewsClient.NewListPager(string, string, *ApplicationLiveViewsClientListOptions) *runtime.Pager[ApplicationLiveViewsClientListResponse]` -- New function `*ApplicationLiveViewsClient.Get(context.Context, string, string, string, *ApplicationLiveViewsClientGetOptions) (ApplicationLiveViewsClientGetResponse, error)` -- New function `*PredefinedAcceleratorsClient.BeginDisable(context.Context, string, string, string, string, *PredefinedAcceleratorsClientBeginDisableOptions) (*runtime.Poller[PredefinedAcceleratorsClientDisableResponse], error)` -- New function `*DeploymentsClient.GetRemoteDebuggingConfig(context.Context, string, string, string, string, *DeploymentsClientGetRemoteDebuggingConfigOptions) (DeploymentsClientGetRemoteDebuggingConfigResponse, error)` -- New function `PossibleCustomizedAcceleratorProvisioningStateValues() []CustomizedAcceleratorProvisioningState` -- New function `*ApplicationAcceleratorsClient.BeginDelete(context.Context, string, string, string, *ApplicationAcceleratorsClientBeginDeleteOptions) (*runtime.Poller[ApplicationAcceleratorsClientDeleteResponse], error)` -- New function `NewApplicationAcceleratorsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ApplicationAcceleratorsClient, error)` -- New function `PossibleApplicationLiveViewProvisioningStateValues() []ApplicationLiveViewProvisioningState` -- New function `*ApplicationAcceleratorsClient.BeginCreateOrUpdate(context.Context, string, string, string, ApplicationAcceleratorResource, *ApplicationAcceleratorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ApplicationAcceleratorsClientCreateOrUpdateResponse], error)` -- New function `*CustomizedAcceleratorsClient.Get(context.Context, string, string, string, string, *CustomizedAcceleratorsClientGetOptions) (CustomizedAcceleratorsClientGetResponse, error)` -- New function `PossibleBackendProtocolValues() []BackendProtocol` -- New function `*DeploymentsClient.BeginEnableRemoteDebugging(context.Context, string, string, string, string, *DeploymentsClientBeginEnableRemoteDebuggingOptions) (*runtime.Poller[DeploymentsClientEnableRemoteDebuggingResponse], error)` -- New function `PossibleSessionAffinityValues() []SessionAffinity` -- New function `*ApplicationAcceleratorsClient.Get(context.Context, string, string, string, *ApplicationAcceleratorsClientGetOptions) (ApplicationAcceleratorsClientGetResponse, error)` -- New function `*GatewaysClient.ListEnvSecrets(context.Context, string, string, string, *GatewaysClientListEnvSecretsOptions) (GatewaysClientListEnvSecretsResponse, error)` -- New function `*AcceleratorPublicSetting.GetAcceleratorAuthSetting() *AcceleratorAuthSetting` -- New function `*PredefinedAcceleratorsClient.NewListPager(string, string, string, *PredefinedAcceleratorsClientListOptions) *runtime.Pager[PredefinedAcceleratorsClientListResponse]` -- New function `PossiblePredefinedAcceleratorProvisioningStateValues() []PredefinedAcceleratorProvisioningState` -- New function `*CustomizedAcceleratorsClient.NewListPager(string, string, string, *CustomizedAcceleratorsClientListOptions) *runtime.Pager[CustomizedAcceleratorsClientListResponse]` -- New function `NewPredefinedAcceleratorsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*PredefinedAcceleratorsClient, error)` -- New function `PossibleApplicationAcceleratorProvisioningStateValues() []ApplicationAcceleratorProvisioningState` -- New function `PossibleGatewayRouteConfigProtocolValues() []GatewayRouteConfigProtocol` -- New function `NewApplicationLiveViewsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ApplicationLiveViewsClient, error)` -- New function `NewDevToolPortalsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DevToolPortalsClient, error)` -- New function `PossiblePredefinedAcceleratorStateValues() []PredefinedAcceleratorState` -- New function `*AcceleratorAuthSetting.GetAcceleratorAuthSetting() *AcceleratorAuthSetting` -- New function `*ApplicationAcceleratorsClient.NewListPager(string, string, *ApplicationAcceleratorsClientListOptions) *runtime.Pager[ApplicationAcceleratorsClientListResponse]` -- New struct `AcceleratorAuthSetting` -- New struct `AcceleratorBasicAuthSetting` -- New struct `AcceleratorGitRepository` -- New struct `AcceleratorPublicSetting` -- New struct `AcceleratorSSHSetting` -- New struct `ApplicationAcceleratorComponent` -- New struct `ApplicationAcceleratorInstance` -- New struct `ApplicationAcceleratorProperties` -- New struct `ApplicationAcceleratorResource` -- New struct `ApplicationAcceleratorResourceCollection` -- New struct `ApplicationAcceleratorResourceRequests` -- New struct `ApplicationAcceleratorsClient` -- New struct `ApplicationAcceleratorsClientBeginCreateOrUpdateOptions` -- New struct `ApplicationAcceleratorsClientBeginDeleteOptions` -- New struct `ApplicationAcceleratorsClientCreateOrUpdateResponse` -- New struct `ApplicationAcceleratorsClientDeleteResponse` -- New struct `ApplicationAcceleratorsClientGetOptions` -- New struct `ApplicationAcceleratorsClientGetResponse` -- New struct `ApplicationAcceleratorsClientListOptions` -- New struct `ApplicationAcceleratorsClientListResponse` -- New struct `ApplicationLiveViewComponent` -- New struct `ApplicationLiveViewInstance` -- New struct `ApplicationLiveViewProperties` -- New struct `ApplicationLiveViewResource` -- New struct `ApplicationLiveViewResourceCollection` -- New struct `ApplicationLiveViewResourceRequests` -- New struct `ApplicationLiveViewsClient` -- New struct `ApplicationLiveViewsClientBeginCreateOrUpdateOptions` -- New struct `ApplicationLiveViewsClientBeginDeleteOptions` -- New struct `ApplicationLiveViewsClientCreateOrUpdateResponse` -- New struct `ApplicationLiveViewsClientDeleteResponse` -- New struct `ApplicationLiveViewsClientGetOptions` -- New struct `ApplicationLiveViewsClientGetResponse` -- New struct `ApplicationLiveViewsClientListOptions` -- New struct `ApplicationLiveViewsClientListResponse` -- New struct `BuildServiceBuilderClientListDeploymentsOptions` -- New struct `BuildServiceBuilderClientListDeploymentsResponse` -- New struct `CustomizedAcceleratorProperties` -- New struct `CustomizedAcceleratorResource` -- New struct `CustomizedAcceleratorResourceCollection` -- New struct `CustomizedAcceleratorValidateResult` -- New struct `CustomizedAcceleratorsClient` -- New struct `CustomizedAcceleratorsClientBeginCreateOrUpdateOptions` -- New struct `CustomizedAcceleratorsClientBeginDeleteOptions` -- New struct `CustomizedAcceleratorsClientCreateOrUpdateResponse` -- New struct `CustomizedAcceleratorsClientDeleteResponse` -- New struct `CustomizedAcceleratorsClientGetOptions` -- New struct `CustomizedAcceleratorsClientGetResponse` -- New struct `CustomizedAcceleratorsClientListOptions` -- New struct `CustomizedAcceleratorsClientListResponse` -- New struct `CustomizedAcceleratorsClientValidateOptions` -- New struct `CustomizedAcceleratorsClientValidateResponse` -- New struct `DeploymentList` -- New struct `DeploymentsClientBeginDisableRemoteDebuggingOptions` -- New struct `DeploymentsClientBeginEnableRemoteDebuggingOptions` -- New struct `DeploymentsClientDisableRemoteDebuggingResponse` -- New struct `DeploymentsClientEnableRemoteDebuggingResponse` -- New struct `DeploymentsClientGetRemoteDebuggingConfigOptions` -- New struct `DeploymentsClientGetRemoteDebuggingConfigResponse` -- New struct `DevToolPortalFeatureDetail` -- New struct `DevToolPortalFeatureSettings` -- New struct `DevToolPortalInstance` -- New struct `DevToolPortalProperties` -- New struct `DevToolPortalResource` -- New struct `DevToolPortalResourceCollection` -- New struct `DevToolPortalResourceRequests` -- New struct `DevToolPortalSsoProperties` -- New struct `DevToolPortalsClient` -- New struct `DevToolPortalsClientBeginCreateOrUpdateOptions` -- New struct `DevToolPortalsClientBeginDeleteOptions` -- New struct `DevToolPortalsClientCreateOrUpdateResponse` -- New struct `DevToolPortalsClientDeleteResponse` -- New struct `DevToolPortalsClientGetOptions` -- New struct `DevToolPortalsClientGetResponse` -- New struct `DevToolPortalsClientListOptions` -- New struct `DevToolPortalsClientListResponse` -- New struct `GatewayPropertiesEnvironmentVariables` -- New struct `GatewaysClientListEnvSecretsOptions` -- New struct `GatewaysClientListEnvSecretsResponse` -- New struct `IngressSettings` -- New struct `IngressSettingsClientAuth` -- New struct `PredefinedAcceleratorProperties` -- New struct `PredefinedAcceleratorResource` -- New struct `PredefinedAcceleratorResourceCollection` -- New struct `PredefinedAcceleratorsClient` -- New struct `PredefinedAcceleratorsClientBeginDisableOptions` -- New struct `PredefinedAcceleratorsClientBeginEnableOptions` -- New struct `PredefinedAcceleratorsClientDisableResponse` -- New struct `PredefinedAcceleratorsClientEnableResponse` -- New struct `PredefinedAcceleratorsClientGetOptions` -- New struct `PredefinedAcceleratorsClientGetResponse` -- New struct `PredefinedAcceleratorsClientListOptions` -- New struct `PredefinedAcceleratorsClientListResponse` -- New struct `RemoteDebugging` -- New struct `RemoteDebuggingPayload` -- New field `IngressSettings` in struct `AppResourceProperties` -- New field `Filters` in struct `GatewayRouteConfigProperties` -- New field `Predicates` in struct `GatewayRouteConfigProperties` -- New field `Protocol` in struct `GatewayRouteConfigProperties` -- New field `SsoEnabled` in struct `GatewayRouteConfigProperties` -- New field `Reason` in struct `BuildStageProperties` -- New field `ExitCode` in struct `BuildStageProperties` -- New field `ApmTypes` in struct `GatewayProperties` -- New field `EnvironmentVariables` in struct `GatewayProperties` -- New field `Error` in struct `BuildResultProperties` -- New field `OutboundType` in struct `NetworkProfile` - - -## 1.1.0-beta.1 (2022-05-19) -### Features Added - -- New const `ProbeActionTypeTCPSocketAction` -- New const `APIPortalProvisioningStateSucceeded` -- New const `CertificateResourceProvisioningStateFailed` -- New const `CertificateResourceProvisioningStateDeleting` -- New const `StorageTypeStorageAccount` -- New const `APIPortalProvisioningStateCreating` -- New const `GatewayProvisioningStateSucceeded` -- New const `CustomDomainResourceProvisioningStateFailed` -- New const `CustomDomainResourceProvisioningStateSucceeded` -- New const `APIPortalProvisioningStateUpdating` -- New const `CustomDomainResourceProvisioningStateCreating` -- New const `PowerStateStopped` -- New const `PowerStateRunning` -- New const `CertificateResourceProvisioningStateCreating` -- New const `GatewayProvisioningStateFailed` -- New const `TypeAzureFileVolume` -- New const `ProbeActionTypeHTTPGetAction` -- New const `CertificateResourceProvisioningStateSucceeded` -- New const `GatewayProvisioningStateUpdating` -- New const `CertificateResourceProvisioningStateUpdating` -- New const `GatewayProvisioningStateDeleting` -- New const `GatewayProvisioningStateCreating` -- New const `HTTPSchemeTypeHTTPS` -- New const `HTTPSchemeTypeHTTP` -- New const `ProbeActionTypeExecAction` -- New const `APIPortalProvisioningStateDeleting` -- New const `APIPortalProvisioningStateFailed` -- New const `CustomDomainResourceProvisioningStateDeleting` -- New const `CustomDomainResourceProvisioningStateUpdating` -- New function `*StorageAccount.GetStorageProperties() *StorageProperties` -- New function `PossiblePowerStateValues() []PowerState` -- New function `*TCPSocketAction.GetProbeAction() *ProbeAction` -- New function `StorageAccount.MarshalJSON() ([]byte, error)` -- New function `AzureFileVolume.MarshalJSON() ([]byte, error)` -- New function `*StorageProperties.GetStorageProperties() *StorageProperties` -- New function `GatewayAPIRoute.MarshalJSON() ([]byte, error)` -- New function `ExecAction.MarshalJSON() ([]byte, error)` -- New function `StorageResource.MarshalJSON() ([]byte, error)` -- New function `*AzureFileVolume.GetCustomPersistentDiskProperties() *CustomPersistentDiskProperties` -- New function `*ProbeAction.GetProbeAction() *ProbeAction` -- New function `PossibleStorageTypeValues() []StorageType` -- New function `PossibleCertificateResourceProvisioningStateValues() []CertificateResourceProvisioningState` -- New function `PossibleGatewayProvisioningStateValues() []GatewayProvisioningState` -- New function `Probe.MarshalJSON() ([]byte, error)` -- New function `*ExecAction.UnmarshalJSON([]byte) error` -- New function `TCPSocketAction.MarshalJSON() ([]byte, error)` -- New function `*StorageAccount.UnmarshalJSON([]byte) error` -- New function `GatewayCorsProperties.MarshalJSON() ([]byte, error)` -- New function `PossibleTypeValues() []Type` -- New function `ManagedIdentityProperties.MarshalJSON() ([]byte, error)` -- New function `PossibleAPIPortalProvisioningStateValues() []APIPortalProvisioningState` -- New function `*TCPSocketAction.UnmarshalJSON([]byte) error` -- New function `PossibleProbeActionTypeValues() []ProbeActionType` -- New function `*CustomContainerUserSourceInfo.GetUserSourceInfo() *UserSourceInfo` -- New function `*ServicesClient.BeginStart(context.Context, string, string, *ServicesClientBeginStartOptions) (*runtime.Poller[ServicesClientStartResponse], error)` -- New function `SsoProperties.MarshalJSON() ([]byte, error)` -- New function `*CustomContainerUserSourceInfo.UnmarshalJSON([]byte) error` -- New function `CustomContainer.MarshalJSON() ([]byte, error)` -- New function `*CustomPersistentDiskProperties.GetCustomPersistentDiskProperties() *CustomPersistentDiskProperties` -- New function `GatewayRouteConfigProperties.MarshalJSON() ([]byte, error)` -- New function `CustomPersistentDiskResource.MarshalJSON() ([]byte, error)` -- New function `*StorageResource.UnmarshalJSON([]byte) error` -- New function `CustomPersistentDiskProperties.MarshalJSON() ([]byte, error)` -- New function `PossibleCustomDomainResourceProvisioningStateValues() []CustomDomainResourceProvisioningState` -- New function `CustomContainerUserSourceInfo.MarshalJSON() ([]byte, error)` -- New function `*HTTPGetAction.GetProbeAction() *ProbeAction` -- New function `*Probe.UnmarshalJSON([]byte) error` -- New function `*CustomPersistentDiskResource.UnmarshalJSON([]byte) error` -- New function `*ExecAction.GetProbeAction() *ProbeAction` -- New function `GatewayProperties.MarshalJSON() ([]byte, error)` -- New function `*AzureFileVolume.UnmarshalJSON([]byte) error` -- New function `*ServicesClient.BeginStop(context.Context, string, string, *ServicesClientBeginStopOptions) (*runtime.Poller[ServicesClientStopResponse], error)` -- New function `GatewayOperatorProperties.MarshalJSON() ([]byte, error)` -- New function `*HTTPGetAction.UnmarshalJSON([]byte) error` -- New function `HTTPGetAction.MarshalJSON() ([]byte, error)` -- New function `PossibleHTTPSchemeTypeValues() []HTTPSchemeType` -- New function `APIPortalProperties.MarshalJSON() ([]byte, error)` -- New struct `APIPortalCustomDomainProperties` -- New struct `APIPortalCustomDomainResource` -- New struct `APIPortalCustomDomainResourceCollection` -- New struct `APIPortalCustomDomainsClientBeginCreateOrUpdateOptions` -- New struct `APIPortalCustomDomainsClientBeginDeleteOptions` -- New struct `APIPortalCustomDomainsClientCreateOrUpdateResponse` -- New struct `APIPortalCustomDomainsClientDeleteResponse` -- New struct `APIPortalCustomDomainsClientGetOptions` -- New struct `APIPortalCustomDomainsClientGetResponse` -- New struct `APIPortalCustomDomainsClientListOptions` -- New struct `APIPortalCustomDomainsClientListResponse` -- New struct `APIPortalInstance` -- New struct `APIPortalProperties` -- New struct `APIPortalResource` -- New struct `APIPortalResourceCollection` -- New struct `APIPortalResourceRequests` -- New struct `APIPortalsClientBeginCreateOrUpdateOptions` -- New struct `APIPortalsClientBeginDeleteOptions` -- New struct `APIPortalsClientCreateOrUpdateResponse` -- New struct `APIPortalsClientDeleteResponse` -- New struct `APIPortalsClientGetOptions` -- New struct `APIPortalsClientGetResponse` -- New struct `APIPortalsClientListOptions` -- New struct `APIPortalsClientListResponse` -- New struct `APIPortalsClientValidateDomainOptions` -- New struct `APIPortalsClientValidateDomainResponse` -- New struct `AppVNetAddons` -- New struct `AzureFileVolume` -- New struct `BuildResourceRequests` -- New struct `ContainerProbeSettings` -- New struct `CustomContainer` -- New struct `CustomContainerUserSourceInfo` -- New struct `CustomPersistentDiskProperties` -- New struct `CustomPersistentDiskResource` -- New struct `ExecAction` -- New struct `GatewayAPIMetadataProperties` -- New struct `GatewayAPIRoute` -- New struct `GatewayCorsProperties` -- New struct `GatewayCustomDomainProperties` -- New struct `GatewayCustomDomainResource` -- New struct `GatewayCustomDomainResourceCollection` -- New struct `GatewayCustomDomainsClientBeginCreateOrUpdateOptions` -- New struct `GatewayCustomDomainsClientBeginDeleteOptions` -- New struct `GatewayCustomDomainsClientCreateOrUpdateResponse` -- New struct `GatewayCustomDomainsClientDeleteResponse` -- New struct `GatewayCustomDomainsClientGetOptions` -- New struct `GatewayCustomDomainsClientGetResponse` -- New struct `GatewayCustomDomainsClientListOptions` -- New struct `GatewayCustomDomainsClientListResponse` -- New struct `GatewayInstance` -- New struct `GatewayOperatorProperties` -- New struct `GatewayOperatorResourceRequests` -- New struct `GatewayProperties` -- New struct `GatewayResource` -- New struct `GatewayResourceCollection` -- New struct `GatewayResourceRequests` -- New struct `GatewayRouteConfigOpenAPIProperties` -- New struct `GatewayRouteConfigProperties` -- New struct `GatewayRouteConfigResource` -- New struct `GatewayRouteConfigResourceCollection` -- New struct `GatewayRouteConfigsClientBeginCreateOrUpdateOptions` -- New struct `GatewayRouteConfigsClientBeginDeleteOptions` -- New struct `GatewayRouteConfigsClientCreateOrUpdateResponse` -- New struct `GatewayRouteConfigsClientDeleteResponse` -- New struct `GatewayRouteConfigsClientGetOptions` -- New struct `GatewayRouteConfigsClientGetResponse` -- New struct `GatewayRouteConfigsClientListOptions` -- New struct `GatewayRouteConfigsClientListResponse` -- New struct `GatewaysClientBeginCreateOrUpdateOptions` -- New struct `GatewaysClientBeginDeleteOptions` -- New struct `GatewaysClientCreateOrUpdateResponse` -- New struct `GatewaysClientDeleteResponse` -- New struct `GatewaysClientGetOptions` -- New struct `GatewaysClientGetResponse` -- New struct `GatewaysClientListOptions` -- New struct `GatewaysClientListResponse` -- New struct `GatewaysClientValidateDomainOptions` -- New struct `GatewaysClientValidateDomainResponse` -- New struct `HTTPGetAction` -- New struct `ImageRegistryCredential` -- New struct `IngressConfig` -- New struct `MarketplaceResource` -- New struct `Probe` -- New struct `ProbeAction` -- New struct `ServiceVNetAddons` -- New struct `ServicesClientBeginStartOptions` -- New struct `ServicesClientBeginStopOptions` -- New struct `ServicesClientStartResponse` -- New struct `ServicesClientStopResponse` -- New struct `SsoProperties` -- New struct `StorageAccount` -- New struct `StorageProperties` -- New struct `StorageResource` -- New struct `StorageResourceCollection` -- New struct `StoragesClientBeginCreateOrUpdateOptions` -- New struct `StoragesClientBeginDeleteOptions` -- New struct `StoragesClientCreateOrUpdateResponse` -- New struct `StoragesClientDeleteResponse` -- New struct `StoragesClientGetOptions` -- New struct `StoragesClientGetResponse` -- New struct `StoragesClientListOptions` -- New struct `StoragesClientListResponse` -- New struct `TCPSocketAction` -- New struct `UserAssignedManagedIdentity` -- New field `ProvisioningState` in struct `KeyVaultCertificateProperties` -- New field `ProvisioningState` in struct `CertificateProperties` -- New field `IngressConfig` in struct `NetworkProfile` -- New field `LivenessProbe` in struct `DeploymentSettings` -- New field `ReadinessProbe` in struct `DeploymentSettings` -- New field `StartupProbe` in struct `DeploymentSettings` -- New field `TerminationGracePeriodSeconds` in struct `DeploymentSettings` -- New field `ContainerProbeSettings` in struct `DeploymentSettings` -- New field `ResourceRequests` in struct `BuildProperties` -- New field `ProvisioningState` in struct `CustomDomainProperties` -- New field `MarketplaceResource` in struct `ClusterResourceProperties` -- New field `VnetAddons` in struct `ClusterResourceProperties` -- New field `PowerState` in struct `ClusterResourceProperties` -- New field `UserAssignedIdentities` in struct `ManagedIdentityProperties` -- New field `ProvisioningState` in struct `ContentCertificateProperties` -- New field `CustomPersistentDisks` in struct `AppResourceProperties` -- New field `VnetAddons` in struct `AppResourceProperties` - - ## 1.0.0 (2022-05-17) The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. diff --git a/sdk/resourcemanager/appplatform/armappplatform/apiportalcustomdomains_client.go b/sdk/resourcemanager/appplatform/armappplatform/apiportalcustomdomains_client.go deleted file mode 100644 index b981e60734fe..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/apiportalcustomdomains_client.go +++ /dev/null @@ -1,344 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappplatform - -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" -) - -// APIPortalCustomDomainsClient contains the methods for the APIPortalCustomDomains group. -// Don't use this type directly, use NewAPIPortalCustomDomainsClient() instead. -type APIPortalCustomDomainsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewAPIPortalCustomDomainsClient creates a new instance of APIPortalCustomDomainsClient with the specified values. -// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewAPIPortalCustomDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIPortalCustomDomainsClient, error) { - cl, err := arm.NewClient(moduleName+".APIPortalCustomDomainsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &APIPortalCustomDomainsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create or update the API portal custom domain. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - apiPortalName - The name of API portal. -// - domainName - The name of the API portal custom domain. -// - apiPortalCustomDomainResource - The API portal custom domain for the create or update operation -// - options - APIPortalCustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the APIPortalCustomDomainsClient.BeginCreateOrUpdate -// method. -func (client *APIPortalCustomDomainsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, apiPortalCustomDomainResource APIPortalCustomDomainResource, options *APIPortalCustomDomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[APIPortalCustomDomainsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, apiPortalName, domainName, apiPortalCustomDomainResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[APIPortalCustomDomainsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[APIPortalCustomDomainsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// CreateOrUpdate - Create or update the API portal custom domain. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *APIPortalCustomDomainsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, apiPortalCustomDomainResource APIPortalCustomDomainResource, options *APIPortalCustomDomainsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, domainName, apiPortalCustomDomainResource, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *APIPortalCustomDomainsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, apiPortalCustomDomainResource APIPortalCustomDomainResource, options *APIPortalCustomDomainsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains/{domainName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if apiPortalName == "" { - return nil, errors.New("parameter apiPortalName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{apiPortalName}", url.PathEscape(apiPortalName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, apiPortalCustomDomainResource) -} - -// BeginDelete - Delete the API portal custom domain. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - apiPortalName - The name of API portal. -// - domainName - The name of the API portal custom domain. -// - options - APIPortalCustomDomainsClientBeginDeleteOptions contains the optional parameters for the APIPortalCustomDomainsClient.BeginDelete -// method. -func (client *APIPortalCustomDomainsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, options *APIPortalCustomDomainsClientBeginDeleteOptions) (*runtime.Poller[APIPortalCustomDomainsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, apiPortalName, domainName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[APIPortalCustomDomainsClientDeleteResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[APIPortalCustomDomainsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Delete - Delete the API portal custom domain. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *APIPortalCustomDomainsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, options *APIPortalCustomDomainsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, domainName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *APIPortalCustomDomainsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, options *APIPortalCustomDomainsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains/{domainName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if apiPortalName == "" { - return nil, errors.New("parameter apiPortalName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{apiPortalName}", url.PathEscape(apiPortalName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the API portal custom domain. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - apiPortalName - The name of API portal. -// - domainName - The name of the API portal custom domain. -// - options - APIPortalCustomDomainsClientGetOptions contains the optional parameters for the APIPortalCustomDomainsClient.Get -// method. -func (client *APIPortalCustomDomainsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, options *APIPortalCustomDomainsClientGetOptions) (APIPortalCustomDomainsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, domainName, options) - if err != nil { - return APIPortalCustomDomainsClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return APIPortalCustomDomainsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIPortalCustomDomainsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *APIPortalCustomDomainsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, options *APIPortalCustomDomainsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains/{domainName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if apiPortalName == "" { - return nil, errors.New("parameter apiPortalName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{apiPortalName}", url.PathEscape(apiPortalName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - 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", "2022-11-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 *APIPortalCustomDomainsClient) getHandleResponse(resp *http.Response) (APIPortalCustomDomainsClientGetResponse, error) { - result := APIPortalCustomDomainsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.APIPortalCustomDomainResource); err != nil { - return APIPortalCustomDomainsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Handle requests to list all API portal custom domains. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - apiPortalName - The name of API portal. -// - options - APIPortalCustomDomainsClientListOptions contains the optional parameters for the APIPortalCustomDomainsClient.NewListPager -// method. -func (client *APIPortalCustomDomainsClient) NewListPager(resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalCustomDomainsClientListOptions) *runtime.Pager[APIPortalCustomDomainsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[APIPortalCustomDomainsClientListResponse]{ - More: func(page APIPortalCustomDomainsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *APIPortalCustomDomainsClientListResponse) (APIPortalCustomDomainsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return APIPortalCustomDomainsClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return APIPortalCustomDomainsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIPortalCustomDomainsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *APIPortalCustomDomainsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalCustomDomainsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if apiPortalName == "" { - return nil, errors.New("parameter apiPortalName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{apiPortalName}", url.PathEscape(apiPortalName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *APIPortalCustomDomainsClient) listHandleResponse(resp *http.Response) (APIPortalCustomDomainsClientListResponse, error) { - result := APIPortalCustomDomainsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.APIPortalCustomDomainResourceCollection); err != nil { - return APIPortalCustomDomainsClientListResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/apiportalcustomdomains_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/apiportalcustomdomains_client_example_test.go deleted file mode 100644 index 029c613bc4a1..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/apiportalcustomdomains_client_example_test.go +++ /dev/null @@ -1,164 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApiPortalCustomDomains_Get.json -func ExampleAPIPortalCustomDomainsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAPIPortalCustomDomainsClient().Get(ctx, "myResourceGroup", "myservice", "default", "myDomainName", 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.APIPortalCustomDomainResource = armappplatform.APIPortalCustomDomainResource{ - // Name: to.Ptr("myDomainName"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/apiPortals/domains"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apiPortals/default/domains/myDomainName"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.APIPortalCustomDomainProperties{ - // Thumbprint: to.Ptr("*"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApiPortalCustomDomains_CreateOrUpdate.json -func ExampleAPIPortalCustomDomainsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAPIPortalCustomDomainsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", "myDomainName", armappplatform.APIPortalCustomDomainResource{ - Properties: &armappplatform.APIPortalCustomDomainProperties{ - Thumbprint: to.Ptr("*"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.APIPortalCustomDomainResource = armappplatform.APIPortalCustomDomainResource{ - // Name: to.Ptr("myDomainName"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/apiPortals/domains"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apiPortals/default/domains/myDomainName"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.APIPortalCustomDomainProperties{ - // Thumbprint: to.Ptr("*"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApiPortalCustomDomains_Delete.json -func ExampleAPIPortalCustomDomainsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAPIPortalCustomDomainsClient().BeginDelete(ctx, "myResourceGroup", "myservice", "default", "myDomainName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApiPortalCustomDomains_List.json -func ExampleAPIPortalCustomDomainsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewAPIPortalCustomDomainsClient().NewListPager("myResourceGroup", "myservice", "default", 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.APIPortalCustomDomainResourceCollection = armappplatform.APIPortalCustomDomainResourceCollection{ - // Value: []*armappplatform.APIPortalCustomDomainResource{ - // { - // Name: to.Ptr("myDomain"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/apiPortals/domains"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apiPortals/default/domains/myDomain"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.APIPortalCustomDomainProperties{ - // Thumbprint: to.Ptr("*"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/apiportals_client.go b/sdk/resourcemanager/appplatform/armappplatform/apiportals_client.go deleted file mode 100644 index 9665b4e84834..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/apiportals_client.go +++ /dev/null @@ -1,386 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappplatform - -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" -) - -// APIPortalsClient contains the methods for the APIPortals group. -// Don't use this type directly, use NewAPIPortalsClient() instead. -type APIPortalsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewAPIPortalsClient creates a new instance of APIPortalsClient with the specified values. -// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewAPIPortalsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIPortalsClient, error) { - cl, err := arm.NewClient(moduleName+".APIPortalsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &APIPortalsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create the default API portal or update the existing API portal. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - apiPortalName - The name of API portal. -// - apiPortalResource - The API portal for the create or update operation -// - options - APIPortalsClientBeginCreateOrUpdateOptions contains the optional parameters for the APIPortalsClient.BeginCreateOrUpdate -// method. -func (client *APIPortalsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, apiPortalResource APIPortalResource, options *APIPortalsClientBeginCreateOrUpdateOptions) (*runtime.Poller[APIPortalsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, apiPortalName, apiPortalResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[APIPortalsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[APIPortalsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// CreateOrUpdate - Create the default API portal or update the existing API portal. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *APIPortalsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, apiPortalResource APIPortalResource, options *APIPortalsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, apiPortalResource, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *APIPortalsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, apiPortalResource APIPortalResource, options *APIPortalsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if apiPortalName == "" { - return nil, errors.New("parameter apiPortalName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{apiPortalName}", url.PathEscape(apiPortalName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, apiPortalResource) -} - -// BeginDelete - Delete the default API portal. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - apiPortalName - The name of API portal. -// - options - APIPortalsClientBeginDeleteOptions contains the optional parameters for the APIPortalsClient.BeginDelete method. -func (client *APIPortalsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalsClientBeginDeleteOptions) (*runtime.Poller[APIPortalsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, apiPortalName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[APIPortalsClientDeleteResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[APIPortalsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Delete - Delete the default API portal. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *APIPortalsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *APIPortalsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if apiPortalName == "" { - return nil, errors.New("parameter apiPortalName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{apiPortalName}", url.PathEscape(apiPortalName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the API portal and its properties. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - apiPortalName - The name of API portal. -// - options - APIPortalsClientGetOptions contains the optional parameters for the APIPortalsClient.Get method. -func (client *APIPortalsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalsClientGetOptions) (APIPortalsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, options) - if err != nil { - return APIPortalsClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return APIPortalsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIPortalsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *APIPortalsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if apiPortalName == "" { - return nil, errors.New("parameter apiPortalName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{apiPortalName}", url.PathEscape(apiPortalName)) - 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", "2022-11-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 *APIPortalsClient) getHandleResponse(resp *http.Response) (APIPortalsClientGetResponse, error) { - result := APIPortalsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.APIPortalResource); err != nil { - return APIPortalsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Handles requests to list all resources in a Service. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - options - APIPortalsClientListOptions contains the optional parameters for the APIPortalsClient.NewListPager method. -func (client *APIPortalsClient) NewListPager(resourceGroupName string, serviceName string, options *APIPortalsClientListOptions) *runtime.Pager[APIPortalsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[APIPortalsClientListResponse]{ - More: func(page APIPortalsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *APIPortalsClientListResponse) (APIPortalsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return APIPortalsClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return APIPortalsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIPortalsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *APIPortalsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *APIPortalsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *APIPortalsClient) listHandleResponse(resp *http.Response) (APIPortalsClientListResponse, error) { - result := APIPortalsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.APIPortalResourceCollection); err != nil { - return APIPortalsClientListResponse{}, err - } - return result, nil -} - -// ValidateDomain - Check the domains are valid as well as not in use. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - apiPortalName - The name of API portal. -// - validatePayload - Custom domain payload to be validated -// - options - APIPortalsClientValidateDomainOptions contains the optional parameters for the APIPortalsClient.ValidateDomain -// method. -func (client *APIPortalsClient) ValidateDomain(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, validatePayload CustomDomainValidatePayload, options *APIPortalsClientValidateDomainOptions) (APIPortalsClientValidateDomainResponse, error) { - req, err := client.validateDomainCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, validatePayload, options) - if err != nil { - return APIPortalsClientValidateDomainResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return APIPortalsClientValidateDomainResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIPortalsClientValidateDomainResponse{}, runtime.NewResponseError(resp) - } - return client.validateDomainHandleResponse(resp) -} - -// validateDomainCreateRequest creates the ValidateDomain request. -func (client *APIPortalsClient) validateDomainCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, validatePayload CustomDomainValidatePayload, options *APIPortalsClientValidateDomainOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/validateDomain" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if apiPortalName == "" { - return nil, errors.New("parameter apiPortalName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{apiPortalName}", url.PathEscape(apiPortalName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, validatePayload) -} - -// validateDomainHandleResponse handles the ValidateDomain response. -func (client *APIPortalsClient) validateDomainHandleResponse(resp *http.Response) (APIPortalsClientValidateDomainResponse, error) { - result := APIPortalsClientValidateDomainResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CustomDomainValidateResult); err != nil { - return APIPortalsClientValidateDomainResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/apiportals_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/apiportals_client_example_test.go deleted file mode 100644 index 20013ddc6fc9..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/apiportals_client_example_test.go +++ /dev/null @@ -1,263 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApiPortals_Get.json -func ExampleAPIPortalsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAPIPortalsClient().Get(ctx, "myResourceGroup", "myservice", "default", 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.APIPortalResource = armappplatform.APIPortalResource{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/apiPortals"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apiPortals/default"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.APIPortalProperties{ - // GatewayIDs: []*string{ - // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/gateways/default")}, - // Instances: []*armappplatform.APIPortalInstance{ - // { - // Name: to.Ptr("instance1"), - // Status: to.Ptr("Running"), - // }, - // { - // Name: to.Ptr("instance2"), - // Status: to.Ptr("Running"), - // }}, - // ProvisioningState: to.Ptr(armappplatform.APIPortalProvisioningStateSucceeded), - // Public: to.Ptr(true), - // ResourceRequests: &armappplatform.APIPortalResourceRequests{ - // CPU: to.Ptr("1"), - // Memory: to.Ptr("1G"), - // }, - // URL: to.Ptr("test-url"), - // }, - // SKU: &armappplatform.SKU{ - // Name: to.Ptr("E0"), - // Capacity: to.Ptr[int32](2), - // Tier: to.Ptr("Enterprise"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApiPortals_CreateOrUpdate.json -func ExampleAPIPortalsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAPIPortalsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", armappplatform.APIPortalResource{ - Properties: &armappplatform.APIPortalProperties{ - GatewayIDs: []*string{ - to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/gateways/default")}, - Public: to.Ptr(true), - }, - SKU: &armappplatform.SKU{ - Name: to.Ptr("E0"), - Capacity: to.Ptr[int32](2), - Tier: to.Ptr("Enterprise"), - }, - }, 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.APIPortalResource = armappplatform.APIPortalResource{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/apiPortals"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apiPortals/default"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.APIPortalProperties{ - // GatewayIDs: []*string{ - // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/gateways/default")}, - // Instances: []*armappplatform.APIPortalInstance{ - // { - // Name: to.Ptr("instance1"), - // Status: to.Ptr("Running"), - // }, - // { - // Name: to.Ptr("instance2"), - // Status: to.Ptr("Running"), - // }}, - // ProvisioningState: to.Ptr(armappplatform.APIPortalProvisioningStateSucceeded), - // Public: to.Ptr(true), - // ResourceRequests: &armappplatform.APIPortalResourceRequests{ - // CPU: to.Ptr("1"), - // Memory: to.Ptr("1G"), - // }, - // URL: to.Ptr("test-url"), - // }, - // SKU: &armappplatform.SKU{ - // Name: to.Ptr("E0"), - // Capacity: to.Ptr[int32](2), - // Tier: to.Ptr("Enterprise"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApiPortals_Delete.json -func ExampleAPIPortalsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAPIPortalsClient().BeginDelete(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApiPortals_List.json -func ExampleAPIPortalsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewAPIPortalsClient().NewListPager("myResourceGroup", "myservice", 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.APIPortalResourceCollection = armappplatform.APIPortalResourceCollection{ - // Value: []*armappplatform.APIPortalResource{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/apiPortals"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apiPortals/default"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.APIPortalProperties{ - // GatewayIDs: []*string{ - // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/gateways/default")}, - // Instances: []*armappplatform.APIPortalInstance{ - // { - // Name: to.Ptr("instance1"), - // Status: to.Ptr("Running"), - // }, - // { - // Name: to.Ptr("instance2"), - // Status: to.Ptr("Running"), - // }}, - // ProvisioningState: to.Ptr(armappplatform.APIPortalProvisioningStateSucceeded), - // Public: to.Ptr(true), - // ResourceRequests: &armappplatform.APIPortalResourceRequests{ - // CPU: to.Ptr("1"), - // Memory: to.Ptr("1G"), - // }, - // URL: to.Ptr("test-url"), - // }, - // SKU: &armappplatform.SKU{ - // Name: to.Ptr("E0"), - // Capacity: to.Ptr[int32](2), - // Tier: to.Ptr("Enterprise"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApiPortals_ValidateDomain.json -func ExampleAPIPortalsClient_ValidateDomain() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAPIPortalsClient().ValidateDomain(ctx, "myResourceGroup", "myservice", "default", armappplatform.CustomDomainValidatePayload{ - Name: to.Ptr("mydomain.io"), - }, 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.CustomDomainValidateResult = armappplatform.CustomDomainValidateResult{ - // IsValid: to.Ptr(false), - // Message: to.Ptr("Certificate is invalid, please check if it is a self signed cert or if it contains a suitable dns name"), - // } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/applicationaccelerators_client.go b/sdk/resourcemanager/appplatform/armappplatform/applicationaccelerators_client.go deleted file mode 100644 index 5eeb1d4a37df..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/applicationaccelerators_client.go +++ /dev/null @@ -1,324 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappplatform - -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" -) - -// ApplicationAcceleratorsClient contains the methods for the ApplicationAccelerators group. -// Don't use this type directly, use NewApplicationAcceleratorsClient() instead. -type ApplicationAcceleratorsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewApplicationAcceleratorsClient creates a new instance of ApplicationAcceleratorsClient with the specified values. -// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewApplicationAcceleratorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationAcceleratorsClient, error) { - cl, err := arm.NewClient(moduleName+".ApplicationAcceleratorsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &ApplicationAcceleratorsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create or update the application accelerator. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - applicationAcceleratorName - The name of the application accelerator. -// - applicationAcceleratorResource - The application accelerator for the create or update operation -// - options - ApplicationAcceleratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationAcceleratorsClient.BeginCreateOrUpdate -// method. -func (client *ApplicationAcceleratorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, applicationAcceleratorResource ApplicationAcceleratorResource, options *ApplicationAcceleratorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ApplicationAcceleratorsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, applicationAcceleratorName, applicationAcceleratorResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ApplicationAcceleratorsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[ApplicationAcceleratorsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// CreateOrUpdate - Create or update the application accelerator. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *ApplicationAcceleratorsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, applicationAcceleratorResource ApplicationAcceleratorResource, options *ApplicationAcceleratorsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, applicationAcceleratorResource, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ApplicationAcceleratorsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, applicationAcceleratorResource ApplicationAcceleratorResource, options *ApplicationAcceleratorsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if applicationAcceleratorName == "" { - return nil, errors.New("parameter applicationAcceleratorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationAcceleratorName}", url.PathEscape(applicationAcceleratorName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, applicationAcceleratorResource) -} - -// BeginDelete - Delete the application accelerator. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - applicationAcceleratorName - The name of the application accelerator. -// - options - ApplicationAcceleratorsClientBeginDeleteOptions contains the optional parameters for the ApplicationAcceleratorsClient.BeginDelete -// method. -func (client *ApplicationAcceleratorsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, options *ApplicationAcceleratorsClientBeginDeleteOptions) (*runtime.Poller[ApplicationAcceleratorsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, applicationAcceleratorName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ApplicationAcceleratorsClientDeleteResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[ApplicationAcceleratorsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Delete - Delete the application accelerator. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *ApplicationAcceleratorsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, options *ApplicationAcceleratorsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ApplicationAcceleratorsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, options *ApplicationAcceleratorsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if applicationAcceleratorName == "" { - return nil, errors.New("parameter applicationAcceleratorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationAcceleratorName}", url.PathEscape(applicationAcceleratorName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the application accelerator. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - applicationAcceleratorName - The name of the application accelerator. -// - options - ApplicationAcceleratorsClientGetOptions contains the optional parameters for the ApplicationAcceleratorsClient.Get -// method. -func (client *ApplicationAcceleratorsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, options *ApplicationAcceleratorsClientGetOptions) (ApplicationAcceleratorsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, options) - if err != nil { - return ApplicationAcceleratorsClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ApplicationAcceleratorsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationAcceleratorsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ApplicationAcceleratorsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, options *ApplicationAcceleratorsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if applicationAcceleratorName == "" { - return nil, errors.New("parameter applicationAcceleratorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationAcceleratorName}", url.PathEscape(applicationAcceleratorName)) - 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", "2022-11-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 *ApplicationAcceleratorsClient) getHandleResponse(resp *http.Response) (ApplicationAcceleratorsClientGetResponse, error) { - result := ApplicationAcceleratorsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationAcceleratorResource); err != nil { - return ApplicationAcceleratorsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Handle requests to list all application accelerator. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - options - ApplicationAcceleratorsClientListOptions contains the optional parameters for the ApplicationAcceleratorsClient.NewListPager -// method. -func (client *ApplicationAcceleratorsClient) NewListPager(resourceGroupName string, serviceName string, options *ApplicationAcceleratorsClientListOptions) *runtime.Pager[ApplicationAcceleratorsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ApplicationAcceleratorsClientListResponse]{ - More: func(page ApplicationAcceleratorsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ApplicationAcceleratorsClientListResponse) (ApplicationAcceleratorsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ApplicationAcceleratorsClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ApplicationAcceleratorsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationAcceleratorsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ApplicationAcceleratorsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ApplicationAcceleratorsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ApplicationAcceleratorsClient) listHandleResponse(resp *http.Response) (ApplicationAcceleratorsClientListResponse, error) { - result := ApplicationAcceleratorsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationAcceleratorResourceCollection); err != nil { - return ApplicationAcceleratorsClientListResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/applicationaccelerators_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/applicationaccelerators_client_example_test.go deleted file mode 100644 index 9cda9214ab92..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/applicationaccelerators_client_example_test.go +++ /dev/null @@ -1,224 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApplicationAccelerators_List.json -func ExampleApplicationAcceleratorsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewApplicationAcceleratorsClient().NewListPager("myResourceGroup", "myservice", 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.ApplicationAcceleratorResourceCollection = armappplatform.ApplicationAcceleratorResourceCollection{ - // Value: []*armappplatform.ApplicationAcceleratorResource{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/applicationAccelerators"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/applicationAccelerators/default"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.ApplicationAcceleratorProperties{ - // Components: []*armappplatform.ApplicationAcceleratorComponent{ - // { - // Name: to.Ptr("component1"), - // Instances: []*armappplatform.ApplicationAcceleratorInstance{ - // { - // Name: to.Ptr("instance1"), - // Status: to.Ptr("Running"), - // }}, - // ResourceRequests: &armappplatform.ApplicationAcceleratorResourceRequests{ - // CPU: to.Ptr("1"), - // InstanceCount: to.Ptr[int32](1), - // Memory: to.Ptr("1Gi"), - // }, - // }}, - // ProvisioningState: to.Ptr(armappplatform.ApplicationAcceleratorProvisioningStateSucceeded), - // }, - // SKU: &armappplatform.SKU{ - // Name: to.Ptr("E0"), - // Capacity: to.Ptr[int32](2), - // Tier: to.Ptr("Enterprise"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApplicationAccelerators_Get.json -func ExampleApplicationAcceleratorsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewApplicationAcceleratorsClient().Get(ctx, "myResourceGroup", "myservice", "default", 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.ApplicationAcceleratorResource = armappplatform.ApplicationAcceleratorResource{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/applicationAccelerators"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/applicationAccelerators/default"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.ApplicationAcceleratorProperties{ - // Components: []*armappplatform.ApplicationAcceleratorComponent{ - // { - // Name: to.Ptr("component1"), - // Instances: []*armappplatform.ApplicationAcceleratorInstance{ - // { - // Name: to.Ptr("instance1"), - // Status: to.Ptr("Running"), - // }}, - // ResourceRequests: &armappplatform.ApplicationAcceleratorResourceRequests{ - // CPU: to.Ptr("1"), - // InstanceCount: to.Ptr[int32](1), - // Memory: to.Ptr("1Gi"), - // }, - // }}, - // ProvisioningState: to.Ptr(armappplatform.ApplicationAcceleratorProvisioningStateSucceeded), - // }, - // SKU: &armappplatform.SKU{ - // Name: to.Ptr("E0"), - // Capacity: to.Ptr[int32](2), - // Tier: to.Ptr("Enterprise"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApplicationAccelerators_CreateOrUpdate.json -func ExampleApplicationAcceleratorsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewApplicationAcceleratorsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", armappplatform.ApplicationAcceleratorResource{ - Properties: &armappplatform.ApplicationAcceleratorProperties{}, - SKU: &armappplatform.SKU{ - Name: to.Ptr("E0"), - Capacity: to.Ptr[int32](2), - Tier: to.Ptr("Enterprise"), - }, - }, 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.ApplicationAcceleratorResource = armappplatform.ApplicationAcceleratorResource{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/applicationAccelerators"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/applicationAccelerators/default"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.ApplicationAcceleratorProperties{ - // Components: []*armappplatform.ApplicationAcceleratorComponent{ - // { - // Name: to.Ptr("component1"), - // Instances: []*armappplatform.ApplicationAcceleratorInstance{ - // { - // Name: to.Ptr("instance1"), - // Status: to.Ptr("Running"), - // }}, - // ResourceRequests: &armappplatform.ApplicationAcceleratorResourceRequests{ - // CPU: to.Ptr("1"), - // InstanceCount: to.Ptr[int32](1), - // Memory: to.Ptr("1Gi"), - // }, - // }}, - // ProvisioningState: to.Ptr(armappplatform.ApplicationAcceleratorProvisioningStateSucceeded), - // }, - // SKU: &armappplatform.SKU{ - // Name: to.Ptr("E0"), - // Capacity: to.Ptr[int32](2), - // Tier: to.Ptr("Enterprise"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApplicationAccelerators_Delete.json -func ExampleApplicationAcceleratorsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewApplicationAcceleratorsClient().BeginDelete(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/applicationliveviews_client.go b/sdk/resourcemanager/appplatform/armappplatform/applicationliveviews_client.go deleted file mode 100644 index 3953a043c8a8..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/applicationliveviews_client.go +++ /dev/null @@ -1,324 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappplatform - -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" -) - -// ApplicationLiveViewsClient contains the methods for the ApplicationLiveViews group. -// Don't use this type directly, use NewApplicationLiveViewsClient() instead. -type ApplicationLiveViewsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewApplicationLiveViewsClient creates a new instance of ApplicationLiveViewsClient with the specified values. -// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewApplicationLiveViewsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationLiveViewsClient, error) { - cl, err := arm.NewClient(moduleName+".ApplicationLiveViewsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &ApplicationLiveViewsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create the default Application Live View or update the existing Application Live View. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - applicationLiveViewName - The name of Application Live View. -// - applicationLiveViewResource - Parameters for the update operation -// - options - ApplicationLiveViewsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationLiveViewsClient.BeginCreateOrUpdate -// method. -func (client *ApplicationLiveViewsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, applicationLiveViewName string, applicationLiveViewResource ApplicationLiveViewResource, options *ApplicationLiveViewsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ApplicationLiveViewsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, applicationLiveViewName, applicationLiveViewResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ApplicationLiveViewsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[ApplicationLiveViewsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// CreateOrUpdate - Create the default Application Live View or update the existing Application Live View. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *ApplicationLiveViewsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, applicationLiveViewName string, applicationLiveViewResource ApplicationLiveViewResource, options *ApplicationLiveViewsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, applicationLiveViewName, applicationLiveViewResource, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ApplicationLiveViewsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationLiveViewName string, applicationLiveViewResource ApplicationLiveViewResource, options *ApplicationLiveViewsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews/{applicationLiveViewName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if applicationLiveViewName == "" { - return nil, errors.New("parameter applicationLiveViewName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationLiveViewName}", url.PathEscape(applicationLiveViewName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, applicationLiveViewResource) -} - -// BeginDelete - Disable the default Application Live View. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - applicationLiveViewName - The name of Application Live View. -// - options - ApplicationLiveViewsClientBeginDeleteOptions contains the optional parameters for the ApplicationLiveViewsClient.BeginDelete -// method. -func (client *ApplicationLiveViewsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, applicationLiveViewName string, options *ApplicationLiveViewsClientBeginDeleteOptions) (*runtime.Poller[ApplicationLiveViewsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, applicationLiveViewName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ApplicationLiveViewsClientDeleteResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[ApplicationLiveViewsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Delete - Disable the default Application Live View. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *ApplicationLiveViewsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, applicationLiveViewName string, options *ApplicationLiveViewsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, applicationLiveViewName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ApplicationLiveViewsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationLiveViewName string, options *ApplicationLiveViewsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews/{applicationLiveViewName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if applicationLiveViewName == "" { - return nil, errors.New("parameter applicationLiveViewName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationLiveViewName}", url.PathEscape(applicationLiveViewName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the Application Live and its properties. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - applicationLiveViewName - The name of Application Live View. -// - options - ApplicationLiveViewsClientGetOptions contains the optional parameters for the ApplicationLiveViewsClient.Get -// method. -func (client *ApplicationLiveViewsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, applicationLiveViewName string, options *ApplicationLiveViewsClientGetOptions) (ApplicationLiveViewsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, applicationLiveViewName, options) - if err != nil { - return ApplicationLiveViewsClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ApplicationLiveViewsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationLiveViewsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ApplicationLiveViewsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationLiveViewName string, options *ApplicationLiveViewsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews/{applicationLiveViewName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if applicationLiveViewName == "" { - return nil, errors.New("parameter applicationLiveViewName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationLiveViewName}", url.PathEscape(applicationLiveViewName)) - 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", "2022-11-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 *ApplicationLiveViewsClient) getHandleResponse(resp *http.Response) (ApplicationLiveViewsClientGetResponse, error) { - result := ApplicationLiveViewsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationLiveViewResource); err != nil { - return ApplicationLiveViewsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Handles requests to list all resources in a Service. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - options - ApplicationLiveViewsClientListOptions contains the optional parameters for the ApplicationLiveViewsClient.NewListPager -// method. -func (client *ApplicationLiveViewsClient) NewListPager(resourceGroupName string, serviceName string, options *ApplicationLiveViewsClientListOptions) *runtime.Pager[ApplicationLiveViewsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ApplicationLiveViewsClientListResponse]{ - More: func(page ApplicationLiveViewsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ApplicationLiveViewsClientListResponse) (ApplicationLiveViewsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ApplicationLiveViewsClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ApplicationLiveViewsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationLiveViewsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ApplicationLiveViewsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ApplicationLiveViewsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ApplicationLiveViewsClient) listHandleResponse(resp *http.Response) (ApplicationLiveViewsClientListResponse, error) { - result := ApplicationLiveViewsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationLiveViewResourceCollection); err != nil { - return ApplicationLiveViewsClientListResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/applicationliveviews_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/applicationliveviews_client_example_test.go deleted file mode 100644 index bac18996210a..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/applicationliveviews_client_example_test.go +++ /dev/null @@ -1,242 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApplicationLiveViews_List.json -func ExampleApplicationLiveViewsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewApplicationLiveViewsClient().NewListPager("myResourceGroup", "myservice", 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.ApplicationLiveViewResourceCollection = armappplatform.ApplicationLiveViewResourceCollection{ - // Value: []*armappplatform.ApplicationLiveViewResource{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/applicationLiveViews"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/applicationLiveViews/default"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.ApplicationLiveViewProperties{ - // Components: []*armappplatform.ApplicationLiveViewComponent{ - // { - // Name: "app-live-view-server", - // Instances: []*armappplatform.ApplicationLiveViewInstance{ - // { - // Name: to.Ptr("app-live-view-server-name"), - // Status: to.Ptr("Running"), - // }}, - // ResourceRequests: &armappplatform.ApplicationLiveViewResourceRequests{ - // CPU: to.Ptr("1"), - // InstanceCount: to.Ptr[int32](1), - // Memory: to.Ptr("1Gi"), - // }, - // }, - // { - // Name: "app-live-view-connector", - // Instances: []*armappplatform.ApplicationLiveViewInstance{ - // { - // Name: to.Ptr("app-live-view-connector-name1"), - // Status: to.Ptr("Starting"), - // }}, - // ResourceRequests: &armappplatform.ApplicationLiveViewResourceRequests{ - // CPU: to.Ptr("500m"), - // InstanceCount: to.Ptr[int32](1), - // Memory: to.Ptr("500Mi"), - // }, - // }}, - // ProvisioningState: to.Ptr(armappplatform.ApplicationLiveViewProvisioningStateSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApplicationLiveViews_Get.json -func ExampleApplicationLiveViewsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewApplicationLiveViewsClient().Get(ctx, "myResourceGroup", "myservice", "default", 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.ApplicationLiveViewResource = armappplatform.ApplicationLiveViewResource{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/applicationLiveViews"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/applicationLiveViews/default"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.ApplicationLiveViewProperties{ - // Components: []*armappplatform.ApplicationLiveViewComponent{ - // { - // Name: "app-live-view-server", - // Instances: []*armappplatform.ApplicationLiveViewInstance{ - // { - // Name: to.Ptr("app-live-view-server-name"), - // Status: to.Ptr("Running"), - // }}, - // ResourceRequests: &armappplatform.ApplicationLiveViewResourceRequests{ - // CPU: to.Ptr("1"), - // InstanceCount: to.Ptr[int32](1), - // Memory: to.Ptr("1Gi"), - // }, - // }, - // { - // Name: "app-live-view-connector", - // Instances: []*armappplatform.ApplicationLiveViewInstance{ - // { - // Name: to.Ptr("app-live-view-connector-name1"), - // Status: to.Ptr("Starting"), - // }}, - // ResourceRequests: &armappplatform.ApplicationLiveViewResourceRequests{ - // CPU: to.Ptr("500m"), - // InstanceCount: to.Ptr[int32](1), - // Memory: to.Ptr("500Mi"), - // }, - // }}, - // ProvisioningState: to.Ptr(armappplatform.ApplicationLiveViewProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApplicationLiveViews_CreateOrUpdate.json -func ExampleApplicationLiveViewsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewApplicationLiveViewsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", armappplatform.ApplicationLiveViewResource{ - Properties: &armappplatform.ApplicationLiveViewProperties{}, - }, 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.ApplicationLiveViewResource = armappplatform.ApplicationLiveViewResource{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/applicationLiveViews"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/applicationLiveViews/default"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.ApplicationLiveViewProperties{ - // Components: []*armappplatform.ApplicationLiveViewComponent{ - // { - // Name: "app-live-view-server", - // Instances: []*armappplatform.ApplicationLiveViewInstance{ - // { - // Name: to.Ptr("app-live-view-server-name"), - // Status: to.Ptr("Running"), - // }}, - // ResourceRequests: &armappplatform.ApplicationLiveViewResourceRequests{ - // CPU: to.Ptr("1"), - // InstanceCount: to.Ptr[int32](1), - // Memory: to.Ptr("1Gi"), - // }, - // }, - // { - // Name: "app-live-view-connector", - // Instances: []*armappplatform.ApplicationLiveViewInstance{ - // { - // Name: to.Ptr("app-live-view-connector-name1"), - // Status: to.Ptr("Starting"), - // }}, - // ResourceRequests: &armappplatform.ApplicationLiveViewResourceRequests{ - // CPU: to.Ptr("500m"), - // InstanceCount: to.Ptr[int32](1), - // Memory: to.Ptr("500Mi"), - // }, - // }}, - // ProvisioningState: to.Ptr(armappplatform.ApplicationLiveViewProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApplicationLiveView_Delete.json -func ExampleApplicationLiveViewsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewApplicationLiveViewsClient().BeginDelete(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/apps_client.go b/sdk/resourcemanager/appplatform/armappplatform/apps_client.go index 03868f3c8cf4..7c2f8600edc2 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/apps_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/apps_client.go @@ -48,7 +48,7 @@ func NewAppsClient(subscriptionID string, credential azcore.TokenCredential, opt // BeginCreateOrUpdate - Create a new App or update an exiting App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -62,7 +62,9 @@ func (client *AppsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller[AppsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AppsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[AppsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -71,7 +73,7 @@ func (client *AppsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroup // CreateOrUpdate - Create a new App or update an exiting App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *AppsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource, options *AppsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, appName, appResource, options) if err != nil { @@ -111,7 +113,7 @@ func (client *AppsClient) createOrUpdateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, appResource) @@ -120,7 +122,7 @@ func (client *AppsClient) createOrUpdateCreateRequest(ctx context.Context, resou // BeginDelete - Operation to delete an App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -132,7 +134,9 @@ func (client *AppsClient) BeginDelete(ctx context.Context, resourceGroupName str if err != nil { return nil, err } - return runtime.NewPoller[AppsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AppsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[AppsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -141,7 +145,7 @@ func (client *AppsClient) BeginDelete(ctx context.Context, resourceGroupName str // Delete - Operation to delete an App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *AppsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, appName, options) if err != nil { @@ -181,7 +185,7 @@ func (client *AppsClient) deleteCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -190,7 +194,7 @@ func (client *AppsClient) deleteCreateRequest(ctx context.Context, resourceGroup // Get - Get an App and its properties. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -235,7 +239,7 @@ func (client *AppsClient) getCreateRequest(ctx context.Context, resourceGroupNam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") if options != nil && options.SyncStatus != nil { reqQP.Set("syncStatus", *options.SyncStatus) } @@ -256,7 +260,7 @@ func (client *AppsClient) getHandleResponse(resp *http.Response) (AppsClientGetR // GetResourceUploadURL - Get an resource upload URL for an App, which may be artifacts or source archive. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -302,7 +306,7 @@ func (client *AppsClient) getResourceUploadURLCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -319,7 +323,7 @@ func (client *AppsClient) getResourceUploadURLHandleResponse(resp *http.Response // NewListPager - Handles requests to list all resources in a Service. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -372,7 +376,7 @@ func (client *AppsClient) listCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -390,7 +394,7 @@ func (client *AppsClient) listHandleResponse(resp *http.Response) (AppsClientLis // BeginSetActiveDeployments - Set existing Deployment under the app as active // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -404,7 +408,9 @@ func (client *AppsClient) BeginSetActiveDeployments(ctx context.Context, resourc if err != nil { return nil, err } - return runtime.NewPoller[AppsClientSetActiveDeploymentsResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AppsClientSetActiveDeploymentsResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[AppsClientSetActiveDeploymentsResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -413,7 +419,7 @@ func (client *AppsClient) BeginSetActiveDeployments(ctx context.Context, resourc // SetActiveDeployments - Set existing Deployment under the app as active // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *AppsClient) setActiveDeployments(ctx context.Context, resourceGroupName string, serviceName string, appName string, activeDeploymentCollection ActiveDeploymentCollection, options *AppsClientBeginSetActiveDeploymentsOptions) (*http.Response, error) { req, err := client.setActiveDeploymentsCreateRequest(ctx, resourceGroupName, serviceName, appName, activeDeploymentCollection, options) if err != nil { @@ -453,7 +459,7 @@ func (client *AppsClient) setActiveDeploymentsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, activeDeploymentCollection) @@ -462,7 +468,7 @@ func (client *AppsClient) setActiveDeploymentsCreateRequest(ctx context.Context, // BeginUpdate - Operation to update an exiting App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -475,7 +481,9 @@ func (client *AppsClient) BeginUpdate(ctx context.Context, resourceGroupName str if err != nil { return nil, err } - return runtime.NewPoller[AppsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AppsClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[AppsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -484,7 +492,7 @@ func (client *AppsClient) BeginUpdate(ctx context.Context, resourceGroupName str // Update - Operation to update an exiting App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *AppsClient) update(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource, options *AppsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, appName, appResource, options) if err != nil { @@ -524,7 +532,7 @@ func (client *AppsClient) updateCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, appResource) @@ -533,7 +541,7 @@ func (client *AppsClient) updateCreateRequest(ctx context.Context, resourceGroup // ValidateDomain - Check the resource name is valid as well as not in use. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -579,7 +587,7 @@ func (client *AppsClient) validateDomainCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, validatePayload) diff --git a/sdk/resourcemanager/appplatform/armappplatform/apps_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/apps_client_example_test.go index e293e7aa80dc..7235929fd25d 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/apps_client_example_test.go +++ b/sdk/resourcemanager/appplatform/armappplatform/apps_client_example_test.go @@ -18,8 +18,8 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_Get.json -func ExampleAppsClient_Get_appsGet() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Apps_Get.json +func ExampleAppsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -49,159 +49,42 @@ func ExampleAppsClient_Get_appsGet() { // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), // }, // Identity: &armappplatform.ManagedIdentityProperties{ - // Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssignedUserAssigned), + // Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssigned), // PrincipalID: to.Ptr("principalid"), // TenantID: to.Ptr("tenantid"), - // UserAssignedIdentities: map[string]*armappplatform.UserAssignedManagedIdentity{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armappplatform.UserAssignedManagedIdentity{ - // ClientID: to.Ptr("clientId1"), - // PrincipalID: to.Ptr("principalId1"), - // }, - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armappplatform.UserAssignedManagedIdentity{ - // ClientID: to.Ptr("clientId2"), - // PrincipalID: to.Ptr("principalId2"), - // }, - // }, // }, // Location: to.Ptr("eastus"), // Properties: &armappplatform.AppResourceProperties{ - // CustomPersistentDisks: []*armappplatform.CustomPersistentDiskResource{ + // EnableEndToEndTLS: to.Ptr(false), + // Fqdn: to.Ptr("myapp.mydomain.com"), + // HTTPSOnly: to.Ptr(false), + // LoadedCertificates: []*armappplatform.LoadedCertificate{ // { - // CustomPersistentDiskProperties: &armappplatform.AzureFileVolume{ - // Type: to.Ptr(armappplatform.TypeAzureFileVolume), - // MountOptions: []*string{ - // to.Ptr("uid=0"), - // to.Ptr("gid=0"), - // to.Ptr("dir_mode=0777"), - // to.Ptr("file_mode=0777")}, - // MountPath: to.Ptr("/mypath1/mypath2"), - // ShareName: to.Ptr("myFileShare"), - // }, - // StorageID: to.Ptr("myASCStorageID"), - // }}, - // EnableEndToEndTLS: to.Ptr(false), - // Fqdn: to.Ptr("myapp.mydomain.com"), - // HTTPSOnly: to.Ptr(false), - // LoadedCertificates: []*armappplatform.LoadedCertificate{ - // { - // LoadTrustStore: to.Ptr(false), - // ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert1"), - // }, - // { - // LoadTrustStore: to.Ptr(true), - // ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert2"), - // }}, - // PersistentDisk: &armappplatform.PersistentDisk{ - // MountPath: to.Ptr("/mypersistentdisk"), - // SizeInGB: to.Ptr[int32](2), - // UsedInGB: to.Ptr[int32](1), + // LoadTrustStore: to.Ptr(false), + // ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert1"), // }, - // ProvisioningState: to.Ptr(armappplatform.AppResourceProvisioningStateSucceeded), - // Public: to.Ptr(true), - // TemporaryDisk: &armappplatform.TemporaryDisk{ - // MountPath: to.Ptr("/mytemporarydisk"), - // SizeInGB: to.Ptr[int32](2), - // }, - // URL: to.Ptr("myapp.myservice.azuremicroservices.io"), + // { + // LoadTrustStore: to.Ptr(true), + // ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert2"), + // }}, + // PersistentDisk: &armappplatform.PersistentDisk{ + // MountPath: to.Ptr("/mypersistentdisk"), + // SizeInGB: to.Ptr[int32](2), + // UsedInGB: to.Ptr[int32](1), // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_Get_VNetInjection.json -func ExampleAppsClient_Get_appsGetVNetInjection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAppsClient().Get(ctx, "myResourceGroup", "myservice", "myapp", &armappplatform.AppsClientGetOptions{SyncStatus: 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.AppResource = armappplatform.AppResource{ - // Name: to.Ptr("myapp"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/apps"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Identity: &armappplatform.ManagedIdentityProperties{ - // Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssignedUserAssigned), - // PrincipalID: to.Ptr("principalid"), - // TenantID: to.Ptr("tenantid"), - // UserAssignedIdentities: map[string]*armappplatform.UserAssignedManagedIdentity{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armappplatform.UserAssignedManagedIdentity{ - // ClientID: to.Ptr("clientId1"), - // PrincipalID: to.Ptr("principalId1"), - // }, - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armappplatform.UserAssignedManagedIdentity{ - // ClientID: to.Ptr("clientId2"), - // PrincipalID: to.Ptr("principalId2"), - // }, + // ProvisioningState: to.Ptr(armappplatform.AppResourceProvisioningStateSucceeded), + // Public: to.Ptr(true), + // TemporaryDisk: &armappplatform.TemporaryDisk{ + // MountPath: to.Ptr("/mytemporarydisk"), + // SizeInGB: to.Ptr[int32](2), // }, + // URL: to.Ptr("myapp.myservice.azuremicroservices.io"), // }, - // Location: to.Ptr("eastus"), - // Properties: &armappplatform.AppResourceProperties{ - // CustomPersistentDisks: []*armappplatform.CustomPersistentDiskResource{ - // { - // CustomPersistentDiskProperties: &armappplatform.AzureFileVolume{ - // Type: to.Ptr(armappplatform.TypeAzureFileVolume), - // MountOptions: []*string{ - // to.Ptr("uid=0"), - // to.Ptr("gid=0"), - // to.Ptr("dir_mode=0777"), - // to.Ptr("file_mode=0777")}, - // MountPath: to.Ptr("/mypath1/mypath2"), - // ShareName: to.Ptr("myFileShare"), - // }, - // StorageID: to.Ptr("myASCStorageID"), - // }}, - // EnableEndToEndTLS: to.Ptr(false), - // Fqdn: to.Ptr("myapp.private.mydomain.com"), - // HTTPSOnly: to.Ptr(false), - // LoadedCertificates: []*armappplatform.LoadedCertificate{ - // { - // LoadTrustStore: to.Ptr(false), - // ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert1"), - // }, - // { - // LoadTrustStore: to.Ptr(true), - // ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert2"), - // }}, - // PersistentDisk: &armappplatform.PersistentDisk{ - // MountPath: to.Ptr("/mypersistentdisk"), - // SizeInGB: to.Ptr[int32](2), - // UsedInGB: to.Ptr[int32](1), - // }, - // ProvisioningState: to.Ptr(armappplatform.AppResourceProvisioningStateSucceeded), - // Public: to.Ptr(true), - // TemporaryDisk: &armappplatform.TemporaryDisk{ - // MountPath: to.Ptr("/mytemporarydisk"), - // SizeInGB: to.Ptr[int32](2), - // }, - // URL: to.Ptr("myapp.myservice.private.azuremicroservices.io"), - // VnetAddons: &armappplatform.AppVNetAddons{ - // PublicEndpoint: to.Ptr(true), - // PublicEndpointURL: to.Ptr("myapp.myservice.azuremicroservices.io"), - // }, - // }, - // } + // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_CreateOrUpdate.json -func ExampleAppsClient_BeginCreateOrUpdate_appsCreateOrUpdate() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Apps_CreateOrUpdate.json +func ExampleAppsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -213,11 +96,7 @@ func ExampleAppsClient_BeginCreateOrUpdate_appsCreateOrUpdate() { } poller, err := clientFactory.NewAppsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "myapp", armappplatform.AppResource{ Identity: &armappplatform.ManagedIdentityProperties{ - Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssignedUserAssigned), - UserAssignedIdentities: map[string]*armappplatform.UserAssignedManagedIdentity{ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {}, - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {}, - }, + Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssigned), }, Location: to.Ptr("eastus"), Properties: &armappplatform.AppResourceProperties{ @@ -229,21 +108,8 @@ func ExampleAppsClient_BeginCreateOrUpdate_appsCreateOrUpdate() { "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/serviceRegistries/myServiceRegistry", }, }, - CustomPersistentDisks: []*armappplatform.CustomPersistentDiskResource{ - { - CustomPersistentDiskProperties: &armappplatform.AzureFileVolume{ - Type: to.Ptr(armappplatform.TypeAzureFileVolume), - MountOptions: []*string{ - to.Ptr("uid=0"), - to.Ptr("gid=0"), - to.Ptr("dir_mode=0777"), - to.Ptr("file_mode=0777")}, - MountPath: to.Ptr("/mypath1/mypath2"), - ShareName: to.Ptr("myFileShare"), - }, - StorageID: to.Ptr("myASCStorageID"), - }}, EnableEndToEndTLS: to.Ptr(false), + Fqdn: to.Ptr("myapp.mydomain.com"), HTTPSOnly: to.Ptr(false), LoadedCertificates: []*armappplatform.LoadedCertificate{ { @@ -288,19 +154,9 @@ func ExampleAppsClient_BeginCreateOrUpdate_appsCreateOrUpdate() { // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), // }, // Identity: &armappplatform.ManagedIdentityProperties{ - // Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssignedUserAssigned), + // Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssigned), // PrincipalID: to.Ptr("principalid"), // TenantID: to.Ptr("tenantid"), - // UserAssignedIdentities: map[string]*armappplatform.UserAssignedManagedIdentity{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armappplatform.UserAssignedManagedIdentity{ - // ClientID: to.Ptr("clientId1"), - // PrincipalID: to.Ptr("principalId1"), - // }, - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armappplatform.UserAssignedManagedIdentity{ - // ClientID: to.Ptr("clientId2"), - // PrincipalID: to.Ptr("principalId2"), - // }, - // }, // }, // Location: to.Ptr("eastus"), // Properties: &armappplatform.AppResourceProperties{ @@ -312,192 +168,26 @@ func ExampleAppsClient_BeginCreateOrUpdate_appsCreateOrUpdate() { // "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/serviceRegistries/myServiceRegistry", // }, // }, - // CustomPersistentDisks: []*armappplatform.CustomPersistentDiskResource{ - // { - // CustomPersistentDiskProperties: &armappplatform.AzureFileVolume{ - // Type: to.Ptr(armappplatform.TypeAzureFileVolume), - // MountOptions: []*string{ - // to.Ptr("uid=0"), - // to.Ptr("gid=0"), - // to.Ptr("dir_mode=0777"), - // to.Ptr("file_mode=0777")}, - // MountPath: to.Ptr("/mypath1/mypath2"), - // ShareName: to.Ptr("myFileShare"), - // }, - // StorageID: to.Ptr("myASCStorageID"), - // }}, - // EnableEndToEndTLS: to.Ptr(false), - // Fqdn: to.Ptr("myapp.mydomain.com"), - // HTTPSOnly: to.Ptr(false), - // PersistentDisk: &armappplatform.PersistentDisk{ - // MountPath: to.Ptr("/mypersistentdisk"), - // SizeInGB: to.Ptr[int32](2), - // UsedInGB: to.Ptr[int32](1), - // }, - // ProvisioningState: to.Ptr(armappplatform.AppResourceProvisioningStateSucceeded), - // Public: to.Ptr(true), - // TemporaryDisk: &armappplatform.TemporaryDisk{ - // MountPath: to.Ptr("/mytemporarydisk"), - // SizeInGB: to.Ptr[int32](2), - // }, - // URL: to.Ptr("myapp.myservice.azuremicroservices.io"), + // EnableEndToEndTLS: to.Ptr(false), + // Fqdn: to.Ptr("myapp.mydomain.com"), + // HTTPSOnly: to.Ptr(false), + // PersistentDisk: &armappplatform.PersistentDisk{ + // MountPath: to.Ptr("/mypersistentdisk"), + // SizeInGB: to.Ptr[int32](2), + // UsedInGB: to.Ptr[int32](1), // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_CreateOrUpdate_VNetInjection.json -func ExampleAppsClient_BeginCreateOrUpdate_appsCreateOrUpdateVNetInjection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAppsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "myapp", armappplatform.AppResource{ - Identity: &armappplatform.ManagedIdentityProperties{ - Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssignedUserAssigned), - UserAssignedIdentities: map[string]*armappplatform.UserAssignedManagedIdentity{ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {}, - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {}, - }, - }, - Location: to.Ptr("eastus"), - Properties: &armappplatform.AppResourceProperties{ - AddonConfigs: map[string]map[string]any{ - "ApplicationConfigurationService": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/configurationServices/myacs", - }, - "ServiceRegistry": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/serviceRegistries/myServiceRegistry", - }, - }, - CustomPersistentDisks: []*armappplatform.CustomPersistentDiskResource{ - { - CustomPersistentDiskProperties: &armappplatform.AzureFileVolume{ - Type: to.Ptr(armappplatform.TypeAzureFileVolume), - MountOptions: []*string{ - to.Ptr("uid=0"), - to.Ptr("gid=0"), - to.Ptr("dir_mode=0777"), - to.Ptr("file_mode=0777")}, - MountPath: to.Ptr("/mypath1/mypath2"), - ShareName: to.Ptr("myFileShare"), - }, - StorageID: to.Ptr("myASCStorageID"), - }}, - EnableEndToEndTLS: to.Ptr(false), - HTTPSOnly: to.Ptr(false), - LoadedCertificates: []*armappplatform.LoadedCertificate{ - { - LoadTrustStore: to.Ptr(false), - ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert1"), - }, - { - LoadTrustStore: to.Ptr(true), - ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert2"), - }}, - PersistentDisk: &armappplatform.PersistentDisk{ - MountPath: to.Ptr("/mypersistentdisk"), - SizeInGB: to.Ptr[int32](2), - }, - Public: to.Ptr(true), - TemporaryDisk: &armappplatform.TemporaryDisk{ - MountPath: to.Ptr("/mytemporarydisk"), - SizeInGB: to.Ptr[int32](2), - }, - VnetAddons: &armappplatform.AppVNetAddons{ - PublicEndpoint: to.Ptr(true), - }, - }, - }, 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.AppResource = armappplatform.AppResource{ - // Name: to.Ptr("myapp"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/apps"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Identity: &armappplatform.ManagedIdentityProperties{ - // Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssignedUserAssigned), - // PrincipalID: to.Ptr("principalid"), - // TenantID: to.Ptr("tenantid"), - // UserAssignedIdentities: map[string]*armappplatform.UserAssignedManagedIdentity{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armappplatform.UserAssignedManagedIdentity{ - // ClientID: to.Ptr("clientId1"), - // PrincipalID: to.Ptr("principalId1"), - // }, - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armappplatform.UserAssignedManagedIdentity{ - // ClientID: to.Ptr("clientId2"), - // PrincipalID: to.Ptr("principalId2"), - // }, + // ProvisioningState: to.Ptr(armappplatform.AppResourceProvisioningStateSucceeded), + // Public: to.Ptr(true), + // TemporaryDisk: &armappplatform.TemporaryDisk{ + // MountPath: to.Ptr("/mytemporarydisk"), + // SizeInGB: to.Ptr[int32](2), // }, + // URL: to.Ptr("myapp.myservice.azuremicroservices.io"), // }, - // Location: to.Ptr("eastus"), - // Properties: &armappplatform.AppResourceProperties{ - // AddonConfigs: map[string]map[string]any{ - // "ApplicationConfigurationService": map[string]any{ - // "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/configurationServices/myacs", - // }, - // "ServiceRegistry": map[string]any{ - // "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/serviceRegistries/myServiceRegistry", - // }, - // }, - // CustomPersistentDisks: []*armappplatform.CustomPersistentDiskResource{ - // { - // CustomPersistentDiskProperties: &armappplatform.AzureFileVolume{ - // Type: to.Ptr(armappplatform.TypeAzureFileVolume), - // MountOptions: []*string{ - // to.Ptr("uid=0"), - // to.Ptr("gid=0"), - // to.Ptr("dir_mode=0777"), - // to.Ptr("file_mode=0777")}, - // MountPath: to.Ptr("/mypath1/mypath2"), - // ShareName: to.Ptr("myFileShare"), - // }, - // StorageID: to.Ptr("myASCStorageID"), - // }}, - // EnableEndToEndTLS: to.Ptr(false), - // Fqdn: to.Ptr("myapp.private.mydomain.com"), - // HTTPSOnly: to.Ptr(false), - // PersistentDisk: &armappplatform.PersistentDisk{ - // MountPath: to.Ptr("/mypersistentdisk"), - // SizeInGB: to.Ptr[int32](2), - // UsedInGB: to.Ptr[int32](1), - // }, - // ProvisioningState: to.Ptr(armappplatform.AppResourceProvisioningStateSucceeded), - // Public: to.Ptr(true), - // TemporaryDisk: &armappplatform.TemporaryDisk{ - // MountPath: to.Ptr("/mytemporarydisk"), - // SizeInGB: to.Ptr[int32](2), - // }, - // URL: to.Ptr("myapp.myservice.private.azuremicroservices.io"), - // VnetAddons: &armappplatform.AppVNetAddons{ - // PublicEndpoint: to.Ptr(true), - // PublicEndpointURL: to.Ptr("myapp.myservice.azuremicroservices.io"), - // }, - // }, - // } + // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Apps_Delete.json func ExampleAppsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -518,8 +208,8 @@ func ExampleAppsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_Update.json -func ExampleAppsClient_BeginUpdate_appsUpdate() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Apps_Update.json +func ExampleAppsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -531,25 +221,12 @@ func ExampleAppsClient_BeginUpdate_appsUpdate() { } poller, err := clientFactory.NewAppsClient().BeginUpdate(ctx, "myResourceGroup", "myservice", "myapp", armappplatform.AppResource{ Identity: &armappplatform.ManagedIdentityProperties{ - Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssignedUserAssigned), - UserAssignedIdentities: map[string]*armappplatform.UserAssignedManagedIdentity{ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {}, - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {}, - }, + Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssigned), }, Location: to.Ptr("eastus"), Properties: &armappplatform.AppResourceProperties{ - CustomPersistentDisks: []*armappplatform.CustomPersistentDiskResource{ - { - CustomPersistentDiskProperties: &armappplatform.AzureFileVolume{ - Type: to.Ptr(armappplatform.TypeAzureFileVolume), - MountOptions: []*string{}, - MountPath: to.Ptr("/mypath1/mypath2"), - ShareName: to.Ptr("myFileShare"), - }, - StorageID: to.Ptr("myASCStorageID"), - }}, EnableEndToEndTLS: to.Ptr(false), + Fqdn: to.Ptr("myapp.mydomain.com"), HTTPSOnly: to.Ptr(false), PersistentDisk: &armappplatform.PersistentDisk{ MountPath: to.Ptr("/mypersistentdisk"), @@ -585,33 +262,12 @@ func ExampleAppsClient_BeginUpdate_appsUpdate() { // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), // }, // Identity: &armappplatform.ManagedIdentityProperties{ - // Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssignedUserAssigned), + // Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssigned), // PrincipalID: to.Ptr("principalid"), // TenantID: to.Ptr("tenantid"), - // UserAssignedIdentities: map[string]*armappplatform.UserAssignedManagedIdentity{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armappplatform.UserAssignedManagedIdentity{ - // ClientID: to.Ptr("clientId1"), - // PrincipalID: to.Ptr("principalId1"), - // }, - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armappplatform.UserAssignedManagedIdentity{ - // ClientID: to.Ptr("clientId2"), - // PrincipalID: to.Ptr("principalId2"), - // }, - // }, // }, // Location: to.Ptr("eastus"), // Properties: &armappplatform.AppResourceProperties{ - // CustomPersistentDisks: []*armappplatform.CustomPersistentDiskResource{ - // { - // CustomPersistentDiskProperties: &armappplatform.AzureFileVolume{ - // Type: to.Ptr(armappplatform.TypeAzureFileVolume), - // MountOptions: []*string{ - // }, - // MountPath: to.Ptr("/mypath1/mypath2"), - // ShareName: to.Ptr("myFileShare"), - // }, - // StorageID: to.Ptr("myASCStorageID"), - // }}, // EnableEndToEndTLS: to.Ptr(false), // Fqdn: to.Ptr("myapp.mydomain.com"), // HTTPSOnly: to.Ptr(false), @@ -631,128 +287,8 @@ func ExampleAppsClient_BeginUpdate_appsUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_Update_VNetInjection.json -func ExampleAppsClient_BeginUpdate_appsUpdateVNetInjection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAppsClient().BeginUpdate(ctx, "myResourceGroup", "myservice", "myapp", armappplatform.AppResource{ - Identity: &armappplatform.ManagedIdentityProperties{ - Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssignedUserAssigned), - UserAssignedIdentities: map[string]*armappplatform.UserAssignedManagedIdentity{ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {}, - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {}, - }, - }, - Location: to.Ptr("eastus"), - Properties: &armappplatform.AppResourceProperties{ - CustomPersistentDisks: []*armappplatform.CustomPersistentDiskResource{ - { - CustomPersistentDiskProperties: &armappplatform.AzureFileVolume{ - Type: to.Ptr(armappplatform.TypeAzureFileVolume), - MountOptions: []*string{}, - MountPath: to.Ptr("/mypath1/mypath2"), - ShareName: to.Ptr("myFileShare"), - }, - StorageID: to.Ptr("myASCStorageID"), - }}, - EnableEndToEndTLS: to.Ptr(false), - HTTPSOnly: to.Ptr(false), - PersistentDisk: &armappplatform.PersistentDisk{ - MountPath: to.Ptr("/mypersistentdisk"), - SizeInGB: to.Ptr[int32](2), - }, - Public: to.Ptr(true), - TemporaryDisk: &armappplatform.TemporaryDisk{ - MountPath: to.Ptr("/mytemporarydisk"), - SizeInGB: to.Ptr[int32](2), - }, - VnetAddons: &armappplatform.AppVNetAddons{ - PublicEndpoint: to.Ptr(true), - }, - }, - }, 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.AppResource = armappplatform.AppResource{ - // Name: to.Ptr("myapp"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/apps"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Identity: &armappplatform.ManagedIdentityProperties{ - // Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssignedUserAssigned), - // PrincipalID: to.Ptr("principalid"), - // TenantID: to.Ptr("tenantid"), - // UserAssignedIdentities: map[string]*armappplatform.UserAssignedManagedIdentity{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armappplatform.UserAssignedManagedIdentity{ - // ClientID: to.Ptr("clientId1"), - // PrincipalID: to.Ptr("principalId1"), - // }, - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armappplatform.UserAssignedManagedIdentity{ - // ClientID: to.Ptr("clientId2"), - // PrincipalID: to.Ptr("principalId2"), - // }, - // }, - // }, - // Location: to.Ptr("eastus"), - // Properties: &armappplatform.AppResourceProperties{ - // CustomPersistentDisks: []*armappplatform.CustomPersistentDiskResource{ - // { - // CustomPersistentDiskProperties: &armappplatform.AzureFileVolume{ - // Type: to.Ptr(armappplatform.TypeAzureFileVolume), - // MountOptions: []*string{ - // }, - // MountPath: to.Ptr("/mypath1/mypath2"), - // ShareName: to.Ptr("myFileShare"), - // }, - // StorageID: to.Ptr("myASCStorageID"), - // }}, - // EnableEndToEndTLS: to.Ptr(false), - // Fqdn: to.Ptr("myapp.private.mydomain.com"), - // HTTPSOnly: to.Ptr(false), - // PersistentDisk: &armappplatform.PersistentDisk{ - // MountPath: to.Ptr("/mypersistentdisk"), - // SizeInGB: to.Ptr[int32](2), - // UsedInGB: to.Ptr[int32](1), - // }, - // ProvisioningState: to.Ptr(armappplatform.AppResourceProvisioningStateSucceeded), - // Public: to.Ptr(true), - // TemporaryDisk: &armappplatform.TemporaryDisk{ - // MountPath: to.Ptr("/mytemporarydisk"), - // SizeInGB: to.Ptr[int32](2), - // }, - // URL: to.Ptr("myapp.myservice.private.azuremicroservices.io"), - // VnetAddons: &armappplatform.AppVNetAddons{ - // PublicEndpoint: to.Ptr(true), - // PublicEndpointURL: to.Ptr("myapp.myservice.azuremicroservices.io"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_List.json -func ExampleAppsClient_NewListPager_appsList() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Apps_List.json +func ExampleAppsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -788,168 +324,43 @@ func ExampleAppsClient_NewListPager_appsList() { // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), // }, // Identity: &armappplatform.ManagedIdentityProperties{ - // Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssignedUserAssigned), + // Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssigned), // PrincipalID: to.Ptr("principalid"), // TenantID: to.Ptr("tenantid"), - // UserAssignedIdentities: map[string]*armappplatform.UserAssignedManagedIdentity{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armappplatform.UserAssignedManagedIdentity{ - // ClientID: to.Ptr("clientId1"), - // PrincipalID: to.Ptr("principalId1"), - // }, - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armappplatform.UserAssignedManagedIdentity{ - // ClientID: to.Ptr("clientId2"), - // PrincipalID: to.Ptr("principalId2"), - // }, - // }, // }, // Location: to.Ptr("eastus"), // Properties: &armappplatform.AppResourceProperties{ - // CustomPersistentDisks: []*armappplatform.CustomPersistentDiskResource{ + // EnableEndToEndTLS: to.Ptr(false), + // Fqdn: to.Ptr("myapp.mydomain.com"), + // HTTPSOnly: to.Ptr(false), + // LoadedCertificates: []*armappplatform.LoadedCertificate{ // { - // CustomPersistentDiskProperties: &armappplatform.AzureFileVolume{ - // Type: to.Ptr(armappplatform.TypeAzureFileVolume), - // MountOptions: []*string{ - // to.Ptr("uid=0"), - // to.Ptr("gid=0"), - // to.Ptr("dir_mode=0777"), - // to.Ptr("file_mode=0777")}, - // MountPath: to.Ptr("/mypath1/mypath2"), - // ShareName: to.Ptr("myFileShare"), - // }, - // StorageID: to.Ptr("myASCStorageID"), - // }}, - // EnableEndToEndTLS: to.Ptr(false), - // Fqdn: to.Ptr("myapp.mydomain.com"), - // HTTPSOnly: to.Ptr(false), - // LoadedCertificates: []*armappplatform.LoadedCertificate{ - // { - // LoadTrustStore: to.Ptr(false), - // ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert1"), - // }, - // { - // LoadTrustStore: to.Ptr(true), - // ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert2"), - // }}, - // PersistentDisk: &armappplatform.PersistentDisk{ - // MountPath: to.Ptr("/mypersistentdisk"), - // SizeInGB: to.Ptr[int32](2), - // UsedInGB: to.Ptr[int32](1), - // }, - // ProvisioningState: to.Ptr(armappplatform.AppResourceProvisioningStateSucceeded), - // Public: to.Ptr(true), - // TemporaryDisk: &armappplatform.TemporaryDisk{ - // MountPath: to.Ptr("/mytemporarydisk"), - // SizeInGB: to.Ptr[int32](2), + // LoadTrustStore: to.Ptr(false), + // ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert1"), // }, - // URL: to.Ptr("myapp.myservice.azuremicroservices.io"), + // { + // LoadTrustStore: to.Ptr(true), + // ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert2"), + // }}, + // PersistentDisk: &armappplatform.PersistentDisk{ + // MountPath: to.Ptr("/mypersistentdisk"), + // SizeInGB: to.Ptr[int32](2), + // UsedInGB: to.Ptr[int32](1), // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_List_VNetInjection.json -func ExampleAppsClient_NewListPager_appsListVNetInjection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewAppsClient().NewListPager("myResourceGroup", "myservice", 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.AppResourceCollection = armappplatform.AppResourceCollection{ - // Value: []*armappplatform.AppResource{ - // { - // Name: to.Ptr("myapp"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/apps"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Identity: &armappplatform.ManagedIdentityProperties{ - // Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssignedUserAssigned), - // PrincipalID: to.Ptr("principalid"), - // TenantID: to.Ptr("tenantid"), - // UserAssignedIdentities: map[string]*armappplatform.UserAssignedManagedIdentity{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armappplatform.UserAssignedManagedIdentity{ - // ClientID: to.Ptr("clientId1"), - // PrincipalID: to.Ptr("principalId1"), - // }, - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armappplatform.UserAssignedManagedIdentity{ - // ClientID: to.Ptr("clientId2"), - // PrincipalID: to.Ptr("principalId2"), - // }, + // ProvisioningState: to.Ptr(armappplatform.AppResourceProvisioningStateSucceeded), + // Public: to.Ptr(true), + // TemporaryDisk: &armappplatform.TemporaryDisk{ + // MountPath: to.Ptr("/mytemporarydisk"), + // SizeInGB: to.Ptr[int32](2), // }, + // URL: to.Ptr("myapp.myservice.azuremicroservices.io"), // }, - // Location: to.Ptr("eastus"), - // Properties: &armappplatform.AppResourceProperties{ - // CustomPersistentDisks: []*armappplatform.CustomPersistentDiskResource{ - // { - // CustomPersistentDiskProperties: &armappplatform.AzureFileVolume{ - // Type: to.Ptr(armappplatform.TypeAzureFileVolume), - // MountOptions: []*string{ - // to.Ptr("uid=0"), - // to.Ptr("gid=0"), - // to.Ptr("dir_mode=0777"), - // to.Ptr("file_mode=0777")}, - // MountPath: to.Ptr("/mypath1/mypath2"), - // ShareName: to.Ptr("myFileShare"), - // }, - // StorageID: to.Ptr("myASCStorageID"), - // }}, - // EnableEndToEndTLS: to.Ptr(false), - // Fqdn: to.Ptr("myapp.mydomain.com"), - // HTTPSOnly: to.Ptr(false), - // LoadedCertificates: []*armappplatform.LoadedCertificate{ - // { - // LoadTrustStore: to.Ptr(false), - // ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert1"), - // }, - // { - // LoadTrustStore: to.Ptr(true), - // ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert2"), - // }}, - // PersistentDisk: &armappplatform.PersistentDisk{ - // MountPath: to.Ptr("/mypersistentdisk"), - // SizeInGB: to.Ptr[int32](2), - // UsedInGB: to.Ptr[int32](1), - // }, - // ProvisioningState: to.Ptr(armappplatform.AppResourceProvisioningStateSucceeded), - // Public: to.Ptr(true), - // TemporaryDisk: &armappplatform.TemporaryDisk{ - // MountPath: to.Ptr("/mytemporarydisk"), - // SizeInGB: to.Ptr[int32](2), - // }, - // URL: to.Ptr("myapp.myservice.private.azuremicroservices.io"), - // VnetAddons: &armappplatform.AppVNetAddons{ - // PublicEndpoint: to.Ptr(true), - // PublicEndpointURL: to.Ptr("myapp.myservice.azuremicroservices.io"), - // }, - // }, - // }}, - // } + // }}, + // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_GetResourceUploadUrl.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Apps_GetResourceUploadUrl.json func ExampleAppsClient_GetResourceUploadURL() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -973,7 +384,7 @@ func ExampleAppsClient_GetResourceUploadURL() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_SetActiveDeployments.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Apps_SetActiveDeployments.json func ExampleAppsClient_BeginSetActiveDeployments() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1011,33 +422,12 @@ func ExampleAppsClient_BeginSetActiveDeployments() { // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), // }, // Identity: &armappplatform.ManagedIdentityProperties{ - // Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssignedUserAssigned), + // Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssigned), // PrincipalID: to.Ptr("principalid"), // TenantID: to.Ptr("tenantid"), - // UserAssignedIdentities: map[string]*armappplatform.UserAssignedManagedIdentity{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armappplatform.UserAssignedManagedIdentity{ - // ClientID: to.Ptr("clientId1"), - // PrincipalID: to.Ptr("principalId1"), - // }, - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armappplatform.UserAssignedManagedIdentity{ - // ClientID: to.Ptr("clientId2"), - // PrincipalID: to.Ptr("principalId2"), - // }, - // }, // }, // Location: to.Ptr("eastus"), // Properties: &armappplatform.AppResourceProperties{ - // CustomPersistentDisks: []*armappplatform.CustomPersistentDiskResource{ - // { - // CustomPersistentDiskProperties: &armappplatform.AzureFileVolume{ - // Type: to.Ptr(armappplatform.TypeAzureFileVolume), - // MountOptions: []*string{ - // }, - // MountPath: to.Ptr("/mypath1/mypath2"), - // ShareName: to.Ptr("myFileShare"), - // }, - // StorageID: to.Ptr("myASCStorageID"), - // }}, // EnableEndToEndTLS: to.Ptr(false), // Fqdn: to.Ptr("myapp.mydomain.com"), // HTTPSOnly: to.Ptr(false), @@ -1057,7 +447,7 @@ func ExampleAppsClient_BeginSetActiveDeployments() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_ValidateDomain.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Apps_ValidateDomain.json func ExampleAppsClient_ValidateDomain() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appplatform/armappplatform/autorest.md b/sdk/resourcemanager/appplatform/armappplatform/autorest.md index 7da26b1e5b53..5c73ca91f9a9 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/autorest.md +++ b/sdk/resourcemanager/appplatform/armappplatform/autorest.md @@ -5,8 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.0-beta.3 +module-version: 1.1.0 +tag: package-2022-04 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/appplatform/armappplatform/bindings_client.go b/sdk/resourcemanager/appplatform/armappplatform/bindings_client.go index b1db57d1b3f6..9923b414446a 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/bindings_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/bindings_client.go @@ -48,7 +48,7 @@ func NewBindingsClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreateOrUpdate - Create a new Binding or update an exiting Binding. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -63,7 +63,9 @@ func (client *BindingsClient) BeginCreateOrUpdate(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller[BindingsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BindingsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[BindingsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -72,7 +74,7 @@ func (client *BindingsClient) BeginCreateOrUpdate(ctx context.Context, resourceG // CreateOrUpdate - Create a new Binding or update an exiting Binding. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *BindingsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource, options *BindingsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, appName, bindingName, bindingResource, options) if err != nil { @@ -116,7 +118,7 @@ func (client *BindingsClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, bindingResource) @@ -125,7 +127,7 @@ func (client *BindingsClient) createOrUpdateCreateRequest(ctx context.Context, r // BeginDelete - Operation to delete a Binding. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -138,7 +140,9 @@ func (client *BindingsClient) BeginDelete(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[BindingsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BindingsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[BindingsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -147,7 +151,7 @@ func (client *BindingsClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Operation to delete a Binding. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *BindingsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, options *BindingsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, appName, bindingName, options) if err != nil { @@ -191,7 +195,7 @@ func (client *BindingsClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -200,7 +204,7 @@ func (client *BindingsClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Get a Binding and its properties. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -250,7 +254,7 @@ func (client *BindingsClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -267,7 +271,7 @@ func (client *BindingsClient) getHandleResponse(resp *http.Response) (BindingsCl // NewListPager - Handles requests to list all resources in an App. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -325,7 +329,7 @@ func (client *BindingsClient) listCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -343,7 +347,7 @@ func (client *BindingsClient) listHandleResponse(resp *http.Response) (BindingsC // BeginUpdate - Operation to update an exiting Binding. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -357,7 +361,9 @@ func (client *BindingsClient) BeginUpdate(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[BindingsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BindingsClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[BindingsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -366,7 +372,7 @@ func (client *BindingsClient) BeginUpdate(ctx context.Context, resourceGroupName // Update - Operation to update an exiting Binding. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *BindingsClient) update(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource, options *BindingsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, appName, bindingName, bindingResource, options) if err != nil { @@ -410,7 +416,7 @@ func (client *BindingsClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, bindingResource) diff --git a/sdk/resourcemanager/appplatform/armappplatform/bindings_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/bindings_client_example_test.go index 542651e9acd2..1acb793a92c9 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/bindings_client_example_test.go +++ b/sdk/resourcemanager/appplatform/armappplatform/bindings_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Bindings_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Bindings_Get.json func ExampleBindingsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -63,7 +63,7 @@ func ExampleBindingsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Bindings_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Bindings_CreateOrUpdate.json func ExampleBindingsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -121,7 +121,7 @@ func ExampleBindingsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Bindings_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Bindings_Delete.json func ExampleBindingsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -142,7 +142,7 @@ func ExampleBindingsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Bindings_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Bindings_Update.json func ExampleBindingsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -199,7 +199,7 @@ func ExampleBindingsClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Bindings_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Bindings_List.json func ExampleBindingsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appplatform/armappplatform/buildpackbinding_client.go b/sdk/resourcemanager/appplatform/armappplatform/buildpackbinding_client.go index 20b17b3427c4..56532d7be9e1 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/buildpackbinding_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/buildpackbinding_client.go @@ -48,7 +48,7 @@ func NewBuildpackBindingClient(subscriptionID string, credential azcore.TokenCre // BeginCreateOrUpdate - Create or update a buildpack binding. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -64,7 +64,9 @@ func (client *BuildpackBindingClient) BeginCreateOrUpdate(ctx context.Context, r if err != nil { return nil, err } - return runtime.NewPoller[BuildpackBindingClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BuildpackBindingClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[BuildpackBindingClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -73,7 +75,7 @@ func (client *BuildpackBindingClient) BeginCreateOrUpdate(ctx context.Context, r // CreateOrUpdate - Create or update a buildpack binding. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *BuildpackBindingClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, buildpackBinding BuildpackBindingResource, options *BuildpackBindingClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName, buildpackBinding, options) if err != nil { @@ -121,7 +123,7 @@ func (client *BuildpackBindingClient) createOrUpdateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, buildpackBinding) @@ -130,7 +132,7 @@ func (client *BuildpackBindingClient) createOrUpdateCreateRequest(ctx context.Co // BeginDelete - Operation to delete a Buildpack Binding // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -145,7 +147,9 @@ func (client *BuildpackBindingClient) BeginDelete(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller[BuildpackBindingClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BuildpackBindingClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[BuildpackBindingClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -154,7 +158,7 @@ func (client *BuildpackBindingClient) BeginDelete(ctx context.Context, resourceG // Delete - Operation to delete a Buildpack Binding // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *BuildpackBindingClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, options *BuildpackBindingClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName, options) if err != nil { @@ -202,7 +206,7 @@ func (client *BuildpackBindingClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -211,7 +215,7 @@ func (client *BuildpackBindingClient) deleteCreateRequest(ctx context.Context, r // Get - Get a buildpack binding by name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -266,7 +270,7 @@ func (client *BuildpackBindingClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -283,7 +287,7 @@ func (client *BuildpackBindingClient) getHandleResponse(resp *http.Response) (Bu // NewListPager - Handles requests to list all buildpack bindings in a builder. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -347,7 +351,7 @@ func (client *BuildpackBindingClient) listCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appplatform/armappplatform/buildpackbinding_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/buildpackbinding_client_example_test.go index b2ffe074c838..6ec09ae65f0b 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/buildpackbinding_client_example_test.go +++ b/sdk/resourcemanager/appplatform/armappplatform/buildpackbinding_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildpackBinding_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildpackBinding_Get.json func ExampleBuildpackBindingClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -64,7 +64,7 @@ func ExampleBuildpackBindingClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildpackBinding_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildpackBinding_CreateOrUpdate.json func ExampleBuildpackBindingClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -128,7 +128,7 @@ func ExampleBuildpackBindingClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildpackBinding_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildpackBinding_Delete.json func ExampleBuildpackBindingClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -149,7 +149,7 @@ func ExampleBuildpackBindingClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildpackBinding_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildpackBinding_List.json func ExampleBuildpackBindingClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appplatform/armappplatform/buildservice_client.go b/sdk/resourcemanager/appplatform/armappplatform/buildservice_client.go index 0db7a93d52da..19bd6279153a 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/buildservice_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/buildservice_client.go @@ -48,7 +48,7 @@ func NewBuildServiceClient(subscriptionID string, credential azcore.TokenCredent // CreateOrUpdateBuild - Create or update a KPack build. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -100,7 +100,7 @@ func (client *BuildServiceClient) createOrUpdateBuildCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, buildParam) @@ -118,7 +118,7 @@ func (client *BuildServiceClient) createOrUpdateBuildHandleResponse(resp *http.R // GetBuild - Get a KPack build. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -168,7 +168,7 @@ func (client *BuildServiceClient) getBuildCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -186,7 +186,7 @@ func (client *BuildServiceClient) getBuildHandleResponse(resp *http.Response) (B // GetBuildResult - Get a KPack build result. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -242,7 +242,7 @@ func (client *BuildServiceClient) getBuildResultCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -260,7 +260,7 @@ func (client *BuildServiceClient) getBuildResultHandleResponse(resp *http.Respon // GetBuildResultLog - Get a KPack build result log download URL. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -316,7 +316,7 @@ func (client *BuildServiceClient) getBuildResultLogCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -334,7 +334,7 @@ func (client *BuildServiceClient) getBuildResultLogHandleResponse(resp *http.Res // GetBuildService - Get a build service resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -380,7 +380,7 @@ func (client *BuildServiceClient) getBuildServiceCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -398,7 +398,7 @@ func (client *BuildServiceClient) getBuildServiceHandleResponse(resp *http.Respo // GetResourceUploadURL - Get an resource upload URL for build service, which may be artifacts or source archive. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -444,7 +444,7 @@ func (client *BuildServiceClient) getResourceUploadURLCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -462,7 +462,7 @@ func (client *BuildServiceClient) getResourceUploadURLHandleResponse(resp *http. // GetSupportedBuildpack - Get the supported buildpack resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -513,7 +513,7 @@ func (client *BuildServiceClient) getSupportedBuildpackCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -531,7 +531,7 @@ func (client *BuildServiceClient) getSupportedBuildpackHandleResponse(resp *http // GetSupportedStack - Get the supported stack resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -582,7 +582,7 @@ func (client *BuildServiceClient) getSupportedStackCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -599,7 +599,7 @@ func (client *BuildServiceClient) getSupportedStackHandleResponse(resp *http.Res // NewListBuildResultsPager - List KPack build results. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -663,7 +663,7 @@ func (client *BuildServiceClient) listBuildResultsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -680,7 +680,7 @@ func (client *BuildServiceClient) listBuildResultsHandleResponse(resp *http.Resp // NewListBuildServicesPager - List build services resource. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -734,7 +734,7 @@ func (client *BuildServiceClient) listBuildServicesCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -751,7 +751,7 @@ func (client *BuildServiceClient) listBuildServicesHandleResponse(resp *http.Res // NewListBuildsPager - List KPack builds. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -810,7 +810,7 @@ func (client *BuildServiceClient) listBuildsCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -828,7 +828,7 @@ func (client *BuildServiceClient) listBuildsHandleResponse(resp *http.Response) // ListSupportedBuildpacks - Get all supported buildpacks. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -874,7 +874,7 @@ func (client *BuildServiceClient) listSupportedBuildpacksCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -892,7 +892,7 @@ func (client *BuildServiceClient) listSupportedBuildpacksHandleResponse(resp *ht // ListSupportedStacks - Get all supported stacks. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -938,7 +938,7 @@ func (client *BuildServiceClient) listSupportedStacksCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appplatform/armappplatform/buildservice_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/buildservice_client_example_test.go index 4793a67a3478..a4289d200748 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/buildservice_client_example_test.go +++ b/sdk/resourcemanager/appplatform/armappplatform/buildservice_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_ListBuildServices.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_ListBuildServices.json func ExampleBuildServiceClient_NewListBuildServicesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -67,7 +67,7 @@ func ExampleBuildServiceClient_NewListBuildServicesPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_GetBuildService.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_GetBuildService.json func ExampleBuildServiceClient_GetBuildService() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -108,7 +108,7 @@ func ExampleBuildServiceClient_GetBuildService() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_ListBuilds.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_ListBuilds.json func ExampleBuildServiceClient_NewListBuildsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -152,17 +152,13 @@ func ExampleBuildServiceClient_NewListBuildsPager() { // }, // ProvisioningState: to.Ptr(armappplatform.BuildProvisioningStateSucceeded), // RelativePath: to.Ptr("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855-20210601-3ed9f4a2-986b-4bbd-b833-a42dccb2f777"), - // ResourceRequests: &armappplatform.BuildResourceRequests{ - // CPU: to.Ptr("1"), - // Memory: to.Ptr("2Gi"), - // }, // }, // }}, // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_GetBuild.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_GetBuild.json func ExampleBuildServiceClient_GetBuild() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -200,15 +196,11 @@ func ExampleBuildServiceClient_GetBuild() { // }, // ProvisioningState: to.Ptr(armappplatform.BuildProvisioningStateSucceeded), // RelativePath: to.Ptr("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855-20210601-3ed9f4a2-986b-4bbd-b833-a42dccb2f777"), - // ResourceRequests: &armappplatform.BuildResourceRequests{ - // CPU: to.Ptr("1"), - // Memory: to.Ptr("2Gi"), - // }, // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_CreateOrUpdateBuild.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_CreateOrUpdateBuild.json func ExampleBuildServiceClient_CreateOrUpdateBuild() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -227,10 +219,6 @@ func ExampleBuildServiceClient_CreateOrUpdateBuild() { "environmentVariable": to.Ptr("test"), }, RelativePath: to.Ptr("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855-20210601-3ed9f4a2-986b-4bbd-b833-a42dccb2f777"), - ResourceRequests: &armappplatform.BuildResourceRequests{ - CPU: to.Ptr("1"), - Memory: to.Ptr("2Gi"), - }, }, }, nil) if err != nil { @@ -259,15 +247,11 @@ func ExampleBuildServiceClient_CreateOrUpdateBuild() { // }, // ProvisioningState: to.Ptr(armappplatform.BuildProvisioningStateSucceeded), // RelativePath: to.Ptr("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855-20210601-3ed9f4a2-986b-4bbd-b833-a42dccb2f777"), - // ResourceRequests: &armappplatform.BuildResourceRequests{ - // CPU: to.Ptr("1"), - // Memory: to.Ptr("2Gi"), - // }, // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_ListBuildResults.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_ListBuildResults.json func ExampleBuildServiceClient_NewListBuildResultsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -309,43 +293,28 @@ func ExampleBuildServiceClient_NewListBuildResultsPager() { // BuildStages: []*armappplatform.BuildStageProperties{ // { // Name: to.Ptr("prepare"), - // ExitCode: to.Ptr("0"), - // Reason: to.Ptr("Completed"), - // Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateSucceeded), + // Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateRunning), // }, // { // Name: to.Ptr("detect"), - // ExitCode: to.Ptr("0"), - // Reason: to.Ptr("Completed"), - // Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateSucceeded), + // Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateNotStarted), // }, // { // Name: to.Ptr("analyze"), - // ExitCode: to.Ptr("0"), - // Reason: to.Ptr("Completed"), - // Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateSucceeded), + // Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateNotStarted), // }, // { // Name: to.Ptr("restore"), - // ExitCode: to.Ptr("0"), - // Reason: to.Ptr("Completed"), - // Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateSucceeded), + // Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateNotStarted), // }, // { // Name: to.Ptr("build"), - // ExitCode: to.Ptr("51"), - // Reason: to.Ptr("Error"), - // Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateFailed), + // Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateNotStarted), // }, // { // Name: to.Ptr("export"), - // ExitCode: to.Ptr("-1"), // Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateNotStarted), // }}, - // Error: &armappplatform.Error{ - // Code: to.Ptr("51"), - // Message: to.Ptr("Build failed in stage build with reason OOMKilled, please refer to https://aka.ms/buildexitcode"), - // }, // ProvisioningState: to.Ptr(armappplatform.BuildResultProvisioningStateSucceeded), // }, // }}, @@ -353,7 +322,7 @@ func ExampleBuildServiceClient_NewListBuildResultsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_GetBuildResult.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_GetBuildResult.json func ExampleBuildServiceClient_GetBuildResult() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -389,49 +358,34 @@ func ExampleBuildServiceClient_GetBuildResult() { // BuildStages: []*armappplatform.BuildStageProperties{ // { // Name: to.Ptr("prepare"), - // ExitCode: to.Ptr("0"), - // Reason: to.Ptr("Completed"), - // Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateSucceeded), + // Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateRunning), // }, // { // Name: to.Ptr("detect"), - // ExitCode: to.Ptr("0"), - // Reason: to.Ptr("Completed"), - // Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateSucceeded), + // Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateNotStarted), // }, // { // Name: to.Ptr("analyze"), - // ExitCode: to.Ptr("0"), - // Reason: to.Ptr("Completed"), - // Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateSucceeded), + // Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateNotStarted), // }, // { // Name: to.Ptr("restore"), - // ExitCode: to.Ptr("0"), - // Reason: to.Ptr("Completed"), - // Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateSucceeded), + // Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateNotStarted), // }, // { // Name: to.Ptr("build"), - // ExitCode: to.Ptr("51"), - // Reason: to.Ptr("Error"), - // Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateFailed), + // Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateNotStarted), // }, // { // Name: to.Ptr("export"), - // ExitCode: to.Ptr("-1"), // Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateNotStarted), // }}, - // Error: &armappplatform.Error{ - // Code: to.Ptr("51"), - // Message: to.Ptr("Build failed in stage build with reason OOMKilled, please refer to https://aka.ms/buildexitcode"), - // }, // ProvisioningState: to.Ptr(armappplatform.BuildResultProvisioningStateSucceeded), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_GetBuildResultLog.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_GetBuildResultLog.json func ExampleBuildServiceClient_GetBuildResultLog() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -454,7 +408,7 @@ func ExampleBuildServiceClient_GetBuildResultLog() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_GetResourceUploadUrl.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_GetResourceUploadUrl.json func ExampleBuildServiceClient_GetResourceUploadURL() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -478,7 +432,7 @@ func ExampleBuildServiceClient_GetResourceUploadURL() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_ListSupportedBuildpacks.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_ListSupportedBuildpacks.json func ExampleBuildServiceClient_ListSupportedBuildpacks() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -517,7 +471,7 @@ func ExampleBuildServiceClient_ListSupportedBuildpacks() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_GetSupportedBuildpack.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_GetSupportedBuildpack.json func ExampleBuildServiceClient_GetSupportedBuildpack() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -553,7 +507,7 @@ func ExampleBuildServiceClient_GetSupportedBuildpack() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_ListSupportedStacks.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_ListSupportedStacks.json func ExampleBuildServiceClient_ListSupportedStacks() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -593,7 +547,7 @@ func ExampleBuildServiceClient_ListSupportedStacks() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_GetSupportedStack.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_GetSupportedStack.json func ExampleBuildServiceClient_GetSupportedStack() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appplatform/armappplatform/buildserviceagentpool_client.go b/sdk/resourcemanager/appplatform/armappplatform/buildserviceagentpool_client.go index 669c0ff8f011..f8b3896b8e6c 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/buildserviceagentpool_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/buildserviceagentpool_client.go @@ -48,7 +48,7 @@ func NewBuildServiceAgentPoolClient(subscriptionID string, credential azcore.Tok // Get - Get build service agent pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -99,7 +99,7 @@ func (client *BuildServiceAgentPoolClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -116,7 +116,7 @@ func (client *BuildServiceAgentPoolClient) getHandleResponse(resp *http.Response // NewListPager - List build service agent pool. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -175,7 +175,7 @@ func (client *BuildServiceAgentPoolClient) listCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -193,7 +193,7 @@ func (client *BuildServiceAgentPoolClient) listHandleResponse(resp *http.Respons // BeginUpdatePut - Create or update build service agent pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -208,7 +208,9 @@ func (client *BuildServiceAgentPoolClient) BeginUpdatePut(ctx context.Context, r if err != nil { return nil, err } - return runtime.NewPoller[BuildServiceAgentPoolClientUpdatePutResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BuildServiceAgentPoolClientUpdatePutResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[BuildServiceAgentPoolClientUpdatePutResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -217,7 +219,7 @@ func (client *BuildServiceAgentPoolClient) BeginUpdatePut(ctx context.Context, r // UpdatePut - Create or update build service agent pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *BuildServiceAgentPoolClient) updatePut(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, agentPoolName string, agentPoolResource BuildServiceAgentPoolResource, options *BuildServiceAgentPoolClientBeginUpdatePutOptions) (*http.Response, error) { req, err := client.updatePutCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, agentPoolName, agentPoolResource, options) if err != nil { @@ -261,7 +263,7 @@ func (client *BuildServiceAgentPoolClient) updatePutCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, agentPoolResource) diff --git a/sdk/resourcemanager/appplatform/armappplatform/buildserviceagentpool_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/buildserviceagentpool_client_example_test.go index 4c70f6cb8efc..dd358e9d17a6 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/buildserviceagentpool_client_example_test.go +++ b/sdk/resourcemanager/appplatform/armappplatform/buildserviceagentpool_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildServiceAgentPool_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildServiceAgentPool_List.json func ExampleBuildServiceAgentPoolClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -67,7 +67,7 @@ func ExampleBuildServiceAgentPoolClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildServiceAgentPool_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildServiceAgentPool_Get.json func ExampleBuildServiceAgentPoolClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -108,7 +108,7 @@ func ExampleBuildServiceAgentPoolClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildServiceAgentPool_UpdatePut.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildServiceAgentPool_UpdatePut.json func ExampleBuildServiceAgentPoolClient_BeginUpdatePut() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appplatform/armappplatform/buildservicebuilder_client.go b/sdk/resourcemanager/appplatform/armappplatform/buildservicebuilder_client.go index 65e4c3e6a818..5b4ce6bff2c4 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/buildservicebuilder_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/buildservicebuilder_client.go @@ -48,7 +48,7 @@ func NewBuildServiceBuilderClient(subscriptionID string, credential azcore.Token // BeginCreateOrUpdate - Create or update a KPack builder. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -63,7 +63,9 @@ func (client *BuildServiceBuilderClient) BeginCreateOrUpdate(ctx context.Context if err != nil { return nil, err } - return runtime.NewPoller[BuildServiceBuilderClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BuildServiceBuilderClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[BuildServiceBuilderClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -72,7 +74,7 @@ func (client *BuildServiceBuilderClient) BeginCreateOrUpdate(ctx context.Context // CreateOrUpdate - Create or update a KPack builder. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *BuildServiceBuilderClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, builderResource BuilderResource, options *BuildServiceBuilderClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, builderResource, options) if err != nil { @@ -116,7 +118,7 @@ func (client *BuildServiceBuilderClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, builderResource) @@ -125,7 +127,7 @@ func (client *BuildServiceBuilderClient) createOrUpdateCreateRequest(ctx context // BeginDelete - Delete a KPack builder. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -139,7 +141,9 @@ func (client *BuildServiceBuilderClient) BeginDelete(ctx context.Context, resour if err != nil { return nil, err } - return runtime.NewPoller[BuildServiceBuilderClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BuildServiceBuilderClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[BuildServiceBuilderClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -148,7 +152,7 @@ func (client *BuildServiceBuilderClient) BeginDelete(ctx context.Context, resour // Delete - Delete a KPack builder. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *BuildServiceBuilderClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildServiceBuilderClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, options) if err != nil { @@ -192,7 +196,7 @@ func (client *BuildServiceBuilderClient) deleteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -201,7 +205,7 @@ func (client *BuildServiceBuilderClient) deleteCreateRequest(ctx context.Context // Get - Get a KPack builder. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -251,7 +255,7 @@ func (client *BuildServiceBuilderClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -268,7 +272,7 @@ func (client *BuildServiceBuilderClient) getHandleResponse(resp *http.Response) // NewListPager - List KPack builders result. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -327,7 +331,7 @@ func (client *BuildServiceBuilderClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -341,72 +345,3 @@ func (client *BuildServiceBuilderClient) listHandleResponse(resp *http.Response) } return result, nil } - -// ListDeployments - List deployments that are using the builder. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - buildServiceName - The name of the build service resource. -// - builderName - The name of the builder resource. -// - options - BuildServiceBuilderClientListDeploymentsOptions contains the optional parameters for the BuildServiceBuilderClient.ListDeployments -// method. -func (client *BuildServiceBuilderClient) ListDeployments(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildServiceBuilderClientListDeploymentsOptions) (BuildServiceBuilderClientListDeploymentsResponse, error) { - req, err := client.listDeploymentsCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, options) - if err != nil { - return BuildServiceBuilderClientListDeploymentsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return BuildServiceBuilderClientListDeploymentsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BuildServiceBuilderClientListDeploymentsResponse{}, runtime.NewResponseError(resp) - } - return client.listDeploymentsHandleResponse(resp) -} - -// listDeploymentsCreateRequest creates the ListDeployments request. -func (client *BuildServiceBuilderClient) listDeploymentsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildServiceBuilderClientListDeploymentsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/listUsingDeployments" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if buildServiceName == "" { - return nil, errors.New("parameter buildServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) - if builderName == "" { - return nil, errors.New("parameter builderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listDeploymentsHandleResponse handles the ListDeployments response. -func (client *BuildServiceBuilderClient) listDeploymentsHandleResponse(resp *http.Response) (BuildServiceBuilderClientListDeploymentsResponse, error) { - result := BuildServiceBuilderClientListDeploymentsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DeploymentList); err != nil { - return BuildServiceBuilderClientListDeploymentsResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/buildservicebuilder_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/buildservicebuilder_client_example_test.go index f5f32dc9ec52..66033a13bdf5 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/buildservicebuilder_client_example_test.go +++ b/sdk/resourcemanager/appplatform/armappplatform/buildservicebuilder_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildServiceBuilder_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildServiceBuilder_Get.json func ExampleBuildServiceBuilderClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -66,7 +66,7 @@ func ExampleBuildServiceBuilderClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildServiceBuilder_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildServiceBuilder_CreateOrUpdate.json func ExampleBuildServiceBuilderClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -136,7 +136,7 @@ func ExampleBuildServiceBuilderClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildServiceBuilder_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildServiceBuilder_Delete.json func ExampleBuildServiceBuilderClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -157,7 +157,7 @@ func ExampleBuildServiceBuilderClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildServiceBuilder_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildServiceBuilder_List.json func ExampleBuildServiceBuilderClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -212,28 +212,3 @@ func ExampleBuildServiceBuilderClient_NewListPager() { // } } } - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildServiceBuilder_ListDeployments.json -func ExampleBuildServiceBuilderClient_ListDeployments() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBuildServiceBuilderClient().ListDeployments(ctx, "myResourceGroup", "myservice", "default", "default", 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.DeploymentList = armappplatform.DeploymentList{ - // Deployments: []*string{ - // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/test/deployments/default"), - // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/test/deployments/green")}, - // } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/certificates_client.go b/sdk/resourcemanager/appplatform/armappplatform/certificates_client.go index 55b83f1cef25..79a70bf0100e 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/certificates_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/certificates_client.go @@ -48,7 +48,7 @@ func NewCertificatesClient(subscriptionID string, credential azcore.TokenCredent // BeginCreateOrUpdate - Create or update certificate resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -62,7 +62,9 @@ func (client *CertificatesClient) BeginCreateOrUpdate(ctx context.Context, resou if err != nil { return nil, err } - return runtime.NewPoller[CertificatesClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CertificatesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[CertificatesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -71,7 +73,7 @@ func (client *CertificatesClient) BeginCreateOrUpdate(ctx context.Context, resou // CreateOrUpdate - Create or update certificate resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *CertificatesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, certificateResource CertificateResource, options *CertificatesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, certificateName, certificateResource, options) if err != nil { @@ -111,7 +113,7 @@ func (client *CertificatesClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, certificateResource) @@ -120,7 +122,7 @@ func (client *CertificatesClient) createOrUpdateCreateRequest(ctx context.Contex // BeginDelete - Delete the certificate resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -133,7 +135,9 @@ func (client *CertificatesClient) BeginDelete(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller[CertificatesClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CertificatesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[CertificatesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -142,7 +146,7 @@ func (client *CertificatesClient) BeginDelete(ctx context.Context, resourceGroup // Delete - Delete the certificate resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *CertificatesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, options *CertificatesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, certificateName, options) if err != nil { @@ -182,7 +186,7 @@ func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -191,7 +195,7 @@ func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resou // Get - Get the certificate resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -236,7 +240,7 @@ func (client *CertificatesClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -253,7 +257,7 @@ func (client *CertificatesClient) getHandleResponse(resp *http.Response) (Certif // NewListPager - List all the certificates of one user. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -306,7 +310,7 @@ func (client *CertificatesClient) listCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appplatform/armappplatform/certificates_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/certificates_client_example_test.go index 7f737577d625..674dc224c0fe 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/certificates_client_example_test.go +++ b/sdk/resourcemanager/appplatform/armappplatform/certificates_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Certificates_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Certificates_Get.json func ExampleCertificatesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -58,7 +58,6 @@ func ExampleCertificatesClient_Get() { // ExpirationDate: to.Ptr("2019-02-21T07:40:42Z"), // IssuedDate: to.Ptr("2019-02-20T07:40:42Z"), // Issuer: to.Ptr("mydomain.com"), - // ProvisioningState: to.Ptr(armappplatform.CertificateResourceProvisioningStateSucceeded), // SubjectName: to.Ptr("mysubjectname"), // Thumbprint: to.Ptr("934367bf1c97033f877db0f15cb1b586957d3133"), // CertVersion: to.Ptr("08a219d06d874795a96db47e06fbb01e"), @@ -69,7 +68,7 @@ func ExampleCertificatesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Certificates_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Certificates_CreateOrUpdate.json func ExampleCertificatesClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -130,7 +129,7 @@ func ExampleCertificatesClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Certificates_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Certificates_Delete.json func ExampleCertificatesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -151,7 +150,7 @@ func ExampleCertificatesClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Certificates_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Certificates_List.json func ExampleCertificatesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -197,7 +196,6 @@ func ExampleCertificatesClient_NewListPager() { // ExpirationDate: to.Ptr("2019-02-21T07:40:42Z"), // IssuedDate: to.Ptr("2019-02-20T07:40:42Z"), // Issuer: to.Ptr("mydomain.com"), - // ProvisioningState: to.Ptr(armappplatform.CertificateResourceProvisioningStateSucceeded), // SubjectName: to.Ptr("mysubjectname"), // Thumbprint: to.Ptr("934367bf1c97033f877db0f15cb1b586957d3133"), // CertVersion: to.Ptr("08a219d06d874795a96db47e06fbb01e"), diff --git a/sdk/resourcemanager/appplatform/armappplatform/client_factory.go b/sdk/resourcemanager/appplatform/armappplatform/client_factory.go index 1f68b46b9274..6480dc6e8df5 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/client_factory.go +++ b/sdk/resourcemanager/appplatform/armappplatform/client_factory.go @@ -59,16 +59,6 @@ func (c *ClientFactory) NewServiceRegistriesClient() *ServiceRegistriesClient { return subClient } -func (c *ClientFactory) NewApplicationLiveViewsClient() *ApplicationLiveViewsClient { - subClient, _ := NewApplicationLiveViewsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewDevToolPortalsClient() *DevToolPortalsClient { - subClient, _ := NewDevToolPortalsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - func (c *ClientFactory) NewBuildServiceClient() *BuildServiceClient { subClient, _ := NewBuildServiceClient(c.subscriptionID, c.credential, c.options) return subClient @@ -104,11 +94,6 @@ func (c *ClientFactory) NewBindingsClient() *BindingsClient { return subClient } -func (c *ClientFactory) NewStoragesClient() *StoragesClient { - subClient, _ := NewStoragesClient(c.subscriptionID, c.credential, c.options) - return subClient -} - func (c *ClientFactory) NewCertificatesClient() *CertificatesClient { subClient, _ := NewCertificatesClient(c.subscriptionID, c.credential, c.options) return subClient @@ -138,43 +123,3 @@ func (c *ClientFactory) NewSKUsClient() *SKUsClient { subClient, _ := NewSKUsClient(c.subscriptionID, c.credential, c.options) return subClient } - -func (c *ClientFactory) NewGatewaysClient() *GatewaysClient { - subClient, _ := NewGatewaysClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewGatewayRouteConfigsClient() *GatewayRouteConfigsClient { - subClient, _ := NewGatewayRouteConfigsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewGatewayCustomDomainsClient() *GatewayCustomDomainsClient { - subClient, _ := NewGatewayCustomDomainsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAPIPortalsClient() *APIPortalsClient { - subClient, _ := NewAPIPortalsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAPIPortalCustomDomainsClient() *APIPortalCustomDomainsClient { - subClient, _ := NewAPIPortalCustomDomainsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewApplicationAcceleratorsClient() *ApplicationAcceleratorsClient { - subClient, _ := NewApplicationAcceleratorsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewCustomizedAcceleratorsClient() *CustomizedAcceleratorsClient { - subClient, _ := NewCustomizedAcceleratorsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewPredefinedAcceleratorsClient() *PredefinedAcceleratorsClient { - subClient, _ := NewPredefinedAcceleratorsClient(c.subscriptionID, c.credential, c.options) - return subClient -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/configservers_client.go b/sdk/resourcemanager/appplatform/armappplatform/configservers_client.go index 2b0a109583df..27947394155d 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/configservers_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/configservers_client.go @@ -48,7 +48,7 @@ func NewConfigServersClient(subscriptionID string, credential azcore.TokenCreden // Get - Get the config server and its properties. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -88,7 +88,7 @@ func (client *ConfigServersClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -106,7 +106,7 @@ func (client *ConfigServersClient) getHandleResponse(resp *http.Response) (Confi // BeginUpdatePatch - Update the config server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -119,7 +119,9 @@ func (client *ConfigServersClient) BeginUpdatePatch(ctx context.Context, resourc if err != nil { return nil, err } - return runtime.NewPoller[ConfigServersClientUpdatePatchResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConfigServersClientUpdatePatchResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[ConfigServersClientUpdatePatchResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -128,7 +130,7 @@ func (client *ConfigServersClient) BeginUpdatePatch(ctx context.Context, resourc // UpdatePatch - Update the config server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *ConfigServersClient) updatePatch(ctx context.Context, resourceGroupName string, serviceName string, configServerResource ConfigServerResource, options *ConfigServersClientBeginUpdatePatchOptions) (*http.Response, error) { req, err := client.updatePatchCreateRequest(ctx, resourceGroupName, serviceName, configServerResource, options) if err != nil { @@ -164,7 +166,7 @@ func (client *ConfigServersClient) updatePatchCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, configServerResource) @@ -173,7 +175,7 @@ func (client *ConfigServersClient) updatePatchCreateRequest(ctx context.Context, // BeginUpdatePut - Update the config server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -186,7 +188,9 @@ func (client *ConfigServersClient) BeginUpdatePut(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller[ConfigServersClientUpdatePutResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConfigServersClientUpdatePutResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[ConfigServersClientUpdatePutResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -195,7 +199,7 @@ func (client *ConfigServersClient) BeginUpdatePut(ctx context.Context, resourceG // UpdatePut - Update the config server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *ConfigServersClient) updatePut(ctx context.Context, resourceGroupName string, serviceName string, configServerResource ConfigServerResource, options *ConfigServersClientBeginUpdatePutOptions) (*http.Response, error) { req, err := client.updatePutCreateRequest(ctx, resourceGroupName, serviceName, configServerResource, options) if err != nil { @@ -231,7 +235,7 @@ func (client *ConfigServersClient) updatePutCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, configServerResource) @@ -240,7 +244,7 @@ func (client *ConfigServersClient) updatePutCreateRequest(ctx context.Context, r // BeginValidate - Check if the config server settings are valid. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -264,7 +268,7 @@ func (client *ConfigServersClient) BeginValidate(ctx context.Context, resourceGr // Validate - Check if the config server settings are valid. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *ConfigServersClient) validate(ctx context.Context, resourceGroupName string, serviceName string, configServerSettings ConfigServerSettings, options *ConfigServersClientBeginValidateOptions) (*http.Response, error) { req, err := client.validateCreateRequest(ctx, resourceGroupName, serviceName, configServerSettings, options) if err != nil { @@ -300,7 +304,7 @@ func (client *ConfigServersClient) validateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, configServerSettings) diff --git a/sdk/resourcemanager/appplatform/armappplatform/configservers_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/configservers_client_example_test.go index 87fb386d569c..ca8bee970082 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/configservers_client_example_test.go +++ b/sdk/resourcemanager/appplatform/armappplatform/configservers_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigServers_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ConfigServers_Get.json func ExampleConfigServersClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -62,7 +62,7 @@ func ExampleConfigServersClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigServers_UpdatePut.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ConfigServers_UpdatePut.json func ExampleConfigServersClient_BeginUpdatePut() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -121,7 +121,7 @@ func ExampleConfigServersClient_BeginUpdatePut() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigServers_UpdatePatch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ConfigServers_UpdatePatch.json func ExampleConfigServersClient_BeginUpdatePatch() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -180,7 +180,7 @@ func ExampleConfigServersClient_BeginUpdatePatch() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigServers_Validate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ConfigServers_Validate.json func ExampleConfigServersClient_BeginValidate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appplatform/armappplatform/configurationservices_client.go b/sdk/resourcemanager/appplatform/armappplatform/configurationservices_client.go index aeca239b78c3..541abb296ac8 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/configurationservices_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/configurationservices_client.go @@ -49,7 +49,7 @@ func NewConfigurationServicesClient(subscriptionID string, credential azcore.Tok // Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -63,7 +63,9 @@ func (client *ConfigurationServicesClient) BeginCreateOrUpdate(ctx context.Conte if err != nil { return nil, err } - return runtime.NewPoller[ConfigurationServicesClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConfigurationServicesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[ConfigurationServicesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -73,7 +75,7 @@ func (client *ConfigurationServicesClient) BeginCreateOrUpdate(ctx context.Conte // Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *ConfigurationServicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, configurationServiceResource ConfigurationServiceResource, options *ConfigurationServicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, configurationServiceName, configurationServiceResource, options) if err != nil { @@ -113,7 +115,7 @@ func (client *ConfigurationServicesClient) createOrUpdateCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, configurationServiceResource) @@ -122,7 +124,7 @@ func (client *ConfigurationServicesClient) createOrUpdateCreateRequest(ctx conte // BeginDelete - Disable the default Application Configuration Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -135,7 +137,9 @@ func (client *ConfigurationServicesClient) BeginDelete(ctx context.Context, reso if err != nil { return nil, err } - return runtime.NewPoller[ConfigurationServicesClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConfigurationServicesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[ConfigurationServicesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -144,7 +148,7 @@ func (client *ConfigurationServicesClient) BeginDelete(ctx context.Context, reso // Delete - Disable the default Application Configuration Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *ConfigurationServicesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, options *ConfigurationServicesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, configurationServiceName, options) if err != nil { @@ -184,7 +188,7 @@ func (client *ConfigurationServicesClient) deleteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -193,7 +197,7 @@ func (client *ConfigurationServicesClient) deleteCreateRequest(ctx context.Conte // Get - Get the Application Configuration Service and its properties. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -239,7 +243,7 @@ func (client *ConfigurationServicesClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -256,7 +260,7 @@ func (client *ConfigurationServicesClient) getHandleResponse(resp *http.Response // NewListPager - Handles requests to list all resources in a Service. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -310,7 +314,7 @@ func (client *ConfigurationServicesClient) listCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -328,7 +332,7 @@ func (client *ConfigurationServicesClient) listHandleResponse(resp *http.Respons // BeginValidate - Check if the Application Configuration Service settings are valid. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -353,7 +357,7 @@ func (client *ConfigurationServicesClient) BeginValidate(ctx context.Context, re // Validate - Check if the Application Configuration Service settings are valid. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *ConfigurationServicesClient) validate(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, settings ConfigurationServiceSettings, options *ConfigurationServicesClientBeginValidateOptions) (*http.Response, error) { req, err := client.validateCreateRequest(ctx, resourceGroupName, serviceName, configurationServiceName, settings, options) if err != nil { @@ -393,7 +397,7 @@ func (client *ConfigurationServicesClient) validateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, settings) diff --git a/sdk/resourcemanager/appplatform/armappplatform/configurationservices_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/configurationservices_client_example_test.go index 8cda1849d60b..75a11456a324 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/configurationservices_client_example_test.go +++ b/sdk/resourcemanager/appplatform/armappplatform/configurationservices_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigurationServices_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ConfigurationServices_Get.json func ExampleConfigurationServicesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -81,7 +81,7 @@ func ExampleConfigurationServicesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigurationServices_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ConfigurationServices_CreateOrUpdate.json func ExampleConfigurationServicesClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -162,7 +162,7 @@ func ExampleConfigurationServicesClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigurationServices_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ConfigurationServices_Delete.json func ExampleConfigurationServicesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -183,7 +183,7 @@ func ExampleConfigurationServicesClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigurationServices_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ConfigurationServices_List.json func ExampleConfigurationServicesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -254,7 +254,7 @@ func ExampleConfigurationServicesClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigurationServices_Validate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ConfigurationServices_Validate.json func ExampleConfigurationServicesClient_BeginValidate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appplatform/armappplatform/constants.go b/sdk/resourcemanager/appplatform/armappplatform/constants.go index dd4e8a961a14..219c2609669e 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/constants.go +++ b/sdk/resourcemanager/appplatform/armappplatform/constants.go @@ -11,31 +11,9 @@ package armappplatform const ( moduleName = "armappplatform" - moduleVersion = "v1.1.0-beta.3" + moduleVersion = "v1.1.0" ) -// APIPortalProvisioningState - State of the API portal. -type APIPortalProvisioningState string - -const ( - APIPortalProvisioningStateCreating APIPortalProvisioningState = "Creating" - APIPortalProvisioningStateDeleting APIPortalProvisioningState = "Deleting" - APIPortalProvisioningStateFailed APIPortalProvisioningState = "Failed" - APIPortalProvisioningStateSucceeded APIPortalProvisioningState = "Succeeded" - APIPortalProvisioningStateUpdating APIPortalProvisioningState = "Updating" -) - -// PossibleAPIPortalProvisioningStateValues returns the possible values for the APIPortalProvisioningState const type. -func PossibleAPIPortalProvisioningStateValues() []APIPortalProvisioningState { - return []APIPortalProvisioningState{ - APIPortalProvisioningStateCreating, - APIPortalProvisioningStateDeleting, - APIPortalProvisioningStateFailed, - APIPortalProvisioningStateSucceeded, - APIPortalProvisioningStateUpdating, - } -} - // ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. type ActionType string @@ -50,28 +28,6 @@ func PossibleActionTypeValues() []ActionType { } } -// ApmType - Type of application performance monitoring -type ApmType string - -const ( - ApmTypeAppDynamics ApmType = "AppDynamics" - ApmTypeApplicationInsights ApmType = "ApplicationInsights" - ApmTypeDynatrace ApmType = "Dynatrace" - ApmTypeElasticAPM ApmType = "ElasticAPM" - ApmTypeNewRelic ApmType = "NewRelic" -) - -// PossibleApmTypeValues returns the possible values for the ApmType const type. -func PossibleApmTypeValues() []ApmType { - return []ApmType{ - ApmTypeAppDynamics, - ApmTypeApplicationInsights, - ApmTypeDynatrace, - ApmTypeElasticAPM, - ApmTypeNewRelic, - } -} - // AppResourceProvisioningState - Provisioning state of the App type AppResourceProvisioningState string @@ -94,68 +50,6 @@ func PossibleAppResourceProvisioningStateValues() []AppResourceProvisioningState } } -// ApplicationAcceleratorProvisioningState - State of the application accelerator. -type ApplicationAcceleratorProvisioningState string - -const ( - ApplicationAcceleratorProvisioningStateCreating ApplicationAcceleratorProvisioningState = "Creating" - ApplicationAcceleratorProvisioningStateDeleting ApplicationAcceleratorProvisioningState = "Deleting" - ApplicationAcceleratorProvisioningStateFailed ApplicationAcceleratorProvisioningState = "Failed" - ApplicationAcceleratorProvisioningStateSucceeded ApplicationAcceleratorProvisioningState = "Succeeded" - ApplicationAcceleratorProvisioningStateUpdating ApplicationAcceleratorProvisioningState = "Updating" -) - -// PossibleApplicationAcceleratorProvisioningStateValues returns the possible values for the ApplicationAcceleratorProvisioningState const type. -func PossibleApplicationAcceleratorProvisioningStateValues() []ApplicationAcceleratorProvisioningState { - return []ApplicationAcceleratorProvisioningState{ - ApplicationAcceleratorProvisioningStateCreating, - ApplicationAcceleratorProvisioningStateDeleting, - ApplicationAcceleratorProvisioningStateFailed, - ApplicationAcceleratorProvisioningStateSucceeded, - ApplicationAcceleratorProvisioningStateUpdating, - } -} - -// ApplicationLiveViewProvisioningState - State of the Application Live View. -type ApplicationLiveViewProvisioningState string - -const ( - ApplicationLiveViewProvisioningStateCanceled ApplicationLiveViewProvisioningState = "Canceled" - ApplicationLiveViewProvisioningStateCreating ApplicationLiveViewProvisioningState = "Creating" - ApplicationLiveViewProvisioningStateDeleting ApplicationLiveViewProvisioningState = "Deleting" - ApplicationLiveViewProvisioningStateFailed ApplicationLiveViewProvisioningState = "Failed" - ApplicationLiveViewProvisioningStateSucceeded ApplicationLiveViewProvisioningState = "Succeeded" - ApplicationLiveViewProvisioningStateUpdating ApplicationLiveViewProvisioningState = "Updating" -) - -// PossibleApplicationLiveViewProvisioningStateValues returns the possible values for the ApplicationLiveViewProvisioningState const type. -func PossibleApplicationLiveViewProvisioningStateValues() []ApplicationLiveViewProvisioningState { - return []ApplicationLiveViewProvisioningState{ - ApplicationLiveViewProvisioningStateCanceled, - ApplicationLiveViewProvisioningStateCreating, - ApplicationLiveViewProvisioningStateDeleting, - ApplicationLiveViewProvisioningStateFailed, - ApplicationLiveViewProvisioningStateSucceeded, - ApplicationLiveViewProvisioningStateUpdating, - } -} - -// BackendProtocol - How ingress should communicate with this app backend service. -type BackendProtocol string - -const ( - BackendProtocolDefault BackendProtocol = "Default" - BackendProtocolGRPC BackendProtocol = "GRPC" -) - -// PossibleBackendProtocolValues returns the possible values for the BackendProtocol const type. -func PossibleBackendProtocolValues() []BackendProtocol { - return []BackendProtocol{ - BackendProtocolDefault, - BackendProtocolGRPC, - } -} - // BindingType - Buildpack Binding Type type BindingType string @@ -163,7 +57,6 @@ const ( BindingTypeApacheSkyWalking BindingType = "ApacheSkyWalking" BindingTypeAppDynamics BindingType = "AppDynamics" BindingTypeApplicationInsights BindingType = "ApplicationInsights" - BindingTypeCACertificates BindingType = "CACertificates" BindingTypeDynatrace BindingType = "Dynatrace" BindingTypeElasticAPM BindingType = "ElasticAPM" BindingTypeNewRelic BindingType = "NewRelic" @@ -175,7 +68,6 @@ func PossibleBindingTypeValues() []BindingType { BindingTypeApacheSkyWalking, BindingTypeAppDynamics, BindingTypeApplicationInsights, - BindingTypeCACertificates, BindingTypeDynatrace, BindingTypeElasticAPM, BindingTypeNewRelic, @@ -292,28 +184,6 @@ func PossibleBuildpackBindingProvisioningStateValues() []BuildpackBindingProvisi } } -// CertificateResourceProvisioningState - Provisioning state of the Certificate -type CertificateResourceProvisioningState string - -const ( - CertificateResourceProvisioningStateCreating CertificateResourceProvisioningState = "Creating" - CertificateResourceProvisioningStateDeleting CertificateResourceProvisioningState = "Deleting" - CertificateResourceProvisioningStateFailed CertificateResourceProvisioningState = "Failed" - CertificateResourceProvisioningStateSucceeded CertificateResourceProvisioningState = "Succeeded" - CertificateResourceProvisioningStateUpdating CertificateResourceProvisioningState = "Updating" -) - -// PossibleCertificateResourceProvisioningStateValues returns the possible values for the CertificateResourceProvisioningState const type. -func PossibleCertificateResourceProvisioningStateValues() []CertificateResourceProvisioningState { - return []CertificateResourceProvisioningState{ - CertificateResourceProvisioningStateCreating, - CertificateResourceProvisioningStateDeleting, - CertificateResourceProvisioningStateFailed, - CertificateResourceProvisioningStateSucceeded, - CertificateResourceProvisioningStateUpdating, - } -} - // ConfigServerState - State of the config server. type ConfigServerState string @@ -378,68 +248,6 @@ func PossibleCreatedByTypeValues() []CreatedByType { } } -// CustomDomainResourceProvisioningState - Provisioning state of the Domain -type CustomDomainResourceProvisioningState string - -const ( - CustomDomainResourceProvisioningStateCreating CustomDomainResourceProvisioningState = "Creating" - CustomDomainResourceProvisioningStateDeleting CustomDomainResourceProvisioningState = "Deleting" - CustomDomainResourceProvisioningStateFailed CustomDomainResourceProvisioningState = "Failed" - CustomDomainResourceProvisioningStateSucceeded CustomDomainResourceProvisioningState = "Succeeded" - CustomDomainResourceProvisioningStateUpdating CustomDomainResourceProvisioningState = "Updating" -) - -// PossibleCustomDomainResourceProvisioningStateValues returns the possible values for the CustomDomainResourceProvisioningState const type. -func PossibleCustomDomainResourceProvisioningStateValues() []CustomDomainResourceProvisioningState { - return []CustomDomainResourceProvisioningState{ - CustomDomainResourceProvisioningStateCreating, - CustomDomainResourceProvisioningStateDeleting, - CustomDomainResourceProvisioningStateFailed, - CustomDomainResourceProvisioningStateSucceeded, - CustomDomainResourceProvisioningStateUpdating, - } -} - -// CustomizedAcceleratorProvisioningState - State of the customized accelerator. -type CustomizedAcceleratorProvisioningState string - -const ( - CustomizedAcceleratorProvisioningStateCreating CustomizedAcceleratorProvisioningState = "Creating" - CustomizedAcceleratorProvisioningStateDeleting CustomizedAcceleratorProvisioningState = "Deleting" - CustomizedAcceleratorProvisioningStateFailed CustomizedAcceleratorProvisioningState = "Failed" - CustomizedAcceleratorProvisioningStateSucceeded CustomizedAcceleratorProvisioningState = "Succeeded" - CustomizedAcceleratorProvisioningStateUpdating CustomizedAcceleratorProvisioningState = "Updating" -) - -// PossibleCustomizedAcceleratorProvisioningStateValues returns the possible values for the CustomizedAcceleratorProvisioningState const type. -func PossibleCustomizedAcceleratorProvisioningStateValues() []CustomizedAcceleratorProvisioningState { - return []CustomizedAcceleratorProvisioningState{ - CustomizedAcceleratorProvisioningStateCreating, - CustomizedAcceleratorProvisioningStateDeleting, - CustomizedAcceleratorProvisioningStateFailed, - CustomizedAcceleratorProvisioningStateSucceeded, - CustomizedAcceleratorProvisioningStateUpdating, - } -} - -// CustomizedAcceleratorValidateResultState - State of the customized accelerator validation result -type CustomizedAcceleratorValidateResultState string - -const ( - // CustomizedAcceleratorValidateResultStateInvalid - Customized accelerator properties are invalid. - CustomizedAcceleratorValidateResultStateInvalid CustomizedAcceleratorValidateResultState = "Invalid" - // CustomizedAcceleratorValidateResultStateValid - Customized accelerator properties are valid. - CustomizedAcceleratorValidateResultStateValid CustomizedAcceleratorValidateResultState = "Valid" -) - -// PossibleCustomizedAcceleratorValidateResultStateValues returns the possible values for the CustomizedAcceleratorValidateResultState const type. -func PossibleCustomizedAcceleratorValidateResultStateValues() []CustomizedAcceleratorValidateResultState { - return []CustomizedAcceleratorValidateResultState{ - CustomizedAcceleratorValidateResultStateInvalid, - CustomizedAcceleratorValidateResultStateValid, - } -} - // DeploymentResourceProvisioningState - Provisioning state of the Deployment type DeploymentResourceProvisioningState string @@ -476,105 +284,6 @@ func PossibleDeploymentResourceStatusValues() []DeploymentResourceStatus { } } -// DevToolPortalFeatureState - State of the plugin -type DevToolPortalFeatureState string - -const ( - // DevToolPortalFeatureStateDisabled - Disable the plugin in Dev Tool Portal. - DevToolPortalFeatureStateDisabled DevToolPortalFeatureState = "Disabled" - // DevToolPortalFeatureStateEnabled - Enable the plugin in Dev Tool Portal. - DevToolPortalFeatureStateEnabled DevToolPortalFeatureState = "Enabled" -) - -// PossibleDevToolPortalFeatureStateValues returns the possible values for the DevToolPortalFeatureState const type. -func PossibleDevToolPortalFeatureStateValues() []DevToolPortalFeatureState { - return []DevToolPortalFeatureState{ - DevToolPortalFeatureStateDisabled, - DevToolPortalFeatureStateEnabled, - } -} - -// DevToolPortalProvisioningState - State of the Dev Tool Portal. -type DevToolPortalProvisioningState string - -const ( - DevToolPortalProvisioningStateCanceled DevToolPortalProvisioningState = "Canceled" - DevToolPortalProvisioningStateCreating DevToolPortalProvisioningState = "Creating" - DevToolPortalProvisioningStateDeleting DevToolPortalProvisioningState = "Deleting" - DevToolPortalProvisioningStateFailed DevToolPortalProvisioningState = "Failed" - DevToolPortalProvisioningStateSucceeded DevToolPortalProvisioningState = "Succeeded" - DevToolPortalProvisioningStateUpdating DevToolPortalProvisioningState = "Updating" -) - -// PossibleDevToolPortalProvisioningStateValues returns the possible values for the DevToolPortalProvisioningState const type. -func PossibleDevToolPortalProvisioningStateValues() []DevToolPortalProvisioningState { - return []DevToolPortalProvisioningState{ - DevToolPortalProvisioningStateCanceled, - DevToolPortalProvisioningStateCreating, - DevToolPortalProvisioningStateDeleting, - DevToolPortalProvisioningStateFailed, - DevToolPortalProvisioningStateSucceeded, - DevToolPortalProvisioningStateUpdating, - } -} - -// GatewayProvisioningState - State of the Spring Cloud Gateway. -type GatewayProvisioningState string - -const ( - GatewayProvisioningStateCreating GatewayProvisioningState = "Creating" - GatewayProvisioningStateDeleting GatewayProvisioningState = "Deleting" - GatewayProvisioningStateFailed GatewayProvisioningState = "Failed" - GatewayProvisioningStateSucceeded GatewayProvisioningState = "Succeeded" - GatewayProvisioningStateUpdating GatewayProvisioningState = "Updating" -) - -// PossibleGatewayProvisioningStateValues returns the possible values for the GatewayProvisioningState const type. -func PossibleGatewayProvisioningStateValues() []GatewayProvisioningState { - return []GatewayProvisioningState{ - GatewayProvisioningStateCreating, - GatewayProvisioningStateDeleting, - GatewayProvisioningStateFailed, - GatewayProvisioningStateSucceeded, - GatewayProvisioningStateUpdating, - } -} - -// GatewayRouteConfigProtocol - Protocol of routed Azure Spring Apps applications. -type GatewayRouteConfigProtocol string - -const ( - GatewayRouteConfigProtocolHTTP GatewayRouteConfigProtocol = "HTTP" - GatewayRouteConfigProtocolHTTPS GatewayRouteConfigProtocol = "HTTPS" -) - -// PossibleGatewayRouteConfigProtocolValues returns the possible values for the GatewayRouteConfigProtocol const type. -func PossibleGatewayRouteConfigProtocolValues() []GatewayRouteConfigProtocol { - return []GatewayRouteConfigProtocol{ - GatewayRouteConfigProtocolHTTP, - GatewayRouteConfigProtocolHTTPS, - } -} - -// HTTPSchemeType - Scheme to use for connecting to the host. Defaults to HTTP. -// Possible enum values: -// * "HTTP" means that the scheme used will be http:// -// * "HTTPS" means that the scheme used will be https:// -type HTTPSchemeType string - -const ( - HTTPSchemeTypeHTTP HTTPSchemeType = "HTTP" - HTTPSchemeTypeHTTPS HTTPSchemeType = "HTTPS" -) - -// PossibleHTTPSchemeTypeValues returns the possible values for the HTTPSchemeType const type. -func PossibleHTTPSchemeTypeValues() []HTTPSchemeType { - return []HTTPSchemeType{ - HTTPSchemeTypeHTTP, - HTTPSchemeTypeHTTPS, - } -} - // KPackBuildStageProvisioningState - The provisioning state of this build stage resource. type KPackBuildStageProvisioningState string @@ -655,78 +364,6 @@ func PossibleMonitoringSettingStateValues() []MonitoringSettingState { } } -// PowerState - Power state of the Service -type PowerState string - -const ( - PowerStateRunning PowerState = "Running" - PowerStateStopped PowerState = "Stopped" -) - -// PossiblePowerStateValues returns the possible values for the PowerState const type. -func PossiblePowerStateValues() []PowerState { - return []PowerState{ - PowerStateRunning, - PowerStateStopped, - } -} - -// PredefinedAcceleratorProvisioningState - Provisioning state of the predefined accelerator. -type PredefinedAcceleratorProvisioningState string - -const ( - PredefinedAcceleratorProvisioningStateCreating PredefinedAcceleratorProvisioningState = "Creating" - PredefinedAcceleratorProvisioningStateFailed PredefinedAcceleratorProvisioningState = "Failed" - PredefinedAcceleratorProvisioningStateSucceeded PredefinedAcceleratorProvisioningState = "Succeeded" - PredefinedAcceleratorProvisioningStateUpdating PredefinedAcceleratorProvisioningState = "Updating" -) - -// PossiblePredefinedAcceleratorProvisioningStateValues returns the possible values for the PredefinedAcceleratorProvisioningState const type. -func PossiblePredefinedAcceleratorProvisioningStateValues() []PredefinedAcceleratorProvisioningState { - return []PredefinedAcceleratorProvisioningState{ - PredefinedAcceleratorProvisioningStateCreating, - PredefinedAcceleratorProvisioningStateFailed, - PredefinedAcceleratorProvisioningStateSucceeded, - PredefinedAcceleratorProvisioningStateUpdating, - } -} - -// PredefinedAcceleratorState - State of the predefined accelerator. -type PredefinedAcceleratorState string - -const ( - // PredefinedAcceleratorStateDisabled - Disable the predefined accelerator. - PredefinedAcceleratorStateDisabled PredefinedAcceleratorState = "Disabled" - // PredefinedAcceleratorStateEnabled - Enable the predefined accelerator. - PredefinedAcceleratorStateEnabled PredefinedAcceleratorState = "Enabled" -) - -// PossiblePredefinedAcceleratorStateValues returns the possible values for the PredefinedAcceleratorState const type. -func PossiblePredefinedAcceleratorStateValues() []PredefinedAcceleratorState { - return []PredefinedAcceleratorState{ - PredefinedAcceleratorStateDisabled, - PredefinedAcceleratorStateEnabled, - } -} - -// ProbeActionType - The type of the action to take to perform the health check. -type ProbeActionType string - -const ( - ProbeActionTypeExecAction ProbeActionType = "ExecAction" - ProbeActionTypeHTTPGetAction ProbeActionType = "HTTPGetAction" - ProbeActionTypeTCPSocketAction ProbeActionType = "TCPSocketAction" -) - -// PossibleProbeActionTypeValues returns the possible values for the ProbeActionType const type. -func PossibleProbeActionTypeValues() []ProbeActionType { - return []ProbeActionType{ - ProbeActionTypeExecAction, - ProbeActionTypeHTTPGetAction, - ProbeActionTypeTCPSocketAction, - } -} - // ProvisioningState - Provisioning state of the Service type ProvisioningState string @@ -833,36 +470,6 @@ func PossibleServiceRegistryProvisioningStateValues() []ServiceRegistryProvision } } -// SessionAffinity - Type of the affinity, set this to Cookie to enable session affinity. -type SessionAffinity string - -const ( - SessionAffinityCookie SessionAffinity = "Cookie" - SessionAffinityNone SessionAffinity = "None" -) - -// PossibleSessionAffinityValues returns the possible values for the SessionAffinity const type. -func PossibleSessionAffinityValues() []SessionAffinity { - return []SessionAffinity{ - SessionAffinityCookie, - SessionAffinityNone, - } -} - -// StorageType - The type of the storage. -type StorageType string - -const ( - StorageTypeStorageAccount StorageType = "StorageAccount" -) - -// PossibleStorageTypeValues returns the possible values for the StorageType const type. -func PossibleStorageTypeValues() []StorageType { - return []StorageType{ - StorageTypeStorageAccount, - } -} - // SupportedRuntimePlatform - The platform of this runtime version (possible values: "Java" or ".NET"). type SupportedRuntimePlatform string @@ -930,17 +537,3 @@ func PossibleTrafficDirectionValues() []TrafficDirection { TrafficDirectionOutbound, } } - -// Type - The type of the underlying resource to mount as a persistent disk. -type Type string - -const ( - TypeAzureFileVolume Type = "AzureFileVolume" -) - -// PossibleTypeValues returns the possible values for the Type const type. -func PossibleTypeValues() []Type { - return []Type{ - TypeAzureFileVolume, - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/customdomains_client.go b/sdk/resourcemanager/appplatform/armappplatform/customdomains_client.go index 816c11b7bcdd..dae076232108 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/customdomains_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/customdomains_client.go @@ -48,7 +48,7 @@ func NewCustomDomainsClient(subscriptionID string, credential azcore.TokenCreden // BeginCreateOrUpdate - Create or update custom domain of one lifecycle application. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -63,7 +63,9 @@ func (client *CustomDomainsClient) BeginCreateOrUpdate(ctx context.Context, reso if err != nil { return nil, err } - return runtime.NewPoller[CustomDomainsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CustomDomainsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[CustomDomainsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -72,7 +74,7 @@ func (client *CustomDomainsClient) BeginCreateOrUpdate(ctx context.Context, reso // CreateOrUpdate - Create or update custom domain of one lifecycle application. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *CustomDomainsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, domainResource CustomDomainResource, options *CustomDomainsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, appName, domainName, domainResource, options) if err != nil { @@ -116,7 +118,7 @@ func (client *CustomDomainsClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, domainResource) @@ -125,7 +127,7 @@ func (client *CustomDomainsClient) createOrUpdateCreateRequest(ctx context.Conte // BeginDelete - Delete the custom domain of one lifecycle application. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -139,7 +141,9 @@ func (client *CustomDomainsClient) BeginDelete(ctx context.Context, resourceGrou if err != nil { return nil, err } - return runtime.NewPoller[CustomDomainsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CustomDomainsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[CustomDomainsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -148,7 +152,7 @@ func (client *CustomDomainsClient) BeginDelete(ctx context.Context, resourceGrou // Delete - Delete the custom domain of one lifecycle application. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *CustomDomainsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, options *CustomDomainsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, appName, domainName, options) if err != nil { @@ -192,7 +196,7 @@ func (client *CustomDomainsClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -201,7 +205,7 @@ func (client *CustomDomainsClient) deleteCreateRequest(ctx context.Context, reso // Get - Get the custom domain of one lifecycle application. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -251,7 +255,7 @@ func (client *CustomDomainsClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -268,7 +272,7 @@ func (client *CustomDomainsClient) getHandleResponse(resp *http.Response) (Custo // NewListPager - List the custom domains of one lifecycle application. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -326,7 +330,7 @@ func (client *CustomDomainsClient) listCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -344,7 +348,7 @@ func (client *CustomDomainsClient) listHandleResponse(resp *http.Response) (Cust // BeginUpdate - Update custom domain of one lifecycle application. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -359,7 +363,9 @@ func (client *CustomDomainsClient) BeginUpdate(ctx context.Context, resourceGrou if err != nil { return nil, err } - return runtime.NewPoller[CustomDomainsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CustomDomainsClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[CustomDomainsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -368,7 +374,7 @@ func (client *CustomDomainsClient) BeginUpdate(ctx context.Context, resourceGrou // Update - Update custom domain of one lifecycle application. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *CustomDomainsClient) update(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, domainResource CustomDomainResource, options *CustomDomainsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, appName, domainName, domainResource, options) if err != nil { @@ -412,7 +418,7 @@ func (client *CustomDomainsClient) updateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, domainResource) diff --git a/sdk/resourcemanager/appplatform/armappplatform/customdomains_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/customdomains_client_example_test.go index a9e4469eb830..bab6448d8ea2 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/customdomains_client_example_test.go +++ b/sdk/resourcemanager/appplatform/armappplatform/customdomains_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomDomains_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/CustomDomains_Get.json func ExampleCustomDomainsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -51,13 +51,12 @@ func ExampleCustomDomainsClient_Get() { // Properties: &armappplatform.CustomDomainProperties{ // AppName: to.Ptr("myapp"), // CertName: to.Ptr("mycert"), - // ProvisioningState: to.Ptr(armappplatform.CustomDomainResourceProvisioningStateSucceeded), // Thumbprint: to.Ptr("934367bf1c97033f877db0f15cb1b586957d3133"), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomDomains_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/CustomDomains_CreateOrUpdate.json func ExampleCustomDomainsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -104,7 +103,7 @@ func ExampleCustomDomainsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomDomains_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/CustomDomains_Delete.json func ExampleCustomDomainsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -125,7 +124,7 @@ func ExampleCustomDomainsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomDomains_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/CustomDomains_Update.json func ExampleCustomDomainsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -172,7 +171,7 @@ func ExampleCustomDomainsClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomDomains_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/CustomDomains_List.json func ExampleCustomDomainsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -211,7 +210,6 @@ func ExampleCustomDomainsClient_NewListPager() { // Properties: &armappplatform.CustomDomainProperties{ // AppName: to.Ptr("myapp"), // CertName: to.Ptr("mycert"), - // ProvisioningState: to.Ptr(armappplatform.CustomDomainResourceProvisioningStateSucceeded), // Thumbprint: to.Ptr("934367bf1c97033f877db0f15cb1b586957d3133"), // }, // }}, diff --git a/sdk/resourcemanager/appplatform/armappplatform/customizedaccelerators_client.go b/sdk/resourcemanager/appplatform/armappplatform/customizedaccelerators_client.go deleted file mode 100644 index b66b5330ed15..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/customizedaccelerators_client.go +++ /dev/null @@ -1,414 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappplatform - -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" -) - -// CustomizedAcceleratorsClient contains the methods for the CustomizedAccelerators group. -// Don't use this type directly, use NewCustomizedAcceleratorsClient() instead. -type CustomizedAcceleratorsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewCustomizedAcceleratorsClient creates a new instance of CustomizedAcceleratorsClient with the specified values. -// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewCustomizedAcceleratorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomizedAcceleratorsClient, error) { - cl, err := arm.NewClient(moduleName+".CustomizedAcceleratorsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &CustomizedAcceleratorsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create or update the customized accelerator. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - applicationAcceleratorName - The name of the application accelerator. -// - customizedAcceleratorName - The name of the customized accelerator. -// - customizedAcceleratorResource - The customized accelerator for the create or update operation -// - options - CustomizedAcceleratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomizedAcceleratorsClient.BeginCreateOrUpdate -// method. -func (client *CustomizedAcceleratorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, customizedAcceleratorResource CustomizedAcceleratorResource, options *CustomizedAcceleratorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[CustomizedAcceleratorsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName, customizedAcceleratorResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[CustomizedAcceleratorsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[CustomizedAcceleratorsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// CreateOrUpdate - Create or update the customized accelerator. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *CustomizedAcceleratorsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, customizedAcceleratorResource CustomizedAcceleratorResource, options *CustomizedAcceleratorsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName, customizedAcceleratorResource, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *CustomizedAcceleratorsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, customizedAcceleratorResource CustomizedAcceleratorResource, options *CustomizedAcceleratorsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if applicationAcceleratorName == "" { - return nil, errors.New("parameter applicationAcceleratorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationAcceleratorName}", url.PathEscape(applicationAcceleratorName)) - if customizedAcceleratorName == "" { - return nil, errors.New("parameter customizedAcceleratorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{customizedAcceleratorName}", url.PathEscape(customizedAcceleratorName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, customizedAcceleratorResource) -} - -// BeginDelete - Delete the customized accelerator. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - applicationAcceleratorName - The name of the application accelerator. -// - customizedAcceleratorName - The name of the customized accelerator. -// - options - CustomizedAcceleratorsClientBeginDeleteOptions contains the optional parameters for the CustomizedAcceleratorsClient.BeginDelete -// method. -func (client *CustomizedAcceleratorsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, options *CustomizedAcceleratorsClientBeginDeleteOptions) (*runtime.Poller[CustomizedAcceleratorsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[CustomizedAcceleratorsClientDeleteResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[CustomizedAcceleratorsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Delete - Delete the customized accelerator. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *CustomizedAcceleratorsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, options *CustomizedAcceleratorsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *CustomizedAcceleratorsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, options *CustomizedAcceleratorsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if applicationAcceleratorName == "" { - return nil, errors.New("parameter applicationAcceleratorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationAcceleratorName}", url.PathEscape(applicationAcceleratorName)) - if customizedAcceleratorName == "" { - return nil, errors.New("parameter customizedAcceleratorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{customizedAcceleratorName}", url.PathEscape(customizedAcceleratorName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the customized accelerator. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - applicationAcceleratorName - The name of the application accelerator. -// - customizedAcceleratorName - The name of the customized accelerator. -// - options - CustomizedAcceleratorsClientGetOptions contains the optional parameters for the CustomizedAcceleratorsClient.Get -// method. -func (client *CustomizedAcceleratorsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, options *CustomizedAcceleratorsClientGetOptions) (CustomizedAcceleratorsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName, options) - if err != nil { - return CustomizedAcceleratorsClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return CustomizedAcceleratorsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CustomizedAcceleratorsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *CustomizedAcceleratorsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, options *CustomizedAcceleratorsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if applicationAcceleratorName == "" { - return nil, errors.New("parameter applicationAcceleratorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationAcceleratorName}", url.PathEscape(applicationAcceleratorName)) - if customizedAcceleratorName == "" { - return nil, errors.New("parameter customizedAcceleratorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{customizedAcceleratorName}", url.PathEscape(customizedAcceleratorName)) - 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", "2022-11-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 *CustomizedAcceleratorsClient) getHandleResponse(resp *http.Response) (CustomizedAcceleratorsClientGetResponse, error) { - result := CustomizedAcceleratorsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CustomizedAcceleratorResource); err != nil { - return CustomizedAcceleratorsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Handle requests to list all customized accelerators. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - applicationAcceleratorName - The name of the application accelerator. -// - options - CustomizedAcceleratorsClientListOptions contains the optional parameters for the CustomizedAcceleratorsClient.NewListPager -// method. -func (client *CustomizedAcceleratorsClient) NewListPager(resourceGroupName string, serviceName string, applicationAcceleratorName string, options *CustomizedAcceleratorsClientListOptions) *runtime.Pager[CustomizedAcceleratorsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[CustomizedAcceleratorsClientListResponse]{ - More: func(page CustomizedAcceleratorsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *CustomizedAcceleratorsClientListResponse) (CustomizedAcceleratorsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CustomizedAcceleratorsClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return CustomizedAcceleratorsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CustomizedAcceleratorsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *CustomizedAcceleratorsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, options *CustomizedAcceleratorsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if applicationAcceleratorName == "" { - return nil, errors.New("parameter applicationAcceleratorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationAcceleratorName}", url.PathEscape(applicationAcceleratorName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *CustomizedAcceleratorsClient) listHandleResponse(resp *http.Response) (CustomizedAcceleratorsClientListResponse, error) { - result := CustomizedAcceleratorsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CustomizedAcceleratorResourceCollection); err != nil { - return CustomizedAcceleratorsClientListResponse{}, err - } - return result, nil -} - -// Validate - Check the customized accelerator are valid. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - applicationAcceleratorName - The name of the application accelerator. -// - customizedAcceleratorName - The name of the customized accelerator. -// - properties - Customized accelerator properties to be validated -// - options - CustomizedAcceleratorsClientValidateOptions contains the optional parameters for the CustomizedAcceleratorsClient.Validate -// method. -func (client *CustomizedAcceleratorsClient) Validate(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, properties CustomizedAcceleratorProperties, options *CustomizedAcceleratorsClientValidateOptions) (CustomizedAcceleratorsClientValidateResponse, error) { - req, err := client.validateCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName, properties, options) - if err != nil { - return CustomizedAcceleratorsClientValidateResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return CustomizedAcceleratorsClientValidateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return CustomizedAcceleratorsClientValidateResponse{}, runtime.NewResponseError(resp) - } - return client.validateHandleResponse(resp) -} - -// validateCreateRequest creates the Validate request. -func (client *CustomizedAcceleratorsClient) validateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, properties CustomizedAcceleratorProperties, options *CustomizedAcceleratorsClientValidateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName}/validate" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if applicationAcceleratorName == "" { - return nil, errors.New("parameter applicationAcceleratorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationAcceleratorName}", url.PathEscape(applicationAcceleratorName)) - if customizedAcceleratorName == "" { - return nil, errors.New("parameter customizedAcceleratorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{customizedAcceleratorName}", url.PathEscape(customizedAcceleratorName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, properties) -} - -// validateHandleResponse handles the Validate response. -func (client *CustomizedAcceleratorsClient) validateHandleResponse(resp *http.Response) (CustomizedAcceleratorsClientValidateResponse, error) { - result := CustomizedAcceleratorsClientValidateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CustomizedAcceleratorValidateResult); err != nil { - return CustomizedAcceleratorsClientValidateResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/customizedaccelerators_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/customizedaccelerators_client_example_test.go deleted file mode 100644 index 1745a79fc4d3..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/customizedaccelerators_client_example_test.go +++ /dev/null @@ -1,294 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomizedAccelerators_List.json -func ExampleCustomizedAcceleratorsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewCustomizedAcceleratorsClient().NewListPager("myResourceGroup", "myservice", "default", 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.CustomizedAcceleratorResourceCollection = armappplatform.CustomizedAcceleratorResourceCollection{ - // Value: []*armappplatform.CustomizedAcceleratorResource{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/applicationAccelerators/customizedAccelerators"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/applicationAccelerators/default/customizedAccelerators"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.CustomizedAcceleratorProperties{ - // Description: to.Ptr("acc-desc"), - // AcceleratorTags: []*string{ - // to.Ptr("tag-a"), - // to.Ptr("tag-b")}, - // DisplayName: to.Ptr("acc-name"), - // GitRepository: &armappplatform.AcceleratorGitRepository{ - // AuthSetting: &armappplatform.AcceleratorSSHSetting{ - // AuthType: to.Ptr("SSH"), - // }, - // Branch: to.Ptr("git-branch"), - // Commit: to.Ptr("12345"), - // GitTag: to.Ptr("git-tag"), - // IntervalInSeconds: to.Ptr[int32](70), - // URL: to.Ptr("git-url"), - // }, - // IconURL: to.Ptr("acc-icon"), - // ProvisioningState: to.Ptr(armappplatform.CustomizedAcceleratorProvisioningStateSucceeded), - // }, - // SKU: &armappplatform.SKU{ - // Name: to.Ptr("E0"), - // Capacity: to.Ptr[int32](2), - // Tier: to.Ptr("Enterprise"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomizedAccelerators_Get.json -func ExampleCustomizedAcceleratorsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCustomizedAcceleratorsClient().Get(ctx, "myResourceGroup", "myservice", "default", "acc-name", 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.CustomizedAcceleratorResource = armappplatform.CustomizedAcceleratorResource{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/applicationAccelerators/customizedAccelerators"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/applicationAccelerators/default/customizedAccelerators/acc-name"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.CustomizedAcceleratorProperties{ - // Description: to.Ptr("acc-desc"), - // AcceleratorTags: []*string{ - // to.Ptr("tag-a"), - // to.Ptr("tag-b")}, - // DisplayName: to.Ptr("acc-name"), - // GitRepository: &armappplatform.AcceleratorGitRepository{ - // AuthSetting: &armappplatform.AcceleratorSSHSetting{ - // AuthType: to.Ptr("SSH"), - // }, - // Branch: to.Ptr("git-branch"), - // Commit: to.Ptr("12345"), - // GitTag: to.Ptr("git-tag"), - // IntervalInSeconds: to.Ptr[int32](70), - // URL: to.Ptr("git-url"), - // }, - // IconURL: to.Ptr("acc-icon"), - // ProvisioningState: to.Ptr(armappplatform.CustomizedAcceleratorProvisioningStateSucceeded), - // }, - // SKU: &armappplatform.SKU{ - // Name: to.Ptr("E0"), - // Capacity: to.Ptr[int32](2), - // Tier: to.Ptr("Enterprise"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomizedAccelerators_CreateOrUpdate.json -func ExampleCustomizedAcceleratorsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewCustomizedAcceleratorsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", "acc-name", armappplatform.CustomizedAcceleratorResource{ - Properties: &armappplatform.CustomizedAcceleratorProperties{ - Description: to.Ptr("acc-desc"), - AcceleratorTags: []*string{ - to.Ptr("tag-a"), - to.Ptr("tag-b")}, - DisplayName: to.Ptr("acc-name"), - GitRepository: &armappplatform.AcceleratorGitRepository{ - AuthSetting: &armappplatform.AcceleratorSSHSetting{ - AuthType: to.Ptr("SSH"), - HostKey: to.Ptr("git-auth-hostkey"), - HostKeyAlgorithm: to.Ptr("git-auth-algorithm"), - PrivateKey: to.Ptr("git-auth-privatekey"), - }, - Branch: to.Ptr("git-branch"), - Commit: to.Ptr("12345"), - GitTag: to.Ptr("git-tag"), - IntervalInSeconds: to.Ptr[int32](70), - URL: to.Ptr("git-url"), - }, - IconURL: to.Ptr("acc-icon"), - }, - SKU: &armappplatform.SKU{ - Name: to.Ptr("E0"), - Capacity: to.Ptr[int32](2), - Tier: to.Ptr("Enterprise"), - }, - }, 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.CustomizedAcceleratorResource = armappplatform.CustomizedAcceleratorResource{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/applicationAccelerators/customizedAccelerators"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/applicationAccelerators/default/customizedAccelerators/acc-name"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.CustomizedAcceleratorProperties{ - // Description: to.Ptr("acc-desc"), - // AcceleratorTags: []*string{ - // to.Ptr("tag-a"), - // to.Ptr("tag-b")}, - // DisplayName: to.Ptr("acc-name"), - // GitRepository: &armappplatform.AcceleratorGitRepository{ - // AuthSetting: &armappplatform.AcceleratorSSHSetting{ - // AuthType: to.Ptr("SSH"), - // }, - // Branch: to.Ptr("git-branch"), - // Commit: to.Ptr("12345"), - // GitTag: to.Ptr("git-tag"), - // IntervalInSeconds: to.Ptr[int32](70), - // URL: to.Ptr("git-url"), - // }, - // IconURL: to.Ptr("acc-icon"), - // ProvisioningState: to.Ptr(armappplatform.CustomizedAcceleratorProvisioningStateSucceeded), - // }, - // SKU: &armappplatform.SKU{ - // Name: to.Ptr("E0"), - // Capacity: to.Ptr[int32](2), - // Tier: to.Ptr("Enterprise"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomizedAccelerators_Delete.json -func ExampleCustomizedAcceleratorsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewCustomizedAcceleratorsClient().BeginDelete(ctx, "myResourceGroup", "myservice", "default", "acc-name", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomizedAccelerators_Validate.json -func ExampleCustomizedAcceleratorsClient_Validate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCustomizedAcceleratorsClient().Validate(ctx, "myResourceGroup", "myservice", "default", "acc-name", armappplatform.CustomizedAcceleratorProperties{ - Description: to.Ptr("acc-desc"), - AcceleratorTags: []*string{ - to.Ptr("tag-a"), - to.Ptr("tag-b")}, - DisplayName: to.Ptr("acc-name"), - GitRepository: &armappplatform.AcceleratorGitRepository{ - AuthSetting: &armappplatform.AcceleratorSSHSetting{ - AuthType: to.Ptr("SSH"), - HostKey: to.Ptr("git-auth-hostkey"), - HostKeyAlgorithm: to.Ptr("git-auth-algorithm"), - PrivateKey: to.Ptr("git-auth-privatekey"), - }, - Branch: to.Ptr("git-branch"), - Commit: to.Ptr("12345"), - GitTag: to.Ptr("git-tag"), - IntervalInSeconds: to.Ptr[int32](70), - URL: to.Ptr("git-url"), - }, - IconURL: to.Ptr("acc-icon"), - }, 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.CustomizedAcceleratorValidateResult = armappplatform.CustomizedAcceleratorValidateResult{ - // ErrorMessage: to.Ptr(""), - // State: to.Ptr(armappplatform.CustomizedAcceleratorValidateResultStateValid), - // } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/deployments_client.go b/sdk/resourcemanager/appplatform/armappplatform/deployments_client.go index 06dbd8cf16aa..a86442d3473e 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/deployments_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/deployments_client.go @@ -48,7 +48,7 @@ func NewDeploymentsClient(subscriptionID string, credential azcore.TokenCredenti // BeginCreateOrUpdate - Create a new Deployment or update an exiting Deployment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -63,7 +63,9 @@ func (client *DeploymentsClient) BeginCreateOrUpdate(ctx context.Context, resour if err != nil { return nil, err } - return runtime.NewPoller[DeploymentsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[DeploymentsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -72,7 +74,7 @@ func (client *DeploymentsClient) BeginCreateOrUpdate(ctx context.Context, resour // CreateOrUpdate - Create a new Deployment or update an exiting Deployment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *DeploymentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource, options *DeploymentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, deploymentResource, options) if err != nil { @@ -116,7 +118,7 @@ func (client *DeploymentsClient) createOrUpdateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, deploymentResource) @@ -125,7 +127,7 @@ func (client *DeploymentsClient) createOrUpdateCreateRequest(ctx context.Context // BeginDelete - Operation to delete a Deployment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -138,7 +140,9 @@ func (client *DeploymentsClient) BeginDelete(ctx context.Context, resourceGroupN if err != nil { return nil, err } - return runtime.NewPoller[DeploymentsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[DeploymentsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -147,7 +151,7 @@ func (client *DeploymentsClient) BeginDelete(ctx context.Context, resourceGroupN // Delete - Operation to delete a Deployment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *DeploymentsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) if err != nil { @@ -191,171 +195,16 @@ func (client *DeploymentsClient) deleteCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// BeginDisableRemoteDebugging - Disable remote debugging. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - appName - The name of the App resource. -// - deploymentName - The name of the Deployment resource. -// - options - DeploymentsClientBeginDisableRemoteDebuggingOptions contains the optional parameters for the DeploymentsClient.BeginDisableRemoteDebugging -// method. -func (client *DeploymentsClient) BeginDisableRemoteDebugging(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginDisableRemoteDebuggingOptions) (*runtime.Poller[DeploymentsClientDisableRemoteDebuggingResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.disableRemoteDebugging(ctx, resourceGroupName, serviceName, appName, deploymentName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[DeploymentsClientDisableRemoteDebuggingResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientDisableRemoteDebuggingResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// DisableRemoteDebugging - Disable remote debugging. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *DeploymentsClient) disableRemoteDebugging(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginDisableRemoteDebuggingOptions) (*http.Response, error) { - req, err := client.disableRemoteDebuggingCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// disableRemoteDebuggingCreateRequest creates the DisableRemoteDebugging request. -func (client *DeploymentsClient) disableRemoteDebuggingCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginDisableRemoteDebuggingOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/disableRemoteDebugging" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - if deploymentName == "" { - return nil, errors.New("parameter deploymentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginEnableRemoteDebugging - Enable remote debugging. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - appName - The name of the App resource. -// - deploymentName - The name of the Deployment resource. -// - options - DeploymentsClientBeginEnableRemoteDebuggingOptions contains the optional parameters for the DeploymentsClient.BeginEnableRemoteDebugging -// method. -func (client *DeploymentsClient) BeginEnableRemoteDebugging(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginEnableRemoteDebuggingOptions) (*runtime.Poller[DeploymentsClientEnableRemoteDebuggingResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.enableRemoteDebugging(ctx, resourceGroupName, serviceName, appName, deploymentName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[DeploymentsClientEnableRemoteDebuggingResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientEnableRemoteDebuggingResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// EnableRemoteDebugging - Enable remote debugging. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *DeploymentsClient) enableRemoteDebugging(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginEnableRemoteDebuggingOptions) (*http.Response, error) { - req, err := client.enableRemoteDebuggingCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// enableRemoteDebuggingCreateRequest creates the EnableRemoteDebugging request. -func (client *DeploymentsClient) enableRemoteDebuggingCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginEnableRemoteDebuggingOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/enableRemoteDebugging" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - if deploymentName == "" { - return nil, errors.New("parameter deploymentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.RemoteDebuggingPayload != nil { - return req, runtime.MarshalAsJSON(req, *options.RemoteDebuggingPayload) - } - return req, nil -} - // BeginGenerateHeapDump - Generate Heap Dump // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -370,7 +219,9 @@ func (client *DeploymentsClient) BeginGenerateHeapDump(ctx context.Context, reso if err != nil { return nil, err } - return runtime.NewPoller[DeploymentsClientGenerateHeapDumpResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientGenerateHeapDumpResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[DeploymentsClientGenerateHeapDumpResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -379,7 +230,7 @@ func (client *DeploymentsClient) BeginGenerateHeapDump(ctx context.Context, reso // GenerateHeapDump - Generate Heap Dump // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *DeploymentsClient) generateHeapDump(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginGenerateHeapDumpOptions) (*http.Response, error) { req, err := client.generateHeapDumpCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters, options) if err != nil { @@ -423,7 +274,7 @@ func (client *DeploymentsClient) generateHeapDumpCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, diagnosticParameters) @@ -432,7 +283,7 @@ func (client *DeploymentsClient) generateHeapDumpCreateRequest(ctx context.Conte // BeginGenerateThreadDump - Generate Thread Dump // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -447,7 +298,9 @@ func (client *DeploymentsClient) BeginGenerateThreadDump(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller[DeploymentsClientGenerateThreadDumpResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientGenerateThreadDumpResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[DeploymentsClientGenerateThreadDumpResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -456,7 +309,7 @@ func (client *DeploymentsClient) BeginGenerateThreadDump(ctx context.Context, re // GenerateThreadDump - Generate Thread Dump // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *DeploymentsClient) generateThreadDump(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginGenerateThreadDumpOptions) (*http.Response, error) { req, err := client.generateThreadDumpCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters, options) if err != nil { @@ -500,7 +353,7 @@ func (client *DeploymentsClient) generateThreadDumpCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, diagnosticParameters) @@ -509,7 +362,7 @@ func (client *DeploymentsClient) generateThreadDumpCreateRequest(ctx context.Con // Get - Get a Deployment and its properties. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -559,7 +412,7 @@ func (client *DeploymentsClient) getCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -577,7 +430,7 @@ func (client *DeploymentsClient) getHandleResponse(resp *http.Response) (Deploym // GetLogFileURL - Get deployment log file URL // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -628,7 +481,7 @@ func (client *DeploymentsClient) getLogFileURLCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -643,78 +496,9 @@ func (client *DeploymentsClient) getLogFileURLHandleResponse(resp *http.Response return result, nil } -// GetRemoteDebuggingConfig - Get remote debugging config. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - appName - The name of the App resource. -// - deploymentName - The name of the Deployment resource. -// - options - DeploymentsClientGetRemoteDebuggingConfigOptions contains the optional parameters for the DeploymentsClient.GetRemoteDebuggingConfig -// method. -func (client *DeploymentsClient) GetRemoteDebuggingConfig(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientGetRemoteDebuggingConfigOptions) (DeploymentsClientGetRemoteDebuggingConfigResponse, error) { - req, err := client.getRemoteDebuggingConfigCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) - if err != nil { - return DeploymentsClientGetRemoteDebuggingConfigResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DeploymentsClientGetRemoteDebuggingConfigResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeploymentsClientGetRemoteDebuggingConfigResponse{}, runtime.NewResponseError(resp) - } - return client.getRemoteDebuggingConfigHandleResponse(resp) -} - -// getRemoteDebuggingConfigCreateRequest creates the GetRemoteDebuggingConfig request. -func (client *DeploymentsClient) getRemoteDebuggingConfigCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientGetRemoteDebuggingConfigOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/getRemoteDebuggingConfig" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - if deploymentName == "" { - return nil, errors.New("parameter deploymentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getRemoteDebuggingConfigHandleResponse handles the GetRemoteDebuggingConfig response. -func (client *DeploymentsClient) getRemoteDebuggingConfigHandleResponse(resp *http.Response) (DeploymentsClientGetRemoteDebuggingConfigResponse, error) { - result := DeploymentsClientGetRemoteDebuggingConfigResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RemoteDebugging); err != nil { - return DeploymentsClientGetRemoteDebuggingConfigResponse{}, err - } - return result, nil -} - // NewListPager - Handles requests to list all resources in an App. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -772,7 +556,7 @@ func (client *DeploymentsClient) listCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") if options != nil && options.Version != nil { for _, qv := range options.Version { reqQP.Add("version", qv) @@ -794,7 +578,7 @@ func (client *DeploymentsClient) listHandleResponse(resp *http.Response) (Deploy // NewListForClusterPager - List deployments for a certain service // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -848,7 +632,7 @@ func (client *DeploymentsClient) listForClusterCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") if options != nil && options.Version != nil { for _, qv := range options.Version { reqQP.Add("version", qv) @@ -871,7 +655,7 @@ func (client *DeploymentsClient) listForClusterHandleResponse(resp *http.Respons // BeginRestart - Restart the deployment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -885,7 +669,9 @@ func (client *DeploymentsClient) BeginRestart(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller[DeploymentsClientRestartResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientRestartResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[DeploymentsClientRestartResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -894,7 +680,7 @@ func (client *DeploymentsClient) BeginRestart(ctx context.Context, resourceGroup // Restart - Restart the deployment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *DeploymentsClient) restart(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginRestartOptions) (*http.Response, error) { req, err := client.restartCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) if err != nil { @@ -938,7 +724,7 @@ func (client *DeploymentsClient) restartCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -947,7 +733,7 @@ func (client *DeploymentsClient) restartCreateRequest(ctx context.Context, resou // BeginStart - Start the deployment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -960,7 +746,9 @@ func (client *DeploymentsClient) BeginStart(ctx context.Context, resourceGroupNa if err != nil { return nil, err } - return runtime.NewPoller[DeploymentsClientStartResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientStartResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[DeploymentsClientStartResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -969,7 +757,7 @@ func (client *DeploymentsClient) BeginStart(ctx context.Context, resourceGroupNa // Start - Start the deployment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *DeploymentsClient) start(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginStartOptions) (*http.Response, error) { req, err := client.startCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) if err != nil { @@ -1013,7 +801,7 @@ func (client *DeploymentsClient) startCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1022,7 +810,7 @@ func (client *DeploymentsClient) startCreateRequest(ctx context.Context, resourc // BeginStartJFR - Start JFR // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -1037,7 +825,9 @@ func (client *DeploymentsClient) BeginStartJFR(ctx context.Context, resourceGrou if err != nil { return nil, err } - return runtime.NewPoller[DeploymentsClientStartJFRResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientStartJFRResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[DeploymentsClientStartJFRResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -1046,7 +836,7 @@ func (client *DeploymentsClient) BeginStartJFR(ctx context.Context, resourceGrou // StartJFR - Start JFR // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *DeploymentsClient) startJFR(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginStartJFROptions) (*http.Response, error) { req, err := client.startJFRCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters, options) if err != nil { @@ -1090,7 +880,7 @@ func (client *DeploymentsClient) startJFRCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, diagnosticParameters) @@ -1099,7 +889,7 @@ func (client *DeploymentsClient) startJFRCreateRequest(ctx context.Context, reso // BeginStop - Stop the deployment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -1112,7 +902,9 @@ func (client *DeploymentsClient) BeginStop(ctx context.Context, resourceGroupNam if err != nil { return nil, err } - return runtime.NewPoller[DeploymentsClientStopResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientStopResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[DeploymentsClientStopResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -1121,7 +913,7 @@ func (client *DeploymentsClient) BeginStop(ctx context.Context, resourceGroupNam // Stop - Stop the deployment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *DeploymentsClient) stop(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginStopOptions) (*http.Response, error) { req, err := client.stopCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) if err != nil { @@ -1165,7 +957,7 @@ func (client *DeploymentsClient) stopCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1174,7 +966,7 @@ func (client *DeploymentsClient) stopCreateRequest(ctx context.Context, resource // BeginUpdate - Operation to update an exiting Deployment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -1188,7 +980,9 @@ func (client *DeploymentsClient) BeginUpdate(ctx context.Context, resourceGroupN if err != nil { return nil, err } - return runtime.NewPoller[DeploymentsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[DeploymentsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -1197,7 +991,7 @@ func (client *DeploymentsClient) BeginUpdate(ctx context.Context, resourceGroupN // Update - Operation to update an exiting Deployment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *DeploymentsClient) update(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource, options *DeploymentsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, deploymentResource, options) if err != nil { @@ -1241,7 +1035,7 @@ func (client *DeploymentsClient) updateCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, deploymentResource) diff --git a/sdk/resourcemanager/appplatform/armappplatform/deployments_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/deployments_client_example_test.go index 76195b7f18f2..060f051b6732 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/deployments_client_example_test.go +++ b/sdk/resourcemanager/appplatform/armappplatform/deployments_client_example_test.go @@ -18,8 +18,8 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Get.json -func ExampleDeploymentsClient_Get_deploymentsGet() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_Get.json +func ExampleDeploymentsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -83,84 +83,8 @@ func ExampleDeploymentsClient_Get_deploymentsGet() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Get_CustomContainer.json -func ExampleDeploymentsClient_Get_deploymentsGetCustomContainer() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDeploymentsClient().Get(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", 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.DeploymentResource = armappplatform.DeploymentResource{ - // Name: to.Ptr("mydeployment"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/apps/deployments"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/deployments/mydeployment"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.DeploymentResourceProperties{ - // Active: to.Ptr(false), - // DeploymentSettings: &armappplatform.DeploymentSettings{ - // EnvironmentVariables: map[string]*string{ - // "env": to.Ptr("test"), - // }, - // ResourceRequests: &armappplatform.ResourceRequests{ - // CPU: to.Ptr("1000m"), - // Memory: to.Ptr("3Gi"), - // }, - // }, - // Instances: []*armappplatform.DeploymentInstance{ - // { - // Name: to.Ptr("instance1"), - // DiscoveryStatus: to.Ptr("N/A"), - // StartTime: to.Ptr("2020-08-26T01:55:02Z"), - // Status: to.Ptr("Running"), - // }}, - // ProvisioningState: to.Ptr(armappplatform.DeploymentResourceProvisioningStateSucceeded), - // Source: &armappplatform.CustomContainerUserSourceInfo{ - // Type: to.Ptr("Container"), - // CustomContainer: &armappplatform.CustomContainer{ - // Args: []*string{ - // to.Ptr("-c"), - // to.Ptr("while true; do echo hello; sleep 10;done")}, - // Command: []*string{ - // to.Ptr("/bin/sh")}, - // ContainerImage: to.Ptr("myContainerImage:v1"), - // ImageRegistryCredential: &armappplatform.ImageRegistryCredential{ - // Password: to.Ptr(""), - // Username: to.Ptr("myUsername"), - // }, - // LanguageFramework: to.Ptr("springboot"), - // Server: to.Ptr("myacr.azurecr.io"), - // }, - // }, - // Status: to.Ptr(armappplatform.DeploymentResourceStatusRunning), - // }, - // SKU: &armappplatform.SKU{ - // Name: to.Ptr("S0"), - // Capacity: to.Ptr[int32](1), - // Tier: to.Ptr("Standard"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_CreateOrUpdate.json -func ExampleDeploymentsClient_BeginCreateOrUpdate_deploymentsCreateOrUpdate() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_CreateOrUpdate.json +func ExampleDeploymentsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -183,33 +107,10 @@ func ExampleDeploymentsClient_BeginCreateOrUpdate_deploymentsCreateOrUpdate() { EnvironmentVariables: map[string]*string{ "env": to.Ptr("test"), }, - LivenessProbe: &armappplatform.Probe{ - DisableProbe: to.Ptr(false), - FailureThreshold: to.Ptr[int32](3), - InitialDelaySeconds: to.Ptr[int32](30), - PeriodSeconds: to.Ptr[int32](10), - ProbeAction: &armappplatform.HTTPGetAction{ - Type: to.Ptr(armappplatform.ProbeActionTypeHTTPGetAction), - Path: to.Ptr("/health"), - Scheme: to.Ptr(armappplatform.HTTPSchemeTypeHTTP), - }, - }, - ReadinessProbe: &armappplatform.Probe{ - DisableProbe: to.Ptr(false), - FailureThreshold: to.Ptr[int32](3), - InitialDelaySeconds: to.Ptr[int32](30), - PeriodSeconds: to.Ptr[int32](10), - ProbeAction: &armappplatform.HTTPGetAction{ - Type: to.Ptr(armappplatform.ProbeActionTypeHTTPGetAction), - Path: to.Ptr("/health"), - Scheme: to.Ptr(armappplatform.HTTPSchemeTypeHTTP), - }, - }, ResourceRequests: &armappplatform.ResourceRequests{ CPU: to.Ptr("1000m"), Memory: to.Ptr("3Gi"), }, - TerminationGracePeriodSeconds: to.Ptr[int32](30), }, Source: &armappplatform.SourceUploadedUserSourceInfo{ Type: to.Ptr("Source"), @@ -252,33 +153,10 @@ func ExampleDeploymentsClient_BeginCreateOrUpdate_deploymentsCreateOrUpdate() { // EnvironmentVariables: map[string]*string{ // "env": to.Ptr("test"), // }, - // LivenessProbe: &armappplatform.Probe{ - // DisableProbe: to.Ptr(false), - // FailureThreshold: to.Ptr[int32](3), - // InitialDelaySeconds: to.Ptr[int32](30), - // PeriodSeconds: to.Ptr[int32](10), - // ProbeAction: &armappplatform.HTTPGetAction{ - // Type: to.Ptr(armappplatform.ProbeActionTypeHTTPGetAction), - // Path: to.Ptr("/health"), - // Scheme: to.Ptr(armappplatform.HTTPSchemeTypeHTTP), - // }, - // }, - // ReadinessProbe: &armappplatform.Probe{ - // DisableProbe: to.Ptr(false), - // FailureThreshold: to.Ptr[int32](3), - // InitialDelaySeconds: to.Ptr[int32](30), - // PeriodSeconds: to.Ptr[int32](10), - // ProbeAction: &armappplatform.HTTPGetAction{ - // Type: to.Ptr(armappplatform.ProbeActionTypeHTTPGetAction), - // Path: to.Ptr("/health"), - // Scheme: to.Ptr(armappplatform.HTTPSchemeTypeHTTP), - // }, - // }, // ResourceRequests: &armappplatform.ResourceRequests{ // CPU: to.Ptr("1000m"), // Memory: to.Ptr("3Gi"), // }, - // TerminationGracePeriodSeconds: to.Ptr[int32](30), // }, // Instances: []*armappplatform.DeploymentInstance{ // { @@ -304,157 +182,7 @@ func ExampleDeploymentsClient_BeginCreateOrUpdate_deploymentsCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_CreateOrUpdate_CustomContainer.json -func ExampleDeploymentsClient_BeginCreateOrUpdate_deploymentsCreateOrUpdateCustomContainer() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewDeploymentsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DeploymentResource{ - Properties: &armappplatform.DeploymentResourceProperties{ - DeploymentSettings: &armappplatform.DeploymentSettings{ - EnvironmentVariables: map[string]*string{ - "env": to.Ptr("test"), - }, - LivenessProbe: &armappplatform.Probe{ - DisableProbe: to.Ptr(false), - FailureThreshold: to.Ptr[int32](3), - InitialDelaySeconds: to.Ptr[int32](30), - PeriodSeconds: to.Ptr[int32](10), - ProbeAction: &armappplatform.HTTPGetAction{ - Type: to.Ptr(armappplatform.ProbeActionTypeHTTPGetAction), - Path: to.Ptr("/health"), - Scheme: to.Ptr(armappplatform.HTTPSchemeTypeHTTP), - }, - }, - ReadinessProbe: &armappplatform.Probe{ - DisableProbe: to.Ptr(false), - FailureThreshold: to.Ptr[int32](3), - InitialDelaySeconds: to.Ptr[int32](30), - PeriodSeconds: to.Ptr[int32](10), - ProbeAction: &armappplatform.HTTPGetAction{ - Type: to.Ptr(armappplatform.ProbeActionTypeHTTPGetAction), - Path: to.Ptr("/health"), - Scheme: to.Ptr(armappplatform.HTTPSchemeTypeHTTP), - }, - }, - ResourceRequests: &armappplatform.ResourceRequests{ - CPU: to.Ptr("1000m"), - Memory: to.Ptr("3Gi"), - }, - TerminationGracePeriodSeconds: to.Ptr[int32](30), - }, - Source: &armappplatform.CustomContainerUserSourceInfo{ - Type: to.Ptr("Container"), - CustomContainer: &armappplatform.CustomContainer{ - Args: []*string{ - to.Ptr("-c"), - to.Ptr("while true; do echo hello; sleep 10;done")}, - Command: []*string{ - to.Ptr("/bin/sh")}, - ContainerImage: to.Ptr("myContainerImage:v1"), - ImageRegistryCredential: &armappplatform.ImageRegistryCredential{ - Password: to.Ptr("myPassword"), - Username: to.Ptr("myUsername"), - }, - LanguageFramework: to.Ptr("springboot"), - Server: to.Ptr("myacr.azurecr.io"), - }, - }, - }, - }, 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.DeploymentResource = armappplatform.DeploymentResource{ - // Name: to.Ptr("mydeployment"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/apps/deployments"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/deployments/mydeployment"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.DeploymentResourceProperties{ - // Active: to.Ptr(false), - // DeploymentSettings: &armappplatform.DeploymentSettings{ - // EnvironmentVariables: map[string]*string{ - // "env": to.Ptr("test"), - // }, - // LivenessProbe: &armappplatform.Probe{ - // DisableProbe: to.Ptr(false), - // FailureThreshold: to.Ptr[int32](3), - // InitialDelaySeconds: to.Ptr[int32](30), - // PeriodSeconds: to.Ptr[int32](10), - // ProbeAction: &armappplatform.HTTPGetAction{ - // Type: to.Ptr(armappplatform.ProbeActionTypeHTTPGetAction), - // Path: to.Ptr("/health"), - // Scheme: to.Ptr(armappplatform.HTTPSchemeTypeHTTP), - // }, - // }, - // ReadinessProbe: &armappplatform.Probe{ - // DisableProbe: to.Ptr(false), - // FailureThreshold: to.Ptr[int32](3), - // InitialDelaySeconds: to.Ptr[int32](30), - // PeriodSeconds: to.Ptr[int32](10), - // ProbeAction: &armappplatform.HTTPGetAction{ - // Type: to.Ptr(armappplatform.ProbeActionTypeHTTPGetAction), - // Path: to.Ptr("/health"), - // Scheme: to.Ptr(armappplatform.HTTPSchemeTypeHTTP), - // }, - // }, - // ResourceRequests: &armappplatform.ResourceRequests{ - // CPU: to.Ptr("1000m"), - // Memory: to.Ptr("3Gi"), - // }, - // TerminationGracePeriodSeconds: to.Ptr[int32](30), - // }, - // Instances: []*armappplatform.DeploymentInstance{ - // { - // Name: to.Ptr("instance1"), - // DiscoveryStatus: to.Ptr("N/A"), - // StartTime: to.Ptr("2020-08-26T01:55:02Z"), - // Status: to.Ptr("Running"), - // }}, - // ProvisioningState: to.Ptr(armappplatform.DeploymentResourceProvisioningStateSucceeded), - // Source: &armappplatform.CustomContainerUserSourceInfo{ - // Type: to.Ptr("Container"), - // CustomContainer: &armappplatform.CustomContainer{ - // ContainerImage: to.Ptr("myContainerImage:v1"), - // ImageRegistryCredential: &armappplatform.ImageRegistryCredential{ - // Password: to.Ptr(""), - // Username: to.Ptr("myUsername"), - // }, - // LanguageFramework: to.Ptr("springboot"), - // Server: to.Ptr("myacr.azurecr.io"), - // }, - // }, - // Status: to.Ptr(armappplatform.DeploymentResourceStatusRunning), - // }, - // SKU: &armappplatform.SKU{ - // Name: to.Ptr("S0"), - // Capacity: to.Ptr[int32](1), - // Tier: to.Ptr("Standard"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_Delete.json func ExampleDeploymentsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -475,8 +203,8 @@ func ExampleDeploymentsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Update.json -func ExampleDeploymentsClient_BeginUpdate_deploymentsUpdate() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_Update.json +func ExampleDeploymentsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -553,100 +281,7 @@ func ExampleDeploymentsClient_BeginUpdate_deploymentsUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Update_CustomContainer.json -func ExampleDeploymentsClient_BeginUpdate_deploymentsUpdateCustomContainer() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewDeploymentsClient().BeginUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DeploymentResource{ - Properties: &armappplatform.DeploymentResourceProperties{ - Source: &armappplatform.CustomContainerUserSourceInfo{ - Type: to.Ptr("Container"), - CustomContainer: &armappplatform.CustomContainer{ - Args: []*string{ - to.Ptr("-c"), - to.Ptr("while true; do echo hello; sleep 10;done")}, - Command: []*string{ - to.Ptr("/bin/sh")}, - ContainerImage: to.Ptr("myNewContainerImage:v1"), - ImageRegistryCredential: &armappplatform.ImageRegistryCredential{ - Password: to.Ptr(""), - Username: to.Ptr("myNewUsername"), - }, - Server: to.Ptr("mynewacr.azurecr.io"), - }, - }, - }, - }, 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.DeploymentResource = armappplatform.DeploymentResource{ - // Name: to.Ptr("mydeployment"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/apps/deployments"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/deployments/mydeployment"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.DeploymentResourceProperties{ - // Active: to.Ptr(false), - // DeploymentSettings: &armappplatform.DeploymentSettings{ - // EnvironmentVariables: map[string]*string{ - // "env": to.Ptr("test"), - // }, - // ResourceRequests: &armappplatform.ResourceRequests{ - // CPU: to.Ptr("1000m"), - // Memory: to.Ptr("3Gi"), - // }, - // }, - // Instances: []*armappplatform.DeploymentInstance{ - // { - // Name: to.Ptr("instance1"), - // DiscoveryStatus: to.Ptr("N/A"), - // StartTime: to.Ptr("2020-08-26T01:55:02Z"), - // Status: to.Ptr("Running"), - // }}, - // ProvisioningState: to.Ptr(armappplatform.DeploymentResourceProvisioningStateSucceeded), - // Source: &armappplatform.CustomContainerUserSourceInfo{ - // Type: to.Ptr("Container"), - // CustomContainer: &armappplatform.CustomContainer{ - // ContainerImage: to.Ptr("myNewContainerImage:v1"), - // ImageRegistryCredential: &armappplatform.ImageRegistryCredential{ - // Password: to.Ptr(""), - // Username: to.Ptr("myNewUsername"), - // }, - // Server: to.Ptr("mynewacr.azurecr.io"), - // }, - // }, - // Status: to.Ptr(armappplatform.DeploymentResourceStatusRunning), - // }, - // SKU: &armappplatform.SKU{ - // Name: to.Ptr("S0"), - // Capacity: to.Ptr[int32](1), - // Tier: to.Ptr("Standard"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_List.json func ExampleDeploymentsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -719,7 +354,7 @@ func ExampleDeploymentsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_ListForCluster.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_ListForCluster.json func ExampleDeploymentsClient_NewListForClusterPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -792,7 +427,7 @@ func ExampleDeploymentsClient_NewListForClusterPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Start.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_Start.json func ExampleDeploymentsClient_BeginStart() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -813,7 +448,7 @@ func ExampleDeploymentsClient_BeginStart() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Stop.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_Stop.json func ExampleDeploymentsClient_BeginStop() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -834,7 +469,7 @@ func ExampleDeploymentsClient_BeginStop() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Restart.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_Restart.json func ExampleDeploymentsClient_BeginRestart() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -855,87 +490,7 @@ func ExampleDeploymentsClient_BeginRestart() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_EnableRemoteDebugging.json -func ExampleDeploymentsClient_BeginEnableRemoteDebugging() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewDeploymentsClient().BeginEnableRemoteDebugging(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", &armappplatform.DeploymentsClientBeginEnableRemoteDebuggingOptions{RemoteDebuggingPayload: &armappplatform.RemoteDebuggingPayload{}}) - 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.RemoteDebugging = armappplatform.RemoteDebugging{ - // Enabled: to.Ptr(true), - // Port: to.Ptr[int32](5005), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_DisableRemoteDebugging.json -func ExampleDeploymentsClient_BeginDisableRemoteDebugging() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewDeploymentsClient().BeginDisableRemoteDebugging(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", 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.RemoteDebugging = armappplatform.RemoteDebugging{ - // Enabled: to.Ptr(false), - // Port: to.Ptr[int32](5005), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_GetRemoteDebuggingConfig.json -func ExampleDeploymentsClient_GetRemoteDebuggingConfig() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDeploymentsClient().GetRemoteDebuggingConfig(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", 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.RemoteDebugging = armappplatform.RemoteDebugging{ - // Enabled: to.Ptr(true), - // Port: to.Ptr[int32](5005), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_GetLogFileUrl.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_GetLogFileUrl.json func ExampleDeploymentsClient_GetLogFileURL() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -958,7 +513,7 @@ func ExampleDeploymentsClient_GetLogFileURL() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_GenerateHeapDump.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_GenerateHeapDump.json func ExampleDeploymentsClient_BeginGenerateHeapDump() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -982,7 +537,7 @@ func ExampleDeploymentsClient_BeginGenerateHeapDump() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_GenerateThreadDump.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_GenerateThreadDump.json func ExampleDeploymentsClient_BeginGenerateThreadDump() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1006,7 +561,7 @@ func ExampleDeploymentsClient_BeginGenerateThreadDump() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_StartJFR.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_StartJFR.json func ExampleDeploymentsClient_BeginStartJFR() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appplatform/armappplatform/devtoolportals_client.go b/sdk/resourcemanager/appplatform/armappplatform/devtoolportals_client.go deleted file mode 100644 index 46146e9e9432..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/devtoolportals_client.go +++ /dev/null @@ -1,322 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappplatform - -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" -) - -// DevToolPortalsClient contains the methods for the DevToolPortals group. -// Don't use this type directly, use NewDevToolPortalsClient() instead. -type DevToolPortalsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewDevToolPortalsClient creates a new instance of DevToolPortalsClient with the specified values. -// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewDevToolPortalsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DevToolPortalsClient, error) { - cl, err := arm.NewClient(moduleName+".DevToolPortalsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &DevToolPortalsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create the default Dev Tool Portal or update the existing Dev Tool Portal. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - devToolPortalName - The name of Dev Tool Portal. -// - devToolPortalResource - Parameters for the create or update operation -// - options - DevToolPortalsClientBeginCreateOrUpdateOptions contains the optional parameters for the DevToolPortalsClient.BeginCreateOrUpdate -// method. -func (client *DevToolPortalsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, devToolPortalName string, devToolPortalResource DevToolPortalResource, options *DevToolPortalsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DevToolPortalsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, devToolPortalName, devToolPortalResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[DevToolPortalsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[DevToolPortalsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// CreateOrUpdate - Create the default Dev Tool Portal or update the existing Dev Tool Portal. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *DevToolPortalsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, devToolPortalName string, devToolPortalResource DevToolPortalResource, options *DevToolPortalsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, devToolPortalName, devToolPortalResource, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *DevToolPortalsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, devToolPortalName string, devToolPortalResource DevToolPortalResource, options *DevToolPortalsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/DevToolPortals/{devToolPortalName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if devToolPortalName == "" { - return nil, errors.New("parameter devToolPortalName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{devToolPortalName}", url.PathEscape(devToolPortalName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, devToolPortalResource) -} - -// BeginDelete - Disable the default Dev Tool Portal. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - devToolPortalName - The name of Dev Tool Portal. -// - options - DevToolPortalsClientBeginDeleteOptions contains the optional parameters for the DevToolPortalsClient.BeginDelete -// method. -func (client *DevToolPortalsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, devToolPortalName string, options *DevToolPortalsClientBeginDeleteOptions) (*runtime.Poller[DevToolPortalsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, devToolPortalName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[DevToolPortalsClientDeleteResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[DevToolPortalsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Delete - Disable the default Dev Tool Portal. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *DevToolPortalsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, devToolPortalName string, options *DevToolPortalsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, devToolPortalName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *DevToolPortalsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, devToolPortalName string, options *DevToolPortalsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/DevToolPortals/{devToolPortalName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if devToolPortalName == "" { - return nil, errors.New("parameter devToolPortalName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{devToolPortalName}", url.PathEscape(devToolPortalName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the Application Live and its properties. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - devToolPortalName - The name of Dev Tool Portal. -// - options - DevToolPortalsClientGetOptions contains the optional parameters for the DevToolPortalsClient.Get method. -func (client *DevToolPortalsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, devToolPortalName string, options *DevToolPortalsClientGetOptions) (DevToolPortalsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, devToolPortalName, options) - if err != nil { - return DevToolPortalsClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DevToolPortalsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DevToolPortalsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *DevToolPortalsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, devToolPortalName string, options *DevToolPortalsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/DevToolPortals/{devToolPortalName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if devToolPortalName == "" { - return nil, errors.New("parameter devToolPortalName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{devToolPortalName}", url.PathEscape(devToolPortalName)) - 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", "2022-11-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 *DevToolPortalsClient) getHandleResponse(resp *http.Response) (DevToolPortalsClientGetResponse, error) { - result := DevToolPortalsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DevToolPortalResource); err != nil { - return DevToolPortalsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Handles requests to list all resources in a Service. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - options - DevToolPortalsClientListOptions contains the optional parameters for the DevToolPortalsClient.NewListPager method. -func (client *DevToolPortalsClient) NewListPager(resourceGroupName string, serviceName string, options *DevToolPortalsClientListOptions) *runtime.Pager[DevToolPortalsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[DevToolPortalsClientListResponse]{ - More: func(page DevToolPortalsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DevToolPortalsClientListResponse) (DevToolPortalsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DevToolPortalsClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DevToolPortalsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DevToolPortalsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *DevToolPortalsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *DevToolPortalsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/DevToolPortals" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *DevToolPortalsClient) listHandleResponse(resp *http.Response) (DevToolPortalsClientListResponse, error) { - result := DevToolPortalsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DevToolPortalResourceCollection); err != nil { - return DevToolPortalsClientListResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/devtoolportals_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/devtoolportals_client_example_test.go deleted file mode 100644 index 28a333582bbc..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/devtoolportals_client_example_test.go +++ /dev/null @@ -1,263 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/DevToolPortals_List.json -func ExampleDevToolPortalsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDevToolPortalsClient().NewListPager("myResourceGroup", "myservice", 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.DevToolPortalResourceCollection = armappplatform.DevToolPortalResourceCollection{ - // Value: []*armappplatform.DevToolPortalResource{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/applicationLiveViews"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/applicationLiveViews/default"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.DevToolPortalProperties{ - // Features: &armappplatform.DevToolPortalFeatureSettings{ - // ApplicationAccelerator: &armappplatform.DevToolPortalFeatureDetail{ - // Route: to.Ptr("create"), - // State: to.Ptr(armappplatform.DevToolPortalFeatureStateEnabled), - // }, - // ApplicationLiveView: &armappplatform.DevToolPortalFeatureDetail{ - // Route: to.Ptr("appliveview"), - // State: to.Ptr(armappplatform.DevToolPortalFeatureStateEnabled), - // }, - // }, - // Instances: []*armappplatform.DevToolPortalInstance{ - // { - // Name: to.Ptr("app-live-view-server-name"), - // Status: to.Ptr("Running"), - // }}, - // ProvisioningState: to.Ptr(armappplatform.DevToolPortalProvisioningStateSucceeded), - // Public: to.Ptr(true), - // ResourceRequests: &armappplatform.DevToolPortalResourceRequests{ - // CPU: to.Ptr("1"), - // InstanceCount: to.Ptr[int32](1), - // Memory: to.Ptr("1Gi"), - // }, - // SsoProperties: &armappplatform.DevToolPortalSsoProperties{ - // ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // MetadataURL: to.Ptr("https://login.microsoft.com/00000000-0000-0000-0000-000000000000/v2.0/.well-known/openid-configuration"), - // Scopes: []*string{ - // to.Ptr("openid")}, - // }, - // URL: to.Ptr("aaa.com"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/DevToolPortals_Get.json -func ExampleDevToolPortalsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDevToolPortalsClient().Get(ctx, "myResourceGroup", "myservice", "default", 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.DevToolPortalResource = armappplatform.DevToolPortalResource{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/applicationLiveViews"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/applicationLiveViews/default"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.DevToolPortalProperties{ - // Features: &armappplatform.DevToolPortalFeatureSettings{ - // ApplicationAccelerator: &armappplatform.DevToolPortalFeatureDetail{ - // Route: to.Ptr("create"), - // State: to.Ptr(armappplatform.DevToolPortalFeatureStateEnabled), - // }, - // ApplicationLiveView: &armappplatform.DevToolPortalFeatureDetail{ - // Route: to.Ptr("appliveview"), - // State: to.Ptr(armappplatform.DevToolPortalFeatureStateEnabled), - // }, - // }, - // Instances: []*armappplatform.DevToolPortalInstance{ - // { - // Name: to.Ptr("app-live-view-server-name"), - // Status: to.Ptr("Running"), - // }}, - // ProvisioningState: to.Ptr(armappplatform.DevToolPortalProvisioningStateSucceeded), - // Public: to.Ptr(true), - // ResourceRequests: &armappplatform.DevToolPortalResourceRequests{ - // CPU: to.Ptr("1"), - // InstanceCount: to.Ptr[int32](1), - // Memory: to.Ptr("1Gi"), - // }, - // SsoProperties: &armappplatform.DevToolPortalSsoProperties{ - // ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // MetadataURL: to.Ptr("https://login.microsoft.com/00000000-0000-0000-0000-000000000000/v2.0/.well-known/openid-configuration"), - // Scopes: []*string{ - // to.Ptr("openid")}, - // }, - // URL: to.Ptr("aaa.com"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/DevToolPortals_CreateOrUpdate.json -func ExampleDevToolPortalsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewDevToolPortalsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", armappplatform.DevToolPortalResource{ - Properties: &armappplatform.DevToolPortalProperties{ - Features: &armappplatform.DevToolPortalFeatureSettings{ - ApplicationAccelerator: &armappplatform.DevToolPortalFeatureDetail{ - State: to.Ptr(armappplatform.DevToolPortalFeatureStateEnabled), - }, - ApplicationLiveView: &armappplatform.DevToolPortalFeatureDetail{ - State: to.Ptr(armappplatform.DevToolPortalFeatureStateEnabled), - }, - }, - Public: to.Ptr(true), - SsoProperties: &armappplatform.DevToolPortalSsoProperties{ - ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"), - ClientSecret: to.Ptr("xxxxx"), - MetadataURL: to.Ptr("https://login.microsoft.com/00000000-0000-0000-0000-000000000000/v2.0/.well-known/openid-configuration"), - Scopes: []*string{ - to.Ptr("openid")}, - }, - }, - }, 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.DevToolPortalResource = armappplatform.DevToolPortalResource{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/applicationLiveViews"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/applicationLiveViews/default"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.DevToolPortalProperties{ - // Features: &armappplatform.DevToolPortalFeatureSettings{ - // ApplicationAccelerator: &armappplatform.DevToolPortalFeatureDetail{ - // Route: to.Ptr("create"), - // State: to.Ptr(armappplatform.DevToolPortalFeatureStateEnabled), - // }, - // ApplicationLiveView: &armappplatform.DevToolPortalFeatureDetail{ - // Route: to.Ptr("appliveview"), - // State: to.Ptr(armappplatform.DevToolPortalFeatureStateEnabled), - // }, - // }, - // Instances: []*armappplatform.DevToolPortalInstance{ - // { - // Name: to.Ptr("app-live-view-server-name"), - // Status: to.Ptr("Running"), - // }}, - // ProvisioningState: to.Ptr(armappplatform.DevToolPortalProvisioningStateSucceeded), - // Public: to.Ptr(true), - // ResourceRequests: &armappplatform.DevToolPortalResourceRequests{ - // CPU: to.Ptr("1"), - // InstanceCount: to.Ptr[int32](1), - // Memory: to.Ptr("1Gi"), - // }, - // SsoProperties: &armappplatform.DevToolPortalSsoProperties{ - // ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // MetadataURL: to.Ptr("https://login.microsoft.com/00000000-0000-0000-0000-000000000000/v2.0/.well-known/openid-configuration"), - // Scopes: []*string{ - // to.Ptr("openid")}, - // }, - // URL: to.Ptr("aaa.com"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/DevToolPortal_Delete.json -func ExampleDevToolPortalsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewDevToolPortalsClient().BeginDelete(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/gatewaycustomdomains_client.go b/sdk/resourcemanager/appplatform/armappplatform/gatewaycustomdomains_client.go deleted file mode 100644 index 65ad907f72bf..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/gatewaycustomdomains_client.go +++ /dev/null @@ -1,344 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappplatform - -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" -) - -// GatewayCustomDomainsClient contains the methods for the GatewayCustomDomains group. -// Don't use this type directly, use NewGatewayCustomDomainsClient() instead. -type GatewayCustomDomainsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewGatewayCustomDomainsClient creates a new instance of GatewayCustomDomainsClient with the specified values. -// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewGatewayCustomDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GatewayCustomDomainsClient, error) { - cl, err := arm.NewClient(moduleName+".GatewayCustomDomainsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &GatewayCustomDomainsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create or update the Spring Cloud Gateway custom domain. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - gatewayName - The name of Spring Cloud Gateway. -// - domainName - The name of the Spring Cloud Gateway custom domain. -// - gatewayCustomDomainResource - The gateway custom domain resource for the create or update operation -// - options - GatewayCustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewayCustomDomainsClient.BeginCreateOrUpdate -// method. -func (client *GatewayCustomDomainsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, gatewayCustomDomainResource GatewayCustomDomainResource, options *GatewayCustomDomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[GatewayCustomDomainsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, gatewayName, domainName, gatewayCustomDomainResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[GatewayCustomDomainsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[GatewayCustomDomainsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// CreateOrUpdate - Create or update the Spring Cloud Gateway custom domain. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *GatewayCustomDomainsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, gatewayCustomDomainResource GatewayCustomDomainResource, options *GatewayCustomDomainsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, domainName, gatewayCustomDomainResource, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *GatewayCustomDomainsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, gatewayCustomDomainResource GatewayCustomDomainResource, options *GatewayCustomDomainsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains/{domainName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, gatewayCustomDomainResource) -} - -// BeginDelete - Delete the Spring Cloud Gateway custom domain. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - gatewayName - The name of Spring Cloud Gateway. -// - domainName - The name of the Spring Cloud Gateway custom domain. -// - options - GatewayCustomDomainsClientBeginDeleteOptions contains the optional parameters for the GatewayCustomDomainsClient.BeginDelete -// method. -func (client *GatewayCustomDomainsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, options *GatewayCustomDomainsClientBeginDeleteOptions) (*runtime.Poller[GatewayCustomDomainsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, gatewayName, domainName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[GatewayCustomDomainsClientDeleteResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[GatewayCustomDomainsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Delete - Delete the Spring Cloud Gateway custom domain. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *GatewayCustomDomainsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, options *GatewayCustomDomainsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, domainName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *GatewayCustomDomainsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, options *GatewayCustomDomainsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains/{domainName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the Spring Cloud Gateway custom domain. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - gatewayName - The name of Spring Cloud Gateway. -// - domainName - The name of the Spring Cloud Gateway custom domain. -// - options - GatewayCustomDomainsClientGetOptions contains the optional parameters for the GatewayCustomDomainsClient.Get -// method. -func (client *GatewayCustomDomainsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, options *GatewayCustomDomainsClientGetOptions) (GatewayCustomDomainsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, domainName, options) - if err != nil { - return GatewayCustomDomainsClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return GatewayCustomDomainsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewayCustomDomainsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *GatewayCustomDomainsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, options *GatewayCustomDomainsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains/{domainName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - 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", "2022-11-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 *GatewayCustomDomainsClient) getHandleResponse(resp *http.Response) (GatewayCustomDomainsClientGetResponse, error) { - result := GatewayCustomDomainsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.GatewayCustomDomainResource); err != nil { - return GatewayCustomDomainsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Handle requests to list all Spring Cloud Gateway custom domains. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - gatewayName - The name of Spring Cloud Gateway. -// - options - GatewayCustomDomainsClientListOptions contains the optional parameters for the GatewayCustomDomainsClient.NewListPager -// method. -func (client *GatewayCustomDomainsClient) NewListPager(resourceGroupName string, serviceName string, gatewayName string, options *GatewayCustomDomainsClientListOptions) *runtime.Pager[GatewayCustomDomainsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[GatewayCustomDomainsClientListResponse]{ - More: func(page GatewayCustomDomainsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *GatewayCustomDomainsClientListResponse) (GatewayCustomDomainsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return GatewayCustomDomainsClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return GatewayCustomDomainsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewayCustomDomainsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *GatewayCustomDomainsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewayCustomDomainsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *GatewayCustomDomainsClient) listHandleResponse(resp *http.Response) (GatewayCustomDomainsClientListResponse, error) { - result := GatewayCustomDomainsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.GatewayCustomDomainResourceCollection); err != nil { - return GatewayCustomDomainsClientListResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/gatewaycustomdomains_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/gatewaycustomdomains_client_example_test.go deleted file mode 100644 index e6fd2e840995..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/gatewaycustomdomains_client_example_test.go +++ /dev/null @@ -1,164 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/GatewayCustomDomains_Get.json -func ExampleGatewayCustomDomainsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGatewayCustomDomainsClient().Get(ctx, "myResourceGroup", "myservice", "default", "myDomainName", 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.GatewayCustomDomainResource = armappplatform.GatewayCustomDomainResource{ - // Name: to.Ptr("myDomainName"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/gateways/domains"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/gateways/default/domains/myDomainName"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.GatewayCustomDomainProperties{ - // Thumbprint: to.Ptr("*"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/GatewayCustomDomains_CreateOrUpdate.json -func ExampleGatewayCustomDomainsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewGatewayCustomDomainsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", "myDomainName", armappplatform.GatewayCustomDomainResource{ - Properties: &armappplatform.GatewayCustomDomainProperties{ - Thumbprint: to.Ptr("*"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.GatewayCustomDomainResource = armappplatform.GatewayCustomDomainResource{ - // Name: to.Ptr("myDomainName"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/gateways/domains"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/gateways/default/domains/myDomainName"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.GatewayCustomDomainProperties{ - // Thumbprint: to.Ptr("*"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/GatewayCustomDomains_Delete.json -func ExampleGatewayCustomDomainsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewGatewayCustomDomainsClient().BeginDelete(ctx, "myResourceGroup", "myservice", "default", "myDomainName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/GatewayCustomDomains_List.json -func ExampleGatewayCustomDomainsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewGatewayCustomDomainsClient().NewListPager("myResourceGroup", "myservice", "default", 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.GatewayCustomDomainResourceCollection = armappplatform.GatewayCustomDomainResourceCollection{ - // Value: []*armappplatform.GatewayCustomDomainResource{ - // { - // Name: to.Ptr("myDomain"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/gateways/domains"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/gateways/default/domains/myDomain"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.GatewayCustomDomainProperties{ - // Thumbprint: to.Ptr("*"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/gatewayrouteconfigs_client.go b/sdk/resourcemanager/appplatform/armappplatform/gatewayrouteconfigs_client.go deleted file mode 100644 index 570561bddae3..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/gatewayrouteconfigs_client.go +++ /dev/null @@ -1,345 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappplatform - -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" -) - -// GatewayRouteConfigsClient contains the methods for the GatewayRouteConfigs group. -// Don't use this type directly, use NewGatewayRouteConfigsClient() instead. -type GatewayRouteConfigsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewGatewayRouteConfigsClient creates a new instance of GatewayRouteConfigsClient with the specified values. -// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewGatewayRouteConfigsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GatewayRouteConfigsClient, error) { - cl, err := arm.NewClient(moduleName+".GatewayRouteConfigsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &GatewayRouteConfigsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create the default Spring Cloud Gateway route configs or update the existing Spring Cloud Gateway -// route configs. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - gatewayName - The name of Spring Cloud Gateway. -// - routeConfigName - The name of the Spring Cloud Gateway route config. -// - gatewayRouteConfigResource - The Spring Cloud Gateway route config for the create or update operation -// - options - GatewayRouteConfigsClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewayRouteConfigsClient.BeginCreateOrUpdate -// method. -func (client *GatewayRouteConfigsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, gatewayRouteConfigResource GatewayRouteConfigResource, options *GatewayRouteConfigsClientBeginCreateOrUpdateOptions) (*runtime.Poller[GatewayRouteConfigsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, gatewayName, routeConfigName, gatewayRouteConfigResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[GatewayRouteConfigsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[GatewayRouteConfigsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// CreateOrUpdate - Create the default Spring Cloud Gateway route configs or update the existing Spring Cloud Gateway route -// configs. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *GatewayRouteConfigsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, gatewayRouteConfigResource GatewayRouteConfigResource, options *GatewayRouteConfigsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, routeConfigName, gatewayRouteConfigResource, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *GatewayRouteConfigsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, gatewayRouteConfigResource GatewayRouteConfigResource, options *GatewayRouteConfigsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if routeConfigName == "" { - return nil, errors.New("parameter routeConfigName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeConfigName}", url.PathEscape(routeConfigName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, gatewayRouteConfigResource) -} - -// BeginDelete - Delete the Spring Cloud Gateway route config. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - gatewayName - The name of Spring Cloud Gateway. -// - routeConfigName - The name of the Spring Cloud Gateway route config. -// - options - GatewayRouteConfigsClientBeginDeleteOptions contains the optional parameters for the GatewayRouteConfigsClient.BeginDelete -// method. -func (client *GatewayRouteConfigsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, options *GatewayRouteConfigsClientBeginDeleteOptions) (*runtime.Poller[GatewayRouteConfigsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, gatewayName, routeConfigName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[GatewayRouteConfigsClientDeleteResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[GatewayRouteConfigsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Delete - Delete the Spring Cloud Gateway route config. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *GatewayRouteConfigsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, options *GatewayRouteConfigsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, routeConfigName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *GatewayRouteConfigsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, options *GatewayRouteConfigsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if routeConfigName == "" { - return nil, errors.New("parameter routeConfigName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeConfigName}", url.PathEscape(routeConfigName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the Spring Cloud Gateway route configs. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - gatewayName - The name of Spring Cloud Gateway. -// - routeConfigName - The name of the Spring Cloud Gateway route config. -// - options - GatewayRouteConfigsClientGetOptions contains the optional parameters for the GatewayRouteConfigsClient.Get method. -func (client *GatewayRouteConfigsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, options *GatewayRouteConfigsClientGetOptions) (GatewayRouteConfigsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, routeConfigName, options) - if err != nil { - return GatewayRouteConfigsClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return GatewayRouteConfigsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewayRouteConfigsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *GatewayRouteConfigsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, options *GatewayRouteConfigsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if routeConfigName == "" { - return nil, errors.New("parameter routeConfigName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeConfigName}", url.PathEscape(routeConfigName)) - 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", "2022-11-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 *GatewayRouteConfigsClient) getHandleResponse(resp *http.Response) (GatewayRouteConfigsClientGetResponse, error) { - result := GatewayRouteConfigsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.GatewayRouteConfigResource); err != nil { - return GatewayRouteConfigsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Handle requests to list all Spring Cloud Gateway route configs. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - gatewayName - The name of Spring Cloud Gateway. -// - options - GatewayRouteConfigsClientListOptions contains the optional parameters for the GatewayRouteConfigsClient.NewListPager -// method. -func (client *GatewayRouteConfigsClient) NewListPager(resourceGroupName string, serviceName string, gatewayName string, options *GatewayRouteConfigsClientListOptions) *runtime.Pager[GatewayRouteConfigsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[GatewayRouteConfigsClientListResponse]{ - More: func(page GatewayRouteConfigsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *GatewayRouteConfigsClientListResponse) (GatewayRouteConfigsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return GatewayRouteConfigsClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return GatewayRouteConfigsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewayRouteConfigsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *GatewayRouteConfigsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewayRouteConfigsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *GatewayRouteConfigsClient) listHandleResponse(resp *http.Response) (GatewayRouteConfigsClientListResponse, error) { - result := GatewayRouteConfigsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.GatewayRouteConfigResourceCollection); err != nil { - return GatewayRouteConfigsClientListResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/gatewayrouteconfigs_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/gatewayrouteconfigs_client_example_test.go deleted file mode 100644 index 17819bdb3cc1..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/gatewayrouteconfigs_client_example_test.go +++ /dev/null @@ -1,223 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/GatewayRouteConfigs_Get.json -func ExampleGatewayRouteConfigsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGatewayRouteConfigsClient().Get(ctx, "myResourceGroup", "myservice", "default", "myRouteConfig", 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.GatewayRouteConfigResource = armappplatform.GatewayRouteConfigResource{ - // Name: to.Ptr("myRouteConfig"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/gateways/routeConfigs"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/gateways/default/routeConfigs/myRouteConfig"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.GatewayRouteConfigProperties{ - // AppResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myApp"), - // OpenAPI: &armappplatform.GatewayRouteConfigOpenAPIProperties{ - // URI: to.Ptr("https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json"), - // }, - // ProvisioningState: to.Ptr(armappplatform.GatewayProvisioningStateSucceeded), - // Routes: []*armappplatform.GatewayAPIRoute{ - // { - // Filters: []*string{ - // to.Ptr("StripPrefix=2"), - // to.Ptr("RateLimit=1,1s")}, - // Predicates: []*string{ - // to.Ptr("Path=/api5/customer/**")}, - // SsoEnabled: to.Ptr(true), - // Title: to.Ptr("myApp route config"), - // }}, - // Protocol: to.Ptr(armappplatform.GatewayRouteConfigProtocolHTTPS), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/GatewayRouteConfigs_CreateOrUpdate.json -func ExampleGatewayRouteConfigsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewGatewayRouteConfigsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", "myRouteConfig", armappplatform.GatewayRouteConfigResource{ - Properties: &armappplatform.GatewayRouteConfigProperties{ - AppResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myApp"), - OpenAPI: &armappplatform.GatewayRouteConfigOpenAPIProperties{ - URI: to.Ptr("https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json"), - }, - Routes: []*armappplatform.GatewayAPIRoute{ - { - Filters: []*string{ - to.Ptr("StripPrefix=2"), - to.Ptr("RateLimit=1,1s")}, - Predicates: []*string{ - to.Ptr("Path=/api5/customer/**")}, - SsoEnabled: to.Ptr(true), - Title: to.Ptr("myApp route config"), - }}, - Protocol: to.Ptr(armappplatform.GatewayRouteConfigProtocolHTTPS), - }, - }, 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.GatewayRouteConfigResource = armappplatform.GatewayRouteConfigResource{ - // Name: to.Ptr("myRouteConfig"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/gateways/routeConfigs"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/gateways/default/routeConfigs/myRouteConfig"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.GatewayRouteConfigProperties{ - // AppResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myApp"), - // OpenAPI: &armappplatform.GatewayRouteConfigOpenAPIProperties{ - // URI: to.Ptr("https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json"), - // }, - // ProvisioningState: to.Ptr(armappplatform.GatewayProvisioningStateSucceeded), - // Routes: []*armappplatform.GatewayAPIRoute{ - // { - // Filters: []*string{ - // to.Ptr("StripPrefix=2"), - // to.Ptr("RateLimit=1,1s")}, - // Predicates: []*string{ - // to.Ptr("Path=/api5/customer/**")}, - // SsoEnabled: to.Ptr(true), - // Title: to.Ptr("myApp route config"), - // }}, - // Protocol: to.Ptr(armappplatform.GatewayRouteConfigProtocolHTTPS), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/GatewayRouteConfigs_Delete.json -func ExampleGatewayRouteConfigsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewGatewayRouteConfigsClient().BeginDelete(ctx, "myResourceGroup", "myservice", "default", "myRouteConfig", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/GatewayRouteConfigs_List.json -func ExampleGatewayRouteConfigsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewGatewayRouteConfigsClient().NewListPager("myResourceGroup", "myservice", "default", 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.GatewayRouteConfigResourceCollection = armappplatform.GatewayRouteConfigResourceCollection{ - // Value: []*armappplatform.GatewayRouteConfigResource{ - // { - // Name: to.Ptr("myRouteConfig"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/gateways/routeConfigs"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/gateways/default/routeConfigs/myRouteConfig"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.GatewayRouteConfigProperties{ - // AppResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myApp"), - // OpenAPI: &armappplatform.GatewayRouteConfigOpenAPIProperties{ - // URI: to.Ptr("https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json"), - // }, - // ProvisioningState: to.Ptr(armappplatform.GatewayProvisioningStateSucceeded), - // Routes: []*armappplatform.GatewayAPIRoute{ - // { - // Filters: []*string{ - // to.Ptr("StripPrefix=2"), - // to.Ptr("RateLimit=1,1s")}, - // Predicates: []*string{ - // to.Ptr("Path=/api5/customer/**")}, - // SsoEnabled: to.Ptr(true), - // Title: to.Ptr("myApp route config"), - // }}, - // Protocol: to.Ptr(armappplatform.GatewayRouteConfigProtocolHTTPS), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/gateways_client.go b/sdk/resourcemanager/appplatform/armappplatform/gateways_client.go deleted file mode 100644 index 5d2eac1a57c9..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/gateways_client.go +++ /dev/null @@ -1,448 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappplatform - -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" -) - -// GatewaysClient contains the methods for the Gateways group. -// Don't use this type directly, use NewGatewaysClient() instead. -type GatewaysClient struct { - internal *arm.Client - subscriptionID string -} - -// NewGatewaysClient creates a new instance of GatewaysClient with the specified values. -// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GatewaysClient, error) { - cl, err := arm.NewClient(moduleName+".GatewaysClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &GatewaysClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create the default Spring Cloud Gateway or update the existing Spring Cloud Gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - gatewayName - The name of Spring Cloud Gateway. -// - gatewayResource - The gateway for the create or update operation -// - options - GatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewaysClient.BeginCreateOrUpdate -// method. -func (client *GatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, gatewayResource GatewayResource, options *GatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[GatewaysClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, gatewayName, gatewayResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[GatewaysClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[GatewaysClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// CreateOrUpdate - Create the default Spring Cloud Gateway or update the existing Spring Cloud Gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *GatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, gatewayResource GatewayResource, options *GatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, gatewayResource, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *GatewaysClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, gatewayResource GatewayResource, options *GatewaysClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, gatewayResource) -} - -// BeginDelete - Disable the default Spring Cloud Gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - gatewayName - The name of Spring Cloud Gateway. -// - options - GatewaysClientBeginDeleteOptions contains the optional parameters for the GatewaysClient.BeginDelete method. -func (client *GatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientBeginDeleteOptions) (*runtime.Poller[GatewaysClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, gatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[GatewaysClientDeleteResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[GatewaysClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Delete - Disable the default Spring Cloud Gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *GatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *GatewaysClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the Spring Cloud Gateway and its properties. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - gatewayName - The name of Spring Cloud Gateway. -// - options - GatewaysClientGetOptions contains the optional parameters for the GatewaysClient.Get method. -func (client *GatewaysClient) Get(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientGetOptions) (GatewaysClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, options) - if err != nil { - return GatewaysClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return GatewaysClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewaysClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *GatewaysClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - 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", "2022-11-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 *GatewaysClient) getHandleResponse(resp *http.Response) (GatewaysClientGetResponse, error) { - result := GatewaysClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.GatewayResource); err != nil { - return GatewaysClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Handles requests to list all resources in a Service. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - options - GatewaysClientListOptions contains the optional parameters for the GatewaysClient.NewListPager method. -func (client *GatewaysClient) NewListPager(resourceGroupName string, serviceName string, options *GatewaysClientListOptions) *runtime.Pager[GatewaysClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[GatewaysClientListResponse]{ - More: func(page GatewaysClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *GatewaysClientListResponse) (GatewaysClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return GatewaysClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return GatewaysClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewaysClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *GatewaysClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *GatewaysClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *GatewaysClient) listHandleResponse(resp *http.Response) (GatewaysClientListResponse, error) { - result := GatewaysClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.GatewayResourceCollection); err != nil { - return GatewaysClientListResponse{}, err - } - return result, nil -} - -// ListEnvSecrets - List sensitive environment variables of Spring Cloud Gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - gatewayName - The name of Spring Cloud Gateway. -// - options - GatewaysClientListEnvSecretsOptions contains the optional parameters for the GatewaysClient.ListEnvSecrets method. -func (client *GatewaysClient) ListEnvSecrets(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientListEnvSecretsOptions) (GatewaysClientListEnvSecretsResponse, error) { - req, err := client.listEnvSecretsCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, options) - if err != nil { - return GatewaysClientListEnvSecretsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return GatewaysClientListEnvSecretsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewaysClientListEnvSecretsResponse{}, runtime.NewResponseError(resp) - } - return client.listEnvSecretsHandleResponse(resp) -} - -// listEnvSecretsCreateRequest creates the ListEnvSecrets request. -func (client *GatewaysClient) listEnvSecretsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientListEnvSecretsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/listEnvSecrets" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listEnvSecretsHandleResponse handles the ListEnvSecrets response. -func (client *GatewaysClient) listEnvSecretsHandleResponse(resp *http.Response) (GatewaysClientListEnvSecretsResponse, error) { - result := GatewaysClientListEnvSecretsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil { - return GatewaysClientListEnvSecretsResponse{}, err - } - return result, nil -} - -// ValidateDomain - Check the domains are valid as well as not in use. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - gatewayName - The name of Spring Cloud Gateway. -// - validatePayload - Custom domain payload to be validated -// - options - GatewaysClientValidateDomainOptions contains the optional parameters for the GatewaysClient.ValidateDomain method. -func (client *GatewaysClient) ValidateDomain(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, validatePayload CustomDomainValidatePayload, options *GatewaysClientValidateDomainOptions) (GatewaysClientValidateDomainResponse, error) { - req, err := client.validateDomainCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, validatePayload, options) - if err != nil { - return GatewaysClientValidateDomainResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return GatewaysClientValidateDomainResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewaysClientValidateDomainResponse{}, runtime.NewResponseError(resp) - } - return client.validateDomainHandleResponse(resp) -} - -// validateDomainCreateRequest creates the ValidateDomain request. -func (client *GatewaysClient) validateDomainCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, validatePayload CustomDomainValidatePayload, options *GatewaysClientValidateDomainOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/validateDomain" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, validatePayload) -} - -// validateDomainHandleResponse handles the ValidateDomain response. -func (client *GatewaysClient) validateDomainHandleResponse(resp *http.Response) (GatewaysClientValidateDomainResponse, error) { - result := GatewaysClientValidateDomainResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CustomDomainValidateResult); err != nil { - return GatewaysClientValidateDomainResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/gateways_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/gateways_client_example_test.go deleted file mode 100644 index 9b4a55fd3e34..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/gateways_client_example_test.go +++ /dev/null @@ -1,330 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Gateways_Get.json -func ExampleGatewaysClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGatewaysClient().Get(ctx, "myResourceGroup", "myservice", "default", 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.GatewayResource = armappplatform.GatewayResource{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/gateways"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/gateways/default"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.GatewayProperties{ - // Instances: []*armappplatform.GatewayInstance{ - // { - // Name: to.Ptr("instance1"), - // Status: to.Ptr("Running"), - // }, - // { - // Name: to.Ptr("instance2"), - // Status: to.Ptr("Running"), - // }}, - // OperatorProperties: &armappplatform.GatewayOperatorProperties{ - // Instances: []*armappplatform.GatewayInstance{ - // { - // Name: to.Ptr("instance1"), - // Status: to.Ptr("Running"), - // }, - // { - // Name: to.Ptr("instance2"), - // Status: to.Ptr("Running"), - // }}, - // ResourceRequests: &armappplatform.GatewayOperatorResourceRequests{ - // CPU: to.Ptr("1"), - // InstanceCount: to.Ptr[int32](2), - // Memory: to.Ptr("1G"), - // }, - // }, - // ProvisioningState: to.Ptr(armappplatform.GatewayProvisioningStateSucceeded), - // Public: to.Ptr(true), - // ResourceRequests: &armappplatform.GatewayResourceRequests{ - // CPU: to.Ptr("1"), - // Memory: to.Ptr("1G"), - // }, - // URL: to.Ptr("test-url"), - // }, - // SKU: &armappplatform.SKU{ - // Name: to.Ptr("E0"), - // Capacity: to.Ptr[int32](2), - // Tier: to.Ptr("Enterprise"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Gateways_CreateOrUpdate.json -func ExampleGatewaysClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewGatewaysClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", armappplatform.GatewayResource{ - Properties: &armappplatform.GatewayProperties{ - Public: to.Ptr(true), - ResourceRequests: &armappplatform.GatewayResourceRequests{ - CPU: to.Ptr("1"), - Memory: to.Ptr("1G"), - }, - }, - SKU: &armappplatform.SKU{ - Name: to.Ptr("E0"), - Capacity: to.Ptr[int32](2), - Tier: to.Ptr("Enterprise"), - }, - }, 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.GatewayResource = armappplatform.GatewayResource{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/gateways"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/gateways/default"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.GatewayProperties{ - // Instances: []*armappplatform.GatewayInstance{ - // { - // Name: to.Ptr("instance1"), - // Status: to.Ptr("Running"), - // }, - // { - // Name: to.Ptr("instance2"), - // Status: to.Ptr("Running"), - // }}, - // OperatorProperties: &armappplatform.GatewayOperatorProperties{ - // Instances: []*armappplatform.GatewayInstance{ - // { - // Name: to.Ptr("instance1"), - // Status: to.Ptr("Running"), - // }, - // { - // Name: to.Ptr("instance2"), - // Status: to.Ptr("Running"), - // }}, - // ResourceRequests: &armappplatform.GatewayOperatorResourceRequests{ - // CPU: to.Ptr("1"), - // InstanceCount: to.Ptr[int32](2), - // Memory: to.Ptr("1G"), - // }, - // }, - // ProvisioningState: to.Ptr(armappplatform.GatewayProvisioningStateSucceeded), - // Public: to.Ptr(true), - // ResourceRequests: &armappplatform.GatewayResourceRequests{ - // CPU: to.Ptr("1"), - // Memory: to.Ptr("1G"), - // }, - // URL: to.Ptr("test-url"), - // }, - // SKU: &armappplatform.SKU{ - // Name: to.Ptr("E0"), - // Capacity: to.Ptr[int32](2), - // Tier: to.Ptr("Enterprise"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Gateways_Delete.json -func ExampleGatewaysClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewGatewaysClient().BeginDelete(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Gateways_ListEnvSecrets.json -func ExampleGatewaysClient_ListEnvSecrets() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGatewaysClient().ListEnvSecrets(ctx, "myResourceGroup", "myservice", "default", 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.Value = map[string]*string{ - // "key": to.Ptr("value"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Gateways_List.json -func ExampleGatewaysClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewGatewaysClient().NewListPager("myResourceGroup", "myservice", 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.GatewayResourceCollection = armappplatform.GatewayResourceCollection{ - // Value: []*armappplatform.GatewayResource{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/gateways"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/gateways/default"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.GatewayProperties{ - // Instances: []*armappplatform.GatewayInstance{ - // { - // Name: to.Ptr("instance1"), - // Status: to.Ptr("Running"), - // }, - // { - // Name: to.Ptr("instance2"), - // Status: to.Ptr("Running"), - // }}, - // OperatorProperties: &armappplatform.GatewayOperatorProperties{ - // Instances: []*armappplatform.GatewayInstance{ - // { - // Name: to.Ptr("instance1"), - // Status: to.Ptr("Running"), - // }, - // { - // Name: to.Ptr("instance2"), - // Status: to.Ptr("Running"), - // }}, - // ResourceRequests: &armappplatform.GatewayOperatorResourceRequests{ - // CPU: to.Ptr("1"), - // InstanceCount: to.Ptr[int32](2), - // Memory: to.Ptr("1G"), - // }, - // }, - // ProvisioningState: to.Ptr(armappplatform.GatewayProvisioningStateSucceeded), - // Public: to.Ptr(true), - // ResourceRequests: &armappplatform.GatewayResourceRequests{ - // CPU: to.Ptr("1"), - // Memory: to.Ptr("1G"), - // }, - // URL: to.Ptr("test-url"), - // }, - // SKU: &armappplatform.SKU{ - // Name: to.Ptr("E0"), - // Capacity: to.Ptr[int32](2), - // Tier: to.Ptr("Enterprise"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Gateways_ValidateDomain.json -func ExampleGatewaysClient_ValidateDomain() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGatewaysClient().ValidateDomain(ctx, "myResourceGroup", "myservice", "default", armappplatform.CustomDomainValidatePayload{ - Name: to.Ptr("mydomain.io"), - }, 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.CustomDomainValidateResult = armappplatform.CustomDomainValidateResult{ - // IsValid: to.Ptr(false), - // Message: to.Ptr("Certificate is invalid, please check if it is a self signed cert or if it contains a suitable dns name"), - // } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/models.go b/sdk/resourcemanager/appplatform/armappplatform/models.go index 62e2fc9385af..29d2274f8f08 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/models.go +++ b/sdk/resourcemanager/appplatform/armappplatform/models.go @@ -11,263 +11,6 @@ package armappplatform import "time" -// APIPortalCustomDomainProperties - The properties of custom domain for API portal -type APIPortalCustomDomainProperties struct { - // The thumbprint of bound certificate. - Thumbprint *string `json:"thumbprint,omitempty"` -} - -// APIPortalCustomDomainResource - Custom domain of the API portal -type APIPortalCustomDomainResource struct { - // The properties of custom domain for API portal - Properties *APIPortalCustomDomainProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// APIPortalCustomDomainResourceCollection - Object that includes an array of API portal custom domain resources and a possible -// link for next set -type APIPortalCustomDomainResourceCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of API portal custom domain resources - Value []*APIPortalCustomDomainResource `json:"value,omitempty"` -} - -// APIPortalCustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the APIPortalCustomDomainsClient.BeginCreateOrUpdate -// method. -type APIPortalCustomDomainsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// APIPortalCustomDomainsClientBeginDeleteOptions contains the optional parameters for the APIPortalCustomDomainsClient.BeginDelete -// method. -type APIPortalCustomDomainsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// APIPortalCustomDomainsClientGetOptions contains the optional parameters for the APIPortalCustomDomainsClient.Get method. -type APIPortalCustomDomainsClientGetOptions struct { - // placeholder for future optional parameters -} - -// APIPortalCustomDomainsClientListOptions contains the optional parameters for the APIPortalCustomDomainsClient.NewListPager -// method. -type APIPortalCustomDomainsClientListOptions struct { - // placeholder for future optional parameters -} - -// APIPortalInstance - Collection of instances belong to the API portal -type APIPortalInstance struct { - // READ-ONLY; Name of the API portal instance - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Status of the API portal instance - Status *string `json:"status,omitempty" azure:"ro"` -} - -// APIPortalProperties - API portal properties payload -type APIPortalProperties struct { - // The array of resource Ids of gateway to integrate with API portal. - GatewayIDs []*string `json:"gatewayIds,omitempty"` - - // Indicate if only https is allowed. - HTTPSOnly *bool `json:"httpsOnly,omitempty"` - - // Indicates whether the API portal exposes endpoint. - Public *bool `json:"public,omitempty"` - - // Collection of OpenAPI source URL locations. - SourceUrls []*string `json:"sourceUrls,omitempty"` - - // Single sign-on related configuration - SsoProperties *SsoProperties `json:"ssoProperties,omitempty"` - - // READ-ONLY; Collection of instances belong to API portal. - Instances []*APIPortalInstance `json:"instances,omitempty" azure:"ro"` - - // READ-ONLY; State of the API portal. - ProvisioningState *APIPortalProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The requested resource quantity for required CPU and Memory. - ResourceRequests *APIPortalResourceRequests `json:"resourceRequests,omitempty" azure:"ro"` - - // READ-ONLY; URL of the API portal, exposed when 'public' is true. - URL *string `json:"url,omitempty" azure:"ro"` -} - -// APIPortalResource - API portal resource -type APIPortalResource struct { - // API portal properties payload - Properties *APIPortalProperties `json:"properties,omitempty"` - - // Sku of the API portal resource - SKU *SKU `json:"sku,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// APIPortalResourceCollection - Object that includes an array of API portal resources and a possible link for next set -type APIPortalResourceCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of API portal resources - Value []*APIPortalResource `json:"value,omitempty"` -} - -// APIPortalResourceRequests - Resource requests of the API portal -type APIPortalResourceRequests struct { - // READ-ONLY; Cpu allocated to each API portal instance - CPU *string `json:"cpu,omitempty" azure:"ro"` - - // READ-ONLY; Memory allocated to each API portal instance - Memory *string `json:"memory,omitempty" azure:"ro"` -} - -// APIPortalsClientBeginCreateOrUpdateOptions contains the optional parameters for the APIPortalsClient.BeginCreateOrUpdate -// method. -type APIPortalsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// APIPortalsClientBeginDeleteOptions contains the optional parameters for the APIPortalsClient.BeginDelete method. -type APIPortalsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// APIPortalsClientGetOptions contains the optional parameters for the APIPortalsClient.Get method. -type APIPortalsClientGetOptions struct { - // placeholder for future optional parameters -} - -// APIPortalsClientListOptions contains the optional parameters for the APIPortalsClient.NewListPager method. -type APIPortalsClientListOptions struct { - // placeholder for future optional parameters -} - -// APIPortalsClientValidateDomainOptions contains the optional parameters for the APIPortalsClient.ValidateDomain method. -type APIPortalsClientValidateDomainOptions struct { - // placeholder for future optional parameters -} - -// AcceleratorAuthSettingClassification provides polymorphic access to related types. -// Call the interface's GetAcceleratorAuthSetting() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AcceleratorAuthSetting, *AcceleratorBasicAuthSetting, *AcceleratorPublicSetting, *AcceleratorSSHSetting -type AcceleratorAuthSettingClassification interface { - // GetAcceleratorAuthSetting returns the AcceleratorAuthSetting content of the underlying type. - GetAcceleratorAuthSetting() *AcceleratorAuthSetting -} - -// AcceleratorAuthSetting - Auth setting payload. -type AcceleratorAuthSetting struct { - // REQUIRED; The type of the auth setting. - AuthType *string `json:"authType,omitempty"` -} - -// GetAcceleratorAuthSetting implements the AcceleratorAuthSettingClassification interface for type AcceleratorAuthSetting. -func (a *AcceleratorAuthSetting) GetAcceleratorAuthSetting() *AcceleratorAuthSetting { return a } - -// AcceleratorBasicAuthSetting - Auth setting for basic auth. -type AcceleratorBasicAuthSetting struct { - // REQUIRED; The type of the auth setting. - AuthType *string `json:"authType,omitempty"` - - // REQUIRED; Username of git repository basic auth. - Username *string `json:"username,omitempty"` - - // Password of git repository basic auth. - Password *string `json:"password,omitempty"` -} - -// GetAcceleratorAuthSetting implements the AcceleratorAuthSettingClassification interface for type AcceleratorBasicAuthSetting. -func (a *AcceleratorBasicAuthSetting) GetAcceleratorAuthSetting() *AcceleratorAuthSetting { - return &AcceleratorAuthSetting{ - AuthType: a.AuthType, - } -} - -type AcceleratorGitRepository struct { - // REQUIRED; Properties of the auth setting payload. - AuthSetting AcceleratorAuthSettingClassification `json:"authSetting,omitempty"` - - // REQUIRED; Git repository URL for the accelerator. - URL *string `json:"url,omitempty"` - - // Git repository branch to be used. - Branch *string `json:"branch,omitempty"` - - // Git repository commit to be used. - Commit *string `json:"commit,omitempty"` - - // Git repository tag to be used. - GitTag *string `json:"gitTag,omitempty"` - - // Interval for checking for updates to Git or image repository. - IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"` -} - -// AcceleratorPublicSetting - Auth setting for public url. -type AcceleratorPublicSetting struct { - // REQUIRED; The type of the auth setting. - AuthType *string `json:"authType,omitempty"` -} - -// GetAcceleratorAuthSetting implements the AcceleratorAuthSettingClassification interface for type AcceleratorPublicSetting. -func (a *AcceleratorPublicSetting) GetAcceleratorAuthSetting() *AcceleratorAuthSetting { - return &AcceleratorAuthSetting{ - AuthType: a.AuthType, - } -} - -// AcceleratorSSHSetting - Auth setting for SSH auth. -type AcceleratorSSHSetting struct { - // REQUIRED; The type of the auth setting. - AuthType *string `json:"authType,omitempty"` - - // Public SSH Key of git repository. - HostKey *string `json:"hostKey,omitempty"` - - // SSH Key algorithm of git repository. - HostKeyAlgorithm *string `json:"hostKeyAlgorithm,omitempty"` - - // Private SSH Key algorithm of git repository. - PrivateKey *string `json:"privateKey,omitempty"` -} - -// GetAcceleratorAuthSetting implements the AcceleratorAuthSettingClassification interface for type AcceleratorSSHSetting. -func (a *AcceleratorSSHSetting) GetAcceleratorAuthSetting() *AcceleratorAuthSetting { - return &AcceleratorAuthSetting{ - AuthType: a.AuthType, - } -} - // ActiveDeploymentCollection - Object that includes an array of Deployment resource name and set them as active. type ActiveDeploymentCollection struct { // Collection of Deployment name. @@ -312,18 +55,15 @@ type AppResourceProperties struct { // Collection of addons AddonConfigs map[string]map[string]any `json:"addonConfigs,omitempty"` - // List of custom persistent disks - CustomPersistentDisks []*CustomPersistentDiskResource `json:"customPersistentDisks,omitempty"` - // Indicate if end to end TLS is enabled. EnableEndToEndTLS *bool `json:"enableEndToEndTLS,omitempty"` + // Fully qualified dns Name. + Fqdn *string `json:"fqdn,omitempty"` + // Indicate if only https is allowed. HTTPSOnly *bool `json:"httpsOnly,omitempty"` - // App ingress settings payload. - IngressSettings *IngressSettings `json:"ingressSettings,omitempty"` - // Collection of loaded certificates LoadedCertificates []*LoadedCertificate `json:"loadedCertificates,omitempty"` @@ -336,12 +76,6 @@ type AppResourceProperties struct { // Temporary disk settings TemporaryDisk *TemporaryDisk `json:"temporaryDisk,omitempty"` - // Additional App settings in vnet injection instance - VnetAddons *AppVNetAddons `json:"vnetAddons,omitempty"` - - // READ-ONLY; Fully qualified dns Name. - Fqdn *string `json:"fqdn,omitempty" azure:"ro"` - // READ-ONLY; Provisioning state of the App ProvisioningState *AppResourceProvisioningState `json:"provisioningState,omitempty" azure:"ro"` @@ -349,49 +83,76 @@ type AppResourceProperties struct { URL *string `json:"url,omitempty" azure:"ro"` } -// AppVNetAddons - Additional App settings in vnet injection instance -type AppVNetAddons struct { - // Indicates whether the App in vnet injection instance exposes endpoint which could be accessed from internet. - PublicEndpoint *bool `json:"publicEndpoint,omitempty"` +// ApplicationInsightsAgentVersions - Application Insights agent versions properties payload +type ApplicationInsightsAgentVersions struct { + // READ-ONLY; Indicates the version of application insight java agent + Java *string `json:"java,omitempty" azure:"ro"` +} + +// AppsClientBeginCreateOrUpdateOptions contains the optional parameters for the AppsClient.BeginCreateOrUpdate method. +type AppsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // READ-ONLY; URL of the App in vnet injection instance which could be accessed from internet - PublicEndpointURL *string `json:"publicEndpointUrl,omitempty" azure:"ro"` +// AppsClientBeginDeleteOptions contains the optional parameters for the AppsClient.BeginDelete method. +type AppsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -type ApplicationAcceleratorComponent struct { - ResourceRequests *ApplicationAcceleratorResourceRequests `json:"resourceRequests,omitempty"` +// AppsClientBeginSetActiveDeploymentsOptions contains the optional parameters for the AppsClient.BeginSetActiveDeployments +// method. +type AppsClientBeginSetActiveDeploymentsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // READ-ONLY - Instances []*ApplicationAcceleratorInstance `json:"instances,omitempty" azure:"ro"` +// AppsClientBeginUpdateOptions contains the optional parameters for the AppsClient.BeginUpdate method. +type AppsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // READ-ONLY - Name *string `json:"name,omitempty" azure:"ro"` +// AppsClientGetOptions contains the optional parameters for the AppsClient.Get method. +type AppsClientGetOptions struct { + // Indicates whether sync status + SyncStatus *string } -type ApplicationAcceleratorInstance struct { - // READ-ONLY; Name of the Application Accelerator instance. - Name *string `json:"name,omitempty" azure:"ro"` +// AppsClientGetResourceUploadURLOptions contains the optional parameters for the AppsClient.GetResourceUploadURL method. +type AppsClientGetResourceUploadURLOptions struct { + // placeholder for future optional parameters +} - // READ-ONLY; Status of the Application Accelerator instance. It can be Pending, Running, Succeeded, Failed, Unknown. - Status *string `json:"status,omitempty" azure:"ro"` +// AppsClientListOptions contains the optional parameters for the AppsClient.NewListPager method. +type AppsClientListOptions struct { + // placeholder for future optional parameters +} + +// AppsClientValidateDomainOptions contains the optional parameters for the AppsClient.ValidateDomain method. +type AppsClientValidateDomainOptions struct { + // placeholder for future optional parameters } -// ApplicationAcceleratorProperties - Application accelerator properties payload -type ApplicationAcceleratorProperties struct { - // READ-ONLY; Collection of components belong to application accelerator. - Components []*ApplicationAcceleratorComponent `json:"components,omitempty" azure:"ro"` +// AvailableOperations - Available operations of the service +type AvailableOperations struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string `json:"nextLink,omitempty"` - // READ-ONLY; State of the application accelerator. - ProvisioningState *ApplicationAcceleratorProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + // Collection of available operation details + Value []*OperationDetail `json:"value,omitempty"` } -// ApplicationAcceleratorResource - Application accelerator resource -type ApplicationAcceleratorResource struct { - // Application accelerator properties payload - Properties *ApplicationAcceleratorProperties `json:"properties,omitempty"` +type AvailableRuntimeVersions struct { + // READ-ONLY; A list of all supported runtime versions. + Value []*SupportedRuntimeVersion `json:"value,omitempty" azure:"ro"` +} - // Sku of the application accelerator resource - SKU *SKU `json:"sku,omitempty"` +// BindingResource - Binding resource payload +type BindingResource struct { + // Properties of the Binding resource + Properties *BindingResourceProperties `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource Id for the resource. ID *string `json:"id,omitempty" azure:"ro"` @@ -406,316 +167,62 @@ type ApplicationAcceleratorResource struct { Type *string `json:"type,omitempty" azure:"ro"` } -// ApplicationAcceleratorResourceCollection - Object that includes an array of application accelerator resources and a possible -// link for next set -type ApplicationAcceleratorResourceCollection struct { +// BindingResourceCollection - Object that includes an array of Binding resources and a possible link for next set +type BindingResourceCollection struct { // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. NextLink *string `json:"nextLink,omitempty"` - // Collection of application accelerator resources - Value []*ApplicationAcceleratorResource `json:"value,omitempty"` + // Collection of Binding resources + Value []*BindingResource `json:"value,omitempty"` } -type ApplicationAcceleratorResourceRequests struct { - // READ-ONLY; Cpu allocated to each application accelerator component. 1 core can be represented by 1 or 1000m - CPU *string `json:"cpu,omitempty" azure:"ro"` +// BindingResourceProperties - Binding resource properties payload +type BindingResourceProperties struct { + // Binding parameters of the Binding resource + BindingParameters map[string]any `json:"bindingParameters,omitempty"` - // READ-ONLY; Instance count of the application accelerator component. - InstanceCount *int32 `json:"instanceCount,omitempty" azure:"ro"` + // The key of the bound resource + Key *string `json:"key,omitempty"` - // READ-ONLY; Memory allocated to each application accelerator component. 1 GB can be represented by 1Gi or 1024Mi. - Memory *string `json:"memory,omitempty" azure:"ro"` + // The Azure resource id of the bound resource + ResourceID *string `json:"resourceId,omitempty"` + + // READ-ONLY; Creation time of the Binding resource + CreatedAt *string `json:"createdAt,omitempty" azure:"ro"` + + // READ-ONLY; The generated Spring Boot property file for this binding. The secret will be deducted. + GeneratedProperties *string `json:"generatedProperties,omitempty" azure:"ro"` + + // READ-ONLY; The name of the bound resource + ResourceName *string `json:"resourceName,omitempty" azure:"ro"` + + // READ-ONLY; The standard Azure resource type of the bound resource + ResourceType *string `json:"resourceType,omitempty" azure:"ro"` + + // READ-ONLY; Update time of the Binding resource + UpdatedAt *string `json:"updatedAt,omitempty" azure:"ro"` } -// ApplicationAcceleratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationAcceleratorsClient.BeginCreateOrUpdate -// method. -type ApplicationAcceleratorsClientBeginCreateOrUpdateOptions struct { +// BindingsClientBeginCreateOrUpdateOptions contains the optional parameters for the BindingsClient.BeginCreateOrUpdate method. +type BindingsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string } -// ApplicationAcceleratorsClientBeginDeleteOptions contains the optional parameters for the ApplicationAcceleratorsClient.BeginDelete -// method. -type ApplicationAcceleratorsClientBeginDeleteOptions struct { +// BindingsClientBeginDeleteOptions contains the optional parameters for the BindingsClient.BeginDelete method. +type BindingsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string } -// ApplicationAcceleratorsClientGetOptions contains the optional parameters for the ApplicationAcceleratorsClient.Get method. -type ApplicationAcceleratorsClientGetOptions struct { - // placeholder for future optional parameters +// BindingsClientBeginUpdateOptions contains the optional parameters for the BindingsClient.BeginUpdate method. +type BindingsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// ApplicationAcceleratorsClientListOptions contains the optional parameters for the ApplicationAcceleratorsClient.NewListPager -// method. -type ApplicationAcceleratorsClientListOptions struct { - // placeholder for future optional parameters -} - -// ApplicationInsightsAgentVersions - Application Insights agent versions properties payload -type ApplicationInsightsAgentVersions struct { - // READ-ONLY; Indicates the version of application insight java agent - Java *string `json:"java,omitempty" azure:"ro"` -} - -// ApplicationLiveViewComponent - Application Live View properties payload -type ApplicationLiveViewComponent struct { - // READ-ONLY; Collection of instances belong to Application Live View. - Instances []*ApplicationLiveViewInstance `json:"instances,omitempty" azure:"ro"` - - // READ-ONLY; Name of the component. - Name any `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The requested resource quantity for required CPU and Memory. - ResourceRequests *ApplicationLiveViewResourceRequests `json:"resourceRequests,omitempty" azure:"ro"` -} - -// ApplicationLiveViewInstance - Collection of instances belong to the Application Live View -type ApplicationLiveViewInstance struct { - // READ-ONLY; Name of the Application Live View instance. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Status of the Application Live View instance. It can be Pending, Running, Succeeded, Failed, Unknown. - Status *string `json:"status,omitempty" azure:"ro"` -} - -// ApplicationLiveViewProperties - Application Live View properties payload -type ApplicationLiveViewProperties struct { - // READ-ONLY; Component details of Application Live View - Components []*ApplicationLiveViewComponent `json:"components,omitempty" azure:"ro"` - - // READ-ONLY; State of the Application Live View. - ProvisioningState *ApplicationLiveViewProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ApplicationLiveViewResource - Application Live View resource -type ApplicationLiveViewResource struct { - // Application Live View properties payload - Properties *ApplicationLiveViewProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationLiveViewResourceCollection - Object that includes an array of Application Live View resources and a possible -// link for next set -type ApplicationLiveViewResourceCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of Application Live View resources - Value []*ApplicationLiveViewResource `json:"value,omitempty"` -} - -// ApplicationLiveViewResourceRequests - The resource quantity for required CPU and Memory of Application Live View component -type ApplicationLiveViewResourceRequests struct { - // READ-ONLY; Cpu quantity allocated to each Application Live View component instance. 1 core can be represented by 1 or 1000m. - CPU *string `json:"cpu,omitempty" azure:"ro"` - - // READ-ONLY; Desired instance count of Application Live View component instance. - InstanceCount *int32 `json:"instanceCount,omitempty" azure:"ro"` - - // READ-ONLY; Memory quantity allocated to each Application Live View component instance. 1 GB can be represented by 1Gi or - // 1024Mi. - Memory *string `json:"memory,omitempty" azure:"ro"` -} - -// ApplicationLiveViewsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationLiveViewsClient.BeginCreateOrUpdate -// method. -type ApplicationLiveViewsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationLiveViewsClientBeginDeleteOptions contains the optional parameters for the ApplicationLiveViewsClient.BeginDelete -// method. -type ApplicationLiveViewsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationLiveViewsClientGetOptions contains the optional parameters for the ApplicationLiveViewsClient.Get method. -type ApplicationLiveViewsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ApplicationLiveViewsClientListOptions contains the optional parameters for the ApplicationLiveViewsClient.NewListPager -// method. -type ApplicationLiveViewsClientListOptions struct { - // placeholder for future optional parameters -} - -// AppsClientBeginCreateOrUpdateOptions contains the optional parameters for the AppsClient.BeginCreateOrUpdate method. -type AppsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AppsClientBeginDeleteOptions contains the optional parameters for the AppsClient.BeginDelete method. -type AppsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AppsClientBeginSetActiveDeploymentsOptions contains the optional parameters for the AppsClient.BeginSetActiveDeployments -// method. -type AppsClientBeginSetActiveDeploymentsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AppsClientBeginUpdateOptions contains the optional parameters for the AppsClient.BeginUpdate method. -type AppsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AppsClientGetOptions contains the optional parameters for the AppsClient.Get method. -type AppsClientGetOptions struct { - // Indicates whether sync status - SyncStatus *string -} - -// AppsClientGetResourceUploadURLOptions contains the optional parameters for the AppsClient.GetResourceUploadURL method. -type AppsClientGetResourceUploadURLOptions struct { - // placeholder for future optional parameters -} - -// AppsClientListOptions contains the optional parameters for the AppsClient.NewListPager method. -type AppsClientListOptions struct { - // placeholder for future optional parameters -} - -// AppsClientValidateDomainOptions contains the optional parameters for the AppsClient.ValidateDomain method. -type AppsClientValidateDomainOptions struct { - // placeholder for future optional parameters -} - -// AvailableOperations - Available operations of the service -type AvailableOperations struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of available operation details - Value []*OperationDetail `json:"value,omitempty"` -} - -type AvailableRuntimeVersions struct { - // READ-ONLY; A list of all supported runtime versions. - Value []*SupportedRuntimeVersion `json:"value,omitempty" azure:"ro"` -} - -// AzureFileVolume - The properties of the Azure File volume. Azure File shares are mounted as volumes. -type AzureFileVolume struct { - // REQUIRED; The mount path of the persistent disk. - MountPath *string `json:"mountPath,omitempty"` - - // REQUIRED; The share name of the Azure File share. - ShareName *string `json:"shareName,omitempty"` - - // REQUIRED; The type of the underlying resource to mount as a persistent disk. - Type *Type `json:"type,omitempty"` - - // These are the mount options for a persistent disk. - MountOptions []*string `json:"mountOptions,omitempty"` - - // Indicates whether the persistent disk is a readOnly one. - ReadOnly *bool `json:"readOnly,omitempty"` -} - -// GetCustomPersistentDiskProperties implements the CustomPersistentDiskPropertiesClassification interface for type AzureFileVolume. -func (a *AzureFileVolume) GetCustomPersistentDiskProperties() *CustomPersistentDiskProperties { - return &CustomPersistentDiskProperties{ - Type: a.Type, - MountPath: a.MountPath, - ReadOnly: a.ReadOnly, - MountOptions: a.MountOptions, - } -} - -// BindingResource - Binding resource payload -type BindingResource struct { - // Properties of the Binding resource - Properties *BindingResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BindingResourceCollection - Object that includes an array of Binding resources and a possible link for next set -type BindingResourceCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of Binding resources - Value []*BindingResource `json:"value,omitempty"` -} - -// BindingResourceProperties - Binding resource properties payload -type BindingResourceProperties struct { - // Binding parameters of the Binding resource - BindingParameters map[string]any `json:"bindingParameters,omitempty"` - - // The key of the bound resource - Key *string `json:"key,omitempty"` - - // The Azure resource id of the bound resource - ResourceID *string `json:"resourceId,omitempty"` - - // READ-ONLY; Creation time of the Binding resource - CreatedAt *string `json:"createdAt,omitempty" azure:"ro"` - - // READ-ONLY; The generated Spring Boot property file for this binding. The secret will be deducted. - GeneratedProperties *string `json:"generatedProperties,omitempty" azure:"ro"` - - // READ-ONLY; The name of the bound resource - ResourceName *string `json:"resourceName,omitempty" azure:"ro"` - - // READ-ONLY; The standard Azure resource type of the bound resource - ResourceType *string `json:"resourceType,omitempty" azure:"ro"` - - // READ-ONLY; Update time of the Binding resource - UpdatedAt *string `json:"updatedAt,omitempty" azure:"ro"` -} - -// BindingsClientBeginCreateOrUpdateOptions contains the optional parameters for the BindingsClient.BeginCreateOrUpdate method. -type BindingsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BindingsClientBeginDeleteOptions contains the optional parameters for the BindingsClient.BeginDelete method. -type BindingsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BindingsClientBeginUpdateOptions contains the optional parameters for the BindingsClient.BeginUpdate method. -type BindingsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BindingsClientGetOptions contains the optional parameters for the BindingsClient.Get method. -type BindingsClientGetOptions struct { +// BindingsClientGetOptions contains the optional parameters for the BindingsClient.Get method. +type BindingsClientGetOptions struct { // placeholder for future optional parameters } @@ -765,9 +272,6 @@ type BuildProperties struct { // The relative path of source code RelativePath *string `json:"relativePath,omitempty"` - // The customized build resource for this build - ResourceRequests *BuildResourceRequests `json:"resourceRequests,omitempty"` - // READ-ONLY; Provisioning state of the KPack build result ProvisioningState *BuildProvisioningState `json:"provisioningState,omitempty" azure:"ro"` @@ -775,17 +279,6 @@ type BuildProperties struct { TriggeredBuildResult *TriggeredBuildResult `json:"triggeredBuildResult,omitempty" azure:"ro"` } -// BuildResourceRequests - Resource request payload of Build Resource. -type BuildResourceRequests struct { - // Optional Cpu allocated to the build resource. 1 core can be represented by 1 or 1000m. The default value is 1, this should - // not exceed build service agent pool cpu size. - CPU *string `json:"cpu,omitempty"` - - // Optional Memory allocated to the build resource. 1 GB can be represented by 1Gi or 1024Mi. The default value is 2Gi, this - // should not exceed build service agent pool memory size. - Memory *string `json:"memory,omitempty"` -} - // BuildResult - Build result resource payload type BuildResult struct { // Properties of the build result resource @@ -824,9 +317,6 @@ type BuildResultProperties struct { // The build pod name which can be used to get the build log streaming. BuildPodName *string `json:"buildPodName,omitempty"` - // Error when build is failed. - Error *Error `json:"error,omitempty"` - // The name of this build result Name *string `json:"name,omitempty"` @@ -961,12 +451,6 @@ type BuildServiceBuilderClientGetOptions struct { // placeholder for future optional parameters } -// BuildServiceBuilderClientListDeploymentsOptions contains the optional parameters for the BuildServiceBuilderClient.ListDeployments -// method. -type BuildServiceBuilderClientListDeploymentsOptions struct { - // placeholder for future optional parameters -} - // BuildServiceBuilderClientListOptions contains the optional parameters for the BuildServiceBuilderClient.NewListPager method. type BuildServiceBuilderClientListOptions struct { // placeholder for future optional parameters @@ -1078,15 +562,9 @@ type BuildServicePropertiesResourceRequests struct { // BuildStageProperties - The build stage (init-container and container) resources in build pod. type BuildStageProperties struct { - // READ-ONLY; The exit code of this build init container. - ExitCode *string `json:"exitCode,omitempty" azure:"ro"` - // READ-ONLY; The name of this build stage resource. Name *string `json:"name,omitempty" azure:"ro"` - // READ-ONLY; The reason of this build init container. - Reason *string `json:"reason,omitempty" azure:"ro"` - // READ-ONLY; The provisioning state of this build stage resource. Status *KPackBuildStageProvisioningState `json:"status,omitempty" azure:"ro"` } @@ -1246,9 +724,6 @@ type CertificateProperties struct { // READ-ONLY; The issuer of certificate. Issuer *string `json:"issuer,omitempty" azure:"ro"` - // READ-ONLY; Provisioning state of the Certificate - ProvisioningState *CertificateResourceProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - // READ-ONLY; The subject name of certificate. SubjectName *string `json:"subjectName,omitempty" azure:"ro"` @@ -1311,22 +786,13 @@ type CertificatesClientListOptions struct { // ClusterResourceProperties - Service properties payload type ClusterResourceProperties struct { - // Purchasing 3rd party product of the Service resource. - MarketplaceResource *MarketplaceResource `json:"marketplaceResource,omitempty"` - // Network profile of the Service NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` - - // Additional Service settings in vnet injection instance - VnetAddons *ServiceVNetAddons `json:"vnetAddons,omitempty"` - ZoneRedundant *bool `json:"zoneRedundant,omitempty"` + ZoneRedundant *bool `json:"zoneRedundant,omitempty"` // READ-ONLY; Fully qualified dns name of the service instance Fqdn *string `json:"fqdn,omitempty" azure:"ro"` - // READ-ONLY; Power state of the Service - PowerState *PowerState `json:"powerState,omitempty" azure:"ro"` - // READ-ONLY; Provisioning state of the Service ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` @@ -1487,703 +953,49 @@ type ConfigurationServiceGitRepository struct { HostKeyAlgorithm *string `json:"hostKeyAlgorithm,omitempty"` // Password of git repository basic auth. - Password *string `json:"password,omitempty"` - - // Private sshKey algorithm of git repository. - PrivateKey *string `json:"privateKey,omitempty"` - - // Searching path of the repository - SearchPaths []*string `json:"searchPaths,omitempty"` - - // Strict host key checking or not. - StrictHostKeyChecking *bool `json:"strictHostKeyChecking,omitempty"` - - // Username of git repository basic auth. - Username *string `json:"username,omitempty"` -} - -// ConfigurationServiceInstance - Collection of instances belong to the Application Configuration Service -type ConfigurationServiceInstance struct { - // READ-ONLY; Name of the Application Configuration Service instance - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Status of the Application Configuration Service instance - Status *string `json:"status,omitempty" azure:"ro"` -} - -// ConfigurationServiceProperties - Application Configuration Service properties payload -type ConfigurationServiceProperties struct { - // The settings of Application Configuration Service. - Settings *ConfigurationServiceSettings `json:"settings,omitempty"` - - // READ-ONLY; Collection of instances belong to Application Configuration Service. - Instances []*ConfigurationServiceInstance `json:"instances,omitempty" azure:"ro"` - - // READ-ONLY; State of the Application Configuration Service. - ProvisioningState *ConfigurationServiceProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The requested resource quantity for required CPU and Memory. - ResourceRequests *ConfigurationServiceResourceRequests `json:"resourceRequests,omitempty" azure:"ro"` -} - -// ConfigurationServiceResource - Application Configuration Service resource -type ConfigurationServiceResource struct { - // Application Configuration Service properties payload - Properties *ConfigurationServiceProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ConfigurationServiceResourceCollection - Object that includes an array of configuration service resources and a possible -// link for next set -type ConfigurationServiceResourceCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of configuration service resources - Value []*ConfigurationServiceResource `json:"value,omitempty"` -} - -// ConfigurationServiceResourceRequests - Resource request payload of Application Configuration Service -type ConfigurationServiceResourceRequests struct { - // READ-ONLY; Cpu allocated to each Application Configuration Service instance - CPU *string `json:"cpu,omitempty" azure:"ro"` - - // READ-ONLY; Instance count of the Application Configuration Service - InstanceCount *int32 `json:"instanceCount,omitempty" azure:"ro"` - - // READ-ONLY; Memory allocated to each Application Configuration Service instance - Memory *string `json:"memory,omitempty" azure:"ro"` -} - -// ConfigurationServiceSettings - The settings of Application Configuration Service. -type ConfigurationServiceSettings struct { - // Property of git environment. - GitProperty *ConfigurationServiceGitProperty `json:"gitProperty,omitempty"` -} - -// ConfigurationServiceSettingsValidateResult - Validation result for configuration service settings -type ConfigurationServiceSettingsValidateResult struct { - // Validation result for configuration service settings - GitPropertyValidationResult *ConfigurationServiceGitPropertyValidateResult `json:"gitPropertyValidationResult,omitempty"` -} - -// ConfigurationServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationServicesClient.BeginCreateOrUpdate -// method. -type ConfigurationServicesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConfigurationServicesClientBeginDeleteOptions contains the optional parameters for the ConfigurationServicesClient.BeginDelete -// method. -type ConfigurationServicesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConfigurationServicesClientBeginValidateOptions contains the optional parameters for the ConfigurationServicesClient.BeginValidate -// method. -type ConfigurationServicesClientBeginValidateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConfigurationServicesClientGetOptions contains the optional parameters for the ConfigurationServicesClient.Get method. -type ConfigurationServicesClientGetOptions struct { - // placeholder for future optional parameters -} - -// ConfigurationServicesClientListOptions contains the optional parameters for the ConfigurationServicesClient.NewListPager -// method. -type ConfigurationServicesClientListOptions struct { - // placeholder for future optional parameters -} - -// ContainerProbeSettings - Container liveness and readiness probe settings -type ContainerProbeSettings struct { - // Indicates whether disable the liveness and readiness probe - DisableProbe *bool `json:"disableProbe,omitempty"` -} - -// ContentCertificateProperties - Properties of certificate imported from key vault. -type ContentCertificateProperties struct { - // REQUIRED; The type of the certificate source. - Type *string `json:"type,omitempty"` - - // The content of uploaded certificate. - Content *string `json:"content,omitempty"` - - // READ-ONLY; The activate date of certificate. - ActivateDate *string `json:"activateDate,omitempty" azure:"ro"` - - // READ-ONLY; The domain list of certificate. - DNSNames []*string `json:"dnsNames,omitempty" azure:"ro"` - - // READ-ONLY; The expiration date of certificate. - ExpirationDate *string `json:"expirationDate,omitempty" azure:"ro"` - - // READ-ONLY; The issue date of certificate. - IssuedDate *string `json:"issuedDate,omitempty" azure:"ro"` - - // READ-ONLY; The issuer of certificate. - Issuer *string `json:"issuer,omitempty" azure:"ro"` - - // READ-ONLY; Provisioning state of the Certificate - ProvisioningState *CertificateResourceProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The subject name of certificate. - SubjectName *string `json:"subjectName,omitempty" azure:"ro"` - - // READ-ONLY; The thumbprint of certificate. - Thumbprint *string `json:"thumbprint,omitempty" azure:"ro"` -} - -// GetCertificateProperties implements the CertificatePropertiesClassification interface for type ContentCertificateProperties. -func (c *ContentCertificateProperties) GetCertificateProperties() *CertificateProperties { - return &CertificateProperties{ - Type: c.Type, - Thumbprint: c.Thumbprint, - Issuer: c.Issuer, - IssuedDate: c.IssuedDate, - ExpirationDate: c.ExpirationDate, - ActivateDate: c.ActivateDate, - SubjectName: c.SubjectName, - DNSNames: c.DNSNames, - ProvisioningState: c.ProvisioningState, - } -} - -// CustomContainer - Custom container payload -type CustomContainer struct { - // Arguments to the entrypoint. The docker image's CMD is used if this is not provided. - Args []*string `json:"args,omitempty"` - - // Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. - Command []*string `json:"command,omitempty"` - - // Container image of the custom container. This should be in the form of : without the server name of the registry - ContainerImage *string `json:"containerImage,omitempty"` - - // Credential of the image registry - ImageRegistryCredential *ImageRegistryCredential `json:"imageRegistryCredential,omitempty"` - - // Language framework of the container image uploaded - LanguageFramework *string `json:"languageFramework,omitempty"` - - // The name of the registry that contains the container image - Server *string `json:"server,omitempty"` -} - -// CustomContainerUserSourceInfo - Custom container user source info -type CustomContainerUserSourceInfo struct { - // REQUIRED; Type of the source uploaded - Type *string `json:"type,omitempty"` - - // Custom container payload - CustomContainer *CustomContainer `json:"customContainer,omitempty"` - - // Version of the source - Version *string `json:"version,omitempty"` -} - -// GetUserSourceInfo implements the UserSourceInfoClassification interface for type CustomContainerUserSourceInfo. -func (c *CustomContainerUserSourceInfo) GetUserSourceInfo() *UserSourceInfo { - return &UserSourceInfo{ - Type: c.Type, - Version: c.Version, - } -} - -// CustomDomainProperties - Custom domain of app resource payload. -type CustomDomainProperties struct { - // The bound certificate name of domain. - CertName *string `json:"certName,omitempty"` - - // The thumbprint of bound certificate. - Thumbprint *string `json:"thumbprint,omitempty"` - - // READ-ONLY; The app name of domain. - AppName *string `json:"appName,omitempty" azure:"ro"` - - // READ-ONLY; Provisioning state of the Domain - ProvisioningState *CustomDomainResourceProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// CustomDomainResource - Custom domain resource payload. -type CustomDomainResource struct { - // Properties of the custom domain resource. - Properties *CustomDomainProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// CustomDomainResourceCollection - Collection compose of a custom domain resources list and a possible link for next page. -type CustomDomainResourceCollection struct { - // The link to next page of custom domain list. - NextLink *string `json:"nextLink,omitempty"` - - // The custom domain resources list. - Value []*CustomDomainResource `json:"value,omitempty"` -} - -// CustomDomainValidatePayload - Custom domain validate payload. -type CustomDomainValidatePayload struct { - // REQUIRED; Name to be validated - Name *string `json:"name,omitempty"` -} - -// CustomDomainValidateResult - Validation result for custom domain. -type CustomDomainValidateResult struct { - // Indicates if domain name is valid. - IsValid *bool `json:"isValid,omitempty"` - - // Message of why domain name is invalid. - Message *string `json:"message,omitempty"` -} - -// CustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginCreateOrUpdate -// method. -type CustomDomainsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CustomDomainsClientBeginDeleteOptions contains the optional parameters for the CustomDomainsClient.BeginDelete method. -type CustomDomainsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CustomDomainsClientBeginUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginUpdate method. -type CustomDomainsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CustomDomainsClientGetOptions contains the optional parameters for the CustomDomainsClient.Get method. -type CustomDomainsClientGetOptions struct { - // placeholder for future optional parameters -} - -// CustomDomainsClientListOptions contains the optional parameters for the CustomDomainsClient.NewListPager method. -type CustomDomainsClientListOptions struct { - // placeholder for future optional parameters -} - -// CustomPersistentDiskPropertiesClassification provides polymorphic access to related types. -// Call the interface's GetCustomPersistentDiskProperties() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureFileVolume, *CustomPersistentDiskProperties -type CustomPersistentDiskPropertiesClassification interface { - // GetCustomPersistentDiskProperties returns the CustomPersistentDiskProperties content of the underlying type. - GetCustomPersistentDiskProperties() *CustomPersistentDiskProperties -} - -// CustomPersistentDiskProperties - Custom persistent disk resource payload. -type CustomPersistentDiskProperties struct { - // REQUIRED; The mount path of the persistent disk. - MountPath *string `json:"mountPath,omitempty"` - - // REQUIRED; The type of the underlying resource to mount as a persistent disk. - Type *Type `json:"type,omitempty"` - - // These are the mount options for a persistent disk. - MountOptions []*string `json:"mountOptions,omitempty"` - - // Indicates whether the persistent disk is a readOnly one. - ReadOnly *bool `json:"readOnly,omitempty"` -} - -// GetCustomPersistentDiskProperties implements the CustomPersistentDiskPropertiesClassification interface for type CustomPersistentDiskProperties. -func (c *CustomPersistentDiskProperties) GetCustomPersistentDiskProperties() *CustomPersistentDiskProperties { - return c -} - -// CustomPersistentDiskResource - Custom persistent disk resource payload. -type CustomPersistentDiskResource struct { - // REQUIRED; The resource id of Azure Spring Apps Storage resource. - StorageID *string `json:"storageId,omitempty"` - - // Properties of the custom persistent disk resource payload. - CustomPersistentDiskProperties CustomPersistentDiskPropertiesClassification `json:"customPersistentDiskProperties,omitempty"` -} - -// CustomizedAcceleratorProperties - Customized accelerator properties payload -type CustomizedAcceleratorProperties struct { - // REQUIRED - GitRepository *AcceleratorGitRepository `json:"gitRepository,omitempty"` - AcceleratorTags []*string `json:"acceleratorTags,omitempty"` - Description *string `json:"description,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - IconURL *string `json:"iconUrl,omitempty"` - - // READ-ONLY; State of the customized accelerator. - ProvisioningState *CustomizedAcceleratorProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// CustomizedAcceleratorResource - Customized accelerator resource -type CustomizedAcceleratorResource struct { - // Customized accelerator properties payload - Properties *CustomizedAcceleratorProperties `json:"properties,omitempty"` - - // Sku of the customized accelerator resource - SKU *SKU `json:"sku,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -type CustomizedAcceleratorResourceCollection struct { - NextLink *string `json:"nextLink,omitempty"` - Value []*CustomizedAcceleratorResource `json:"value,omitempty"` -} - -// CustomizedAcceleratorValidateResult - Validation result for customized accelerator properties -type CustomizedAcceleratorValidateResult struct { - // The detail validation results - ErrorMessage *string `json:"errorMessage,omitempty"` - - // State of the customized accelerator validation result - State *CustomizedAcceleratorValidateResultState `json:"state,omitempty"` -} - -// CustomizedAcceleratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomizedAcceleratorsClient.BeginCreateOrUpdate -// method. -type CustomizedAcceleratorsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CustomizedAcceleratorsClientBeginDeleteOptions contains the optional parameters for the CustomizedAcceleratorsClient.BeginDelete -// method. -type CustomizedAcceleratorsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CustomizedAcceleratorsClientGetOptions contains the optional parameters for the CustomizedAcceleratorsClient.Get method. -type CustomizedAcceleratorsClientGetOptions struct { - // placeholder for future optional parameters -} - -// CustomizedAcceleratorsClientListOptions contains the optional parameters for the CustomizedAcceleratorsClient.NewListPager -// method. -type CustomizedAcceleratorsClientListOptions struct { - // placeholder for future optional parameters -} - -// CustomizedAcceleratorsClientValidateOptions contains the optional parameters for the CustomizedAcceleratorsClient.Validate -// method. -type CustomizedAcceleratorsClientValidateOptions struct { - // placeholder for future optional parameters -} - -// DeploymentInstance - Deployment instance payload -type DeploymentInstance struct { - // READ-ONLY; Discovery status of the deployment instance - DiscoveryStatus *string `json:"discoveryStatus,omitempty" azure:"ro"` - - // READ-ONLY; Name of the deployment instance - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Failed reason of the deployment instance - Reason *string `json:"reason,omitempty" azure:"ro"` - - // READ-ONLY; Start time of the deployment instance - StartTime *string `json:"startTime,omitempty" azure:"ro"` - - // READ-ONLY; Status of the deployment instance - Status *string `json:"status,omitempty" azure:"ro"` - - // READ-ONLY; Availability zone information of the deployment instance - Zone *string `json:"zone,omitempty" azure:"ro"` -} - -// DeploymentList - A list of deployments resource ids. -type DeploymentList struct { - // A list of deployment resource ids. - Deployments []*string `json:"deployments,omitempty"` -} - -// DeploymentResource - Deployment resource payload -type DeploymentResource struct { - // Properties of the Deployment resource - Properties *DeploymentResourceProperties `json:"properties,omitempty"` - - // Sku of the Deployment resource - SKU *SKU `json:"sku,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DeploymentResourceCollection - Object that includes an array of App resources and a possible link for next set -type DeploymentResourceCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of Deployment resources - Value []*DeploymentResource `json:"value,omitempty"` -} - -// DeploymentResourceProperties - Deployment resource properties payload -type DeploymentResourceProperties struct { - // Indicates whether the Deployment is active - Active *bool `json:"active,omitempty"` - - // Deployment settings of the Deployment - DeploymentSettings *DeploymentSettings `json:"deploymentSettings,omitempty"` - - // Uploaded source information of the deployment. - Source UserSourceInfoClassification `json:"source,omitempty"` - - // READ-ONLY; Collection of instances belong to the Deployment - Instances []*DeploymentInstance `json:"instances,omitempty" azure:"ro"` - - // READ-ONLY; Provisioning state of the Deployment - ProvisioningState *DeploymentResourceProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Status of the Deployment - Status *DeploymentResourceStatus `json:"status,omitempty" azure:"ro"` -} - -// DeploymentSettings - Deployment settings payload -type DeploymentSettings struct { - // Collection of addons - AddonConfigs map[string]map[string]any `json:"addonConfigs,omitempty"` - - // Container liveness and readiness probe settings - ContainerProbeSettings *ContainerProbeSettings `json:"containerProbeSettings,omitempty"` - - // Collection of environment variables - EnvironmentVariables map[string]*string `json:"environmentVariables,omitempty"` - - // Periodic probe of App Instance liveness. App Instance will be restarted if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - LivenessProbe *Probe `json:"livenessProbe,omitempty"` - - // Periodic probe of App Instance service readiness. App Instance will be removed from service endpoints if the probe fails. - // More info: - // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - ReadinessProbe *Probe `json:"readinessProbe,omitempty"` - - // The requested resource quantity for required CPU and Memory. It is recommended that using this field to represent the required - // CPU and Memory, the old field cpu and memoryInGB will be deprecated - // later. - ResourceRequests *ResourceRequests `json:"resourceRequests,omitempty"` - - // StartupProbe indicates that the App Instance has successfully initialized. If specified, no other probes are executed until - // this completes successfully. If this probe fails, the Pod will be restarted, - // just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a App Instance's - // lifecycle, when it might take a long time to load data or warm a cache, - // than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - StartupProbe *Probe `json:"startupProbe,omitempty"` - - // Optional duration in seconds the App Instance needs to terminate gracefully. May be decreased in delete request. Value - // must be non-negative integer. The value zero indicates stop immediately via the - // kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace - // period is the duration in seconds after the processes running in the App - // Instance are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this - // value longer than the expected cleanup time for your process. Defaults to 90 - // seconds. - TerminationGracePeriodSeconds *int32 `json:"terminationGracePeriodSeconds,omitempty"` -} - -// DeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdate -// method. -type DeploymentsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginDeleteOptions contains the optional parameters for the DeploymentsClient.BeginDelete method. -type DeploymentsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginDisableRemoteDebuggingOptions contains the optional parameters for the DeploymentsClient.BeginDisableRemoteDebugging -// method. -type DeploymentsClientBeginDisableRemoteDebuggingOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginEnableRemoteDebuggingOptions contains the optional parameters for the DeploymentsClient.BeginEnableRemoteDebugging -// method. -type DeploymentsClientBeginEnableRemoteDebuggingOptions struct { - // Parameters for enable remote debugging - RemoteDebuggingPayload *RemoteDebuggingPayload - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginGenerateHeapDumpOptions contains the optional parameters for the DeploymentsClient.BeginGenerateHeapDump -// method. -type DeploymentsClientBeginGenerateHeapDumpOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginGenerateThreadDumpOptions contains the optional parameters for the DeploymentsClient.BeginGenerateThreadDump -// method. -type DeploymentsClientBeginGenerateThreadDumpOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginRestartOptions contains the optional parameters for the DeploymentsClient.BeginRestart method. -type DeploymentsClientBeginRestartOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginStartJFROptions contains the optional parameters for the DeploymentsClient.BeginStartJFR method. -type DeploymentsClientBeginStartJFROptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginStartOptions contains the optional parameters for the DeploymentsClient.BeginStart method. -type DeploymentsClientBeginStartOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginStopOptions contains the optional parameters for the DeploymentsClient.BeginStop method. -type DeploymentsClientBeginStopOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginUpdateOptions contains the optional parameters for the DeploymentsClient.BeginUpdate method. -type DeploymentsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientGetLogFileURLOptions contains the optional parameters for the DeploymentsClient.GetLogFileURL method. -type DeploymentsClientGetLogFileURLOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientGetOptions contains the optional parameters for the DeploymentsClient.Get method. -type DeploymentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientGetRemoteDebuggingConfigOptions contains the optional parameters for the DeploymentsClient.GetRemoteDebuggingConfig -// method. -type DeploymentsClientGetRemoteDebuggingConfigOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientListForClusterOptions contains the optional parameters for the DeploymentsClient.NewListForClusterPager -// method. -type DeploymentsClientListForClusterOptions struct { - // Version of the deployments to be listed - Version []string -} - -// DeploymentsClientListOptions contains the optional parameters for the DeploymentsClient.NewListPager method. -type DeploymentsClientListOptions struct { - // Version of the deployments to be listed - Version []string -} + Password *string `json:"password,omitempty"` -// DevToolPortalFeatureDetail - Detail settings for Dev Tool Portal feature -type DevToolPortalFeatureDetail struct { - // State of the plugin - State *DevToolPortalFeatureState `json:"state,omitempty"` + // Private sshKey algorithm of git repository. + PrivateKey *string `json:"privateKey,omitempty"` - // READ-ONLY; Route path to visit the plugin - Route *string `json:"route,omitempty" azure:"ro"` -} + // Searching path of the repository + SearchPaths []*string `json:"searchPaths,omitempty"` -// DevToolPortalFeatureSettings - Settings for Dev Tool Portal -type DevToolPortalFeatureSettings struct { - // Detail of Accelerator plugin - ApplicationAccelerator *DevToolPortalFeatureDetail `json:"applicationAccelerator,omitempty"` + // Strict host key checking or not. + StrictHostKeyChecking *bool `json:"strictHostKeyChecking,omitempty"` - // Detail of App Live View plugin - ApplicationLiveView *DevToolPortalFeatureDetail `json:"applicationLiveView,omitempty"` + // Username of git repository basic auth. + Username *string `json:"username,omitempty"` } -// DevToolPortalInstance - Collection of instances belong to the Dev Tool Portal. -type DevToolPortalInstance struct { - // READ-ONLY; Name of the Dev Tool Portal instance. +// ConfigurationServiceInstance - Collection of instances belong to the Application Configuration Service +type ConfigurationServiceInstance struct { + // READ-ONLY; Name of the Application Configuration Service instance Name *string `json:"name,omitempty" azure:"ro"` - // READ-ONLY; Status of the Dev Tool Portal instance. It can be Pending, Running, Succeeded, Failed, Unknown. + // READ-ONLY; Status of the Application Configuration Service instance Status *string `json:"status,omitempty" azure:"ro"` } -// DevToolPortalProperties - Dev Tool Portal properties payload -type DevToolPortalProperties struct { - // Settings for Dev Tool Portal - Features *DevToolPortalFeatureSettings `json:"features,omitempty"` - - // Indicates whether the resource exposes public endpoint - Public *bool `json:"public,omitempty"` - - // Single sign-on related configuration - SsoProperties *DevToolPortalSsoProperties `json:"ssoProperties,omitempty"` +// ConfigurationServiceProperties - Application Configuration Service properties payload +type ConfigurationServiceProperties struct { + // The settings of Application Configuration Service. + Settings *ConfigurationServiceSettings `json:"settings,omitempty"` - // READ-ONLY; Collection of instances belong to Dev Tool Portal. - Instances []*DevToolPortalInstance `json:"instances,omitempty" azure:"ro"` + // READ-ONLY; Collection of instances belong to Application Configuration Service. + Instances []*ConfigurationServiceInstance `json:"instances,omitempty" azure:"ro"` - // READ-ONLY; State of the Dev Tool Portal. - ProvisioningState *DevToolPortalProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + // READ-ONLY; State of the Application Configuration Service. + ProvisioningState *ConfigurationServiceProvisioningState `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; The requested resource quantity for required CPU and Memory. - ResourceRequests *DevToolPortalResourceRequests `json:"resourceRequests,omitempty" azure:"ro"` - - // READ-ONLY; URL of the resource, exposed when 'public' is true. - URL *string `json:"url,omitempty" azure:"ro"` + ResourceRequests *ConfigurationServiceResourceRequests `json:"resourceRequests,omitempty" azure:"ro"` } -// DevToolPortalResource - Dev Tool Portal resource -type DevToolPortalResource struct { - // Dev Tool Portal properties payload - Properties *DevToolPortalProperties `json:"properties,omitempty"` +// ConfigurationServiceResource - Application Configuration Service resource +type ConfigurationServiceResource struct { + // Application Configuration Service properties payload + Properties *ConfigurationServiceProperties `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource Id for the resource. ID *string `json:"id,omitempty" azure:"ro"` @@ -2198,189 +1010,132 @@ type DevToolPortalResource struct { Type *string `json:"type,omitempty" azure:"ro"` } -// DevToolPortalResourceCollection - Object that includes an array of Dev Tool Portal resources and a possible link for next -// set -type DevToolPortalResourceCollection struct { +// ConfigurationServiceResourceCollection - Object that includes an array of configuration service resources and a possible +// link for next set +type ConfigurationServiceResourceCollection struct { // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. NextLink *string `json:"nextLink,omitempty"` - // Collection of Dev Tool Portal resources - Value []*DevToolPortalResource `json:"value,omitempty"` + // Collection of configuration service resources + Value []*ConfigurationServiceResource `json:"value,omitempty"` } -// DevToolPortalResourceRequests - The resource quantity for required CPU and Memory of Dev Tool Portal -type DevToolPortalResourceRequests struct { - // READ-ONLY; Cpu quantity allocated to each Dev Tool Portal instance. 1 core can be represented by 1 or 1000m +// ConfigurationServiceResourceRequests - Resource request payload of Application Configuration Service +type ConfigurationServiceResourceRequests struct { + // READ-ONLY; Cpu allocated to each Application Configuration Service instance CPU *string `json:"cpu,omitempty" azure:"ro"` - // READ-ONLY; Desired instance count of Dev Tool Portal. + // READ-ONLY; Instance count of the Application Configuration Service InstanceCount *int32 `json:"instanceCount,omitempty" azure:"ro"` - // READ-ONLY; Memory quantity allocated to each Dev Tool Portal instance. 1 GB can be represented by 1Gi or 1024Mi. + // READ-ONLY; Memory allocated to each Application Configuration Service instance Memory *string `json:"memory,omitempty" azure:"ro"` } -// DevToolPortalSsoProperties - Single sign-on related configuration -type DevToolPortalSsoProperties struct { - // The public identifier for the application - ClientID *string `json:"clientId,omitempty"` - - // The secret known only to the application and the authorization server - ClientSecret *string `json:"clientSecret,omitempty"` - - // The URI of a JSON file with generic OIDC provider configuration. - MetadataURL *string `json:"metadataUrl,omitempty"` +// ConfigurationServiceSettings - The settings of Application Configuration Service. +type ConfigurationServiceSettings struct { + // Property of git environment. + GitProperty *ConfigurationServiceGitProperty `json:"gitProperty,omitempty"` +} - // It defines the specific actions applications can be allowed to do on a user's behalf - Scopes []*string `json:"scopes,omitempty"` +// ConfigurationServiceSettingsValidateResult - Validation result for configuration service settings +type ConfigurationServiceSettingsValidateResult struct { + // Validation result for configuration service settings + GitPropertyValidationResult *ConfigurationServiceGitPropertyValidateResult `json:"gitPropertyValidationResult,omitempty"` } -// DevToolPortalsClientBeginCreateOrUpdateOptions contains the optional parameters for the DevToolPortalsClient.BeginCreateOrUpdate +// ConfigurationServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationServicesClient.BeginCreateOrUpdate // method. -type DevToolPortalsClientBeginCreateOrUpdateOptions struct { +type ConfigurationServicesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string } -// DevToolPortalsClientBeginDeleteOptions contains the optional parameters for the DevToolPortalsClient.BeginDelete method. -type DevToolPortalsClientBeginDeleteOptions struct { +// ConfigurationServicesClientBeginDeleteOptions contains the optional parameters for the ConfigurationServicesClient.BeginDelete +// method. +type ConfigurationServicesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string } -// DevToolPortalsClientGetOptions contains the optional parameters for the DevToolPortalsClient.Get method. -type DevToolPortalsClientGetOptions struct { - // placeholder for future optional parameters +// ConfigurationServicesClientBeginValidateOptions contains the optional parameters for the ConfigurationServicesClient.BeginValidate +// method. +type ConfigurationServicesClientBeginValidateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// DevToolPortalsClientListOptions contains the optional parameters for the DevToolPortalsClient.NewListPager method. -type DevToolPortalsClientListOptions struct { +// ConfigurationServicesClientGetOptions contains the optional parameters for the ConfigurationServicesClient.Get method. +type ConfigurationServicesClientGetOptions struct { // placeholder for future optional parameters } -// DiagnosticParameters - Diagnostic parameters of diagnostic operations -type DiagnosticParameters struct { - // App instance name - AppInstance *string `json:"appInstance,omitempty"` - - // Duration of your JFR. 1 min can be represented by 1m or 60s. - Duration *string `json:"duration,omitempty"` - - // Your target file path in your own BYOS - FilePath *string `json:"filePath,omitempty"` +// ConfigurationServicesClientListOptions contains the optional parameters for the ConfigurationServicesClient.NewListPager +// method. +type ConfigurationServicesClientListOptions struct { + // placeholder for future optional parameters } -// Error - The error code compose of code and message. -type Error struct { - // The code of error. - Code *string `json:"code,omitempty"` - - // The message of error. - Message *string `json:"message,omitempty"` -} +// ContentCertificateProperties - Properties of certificate imported from key vault. +type ContentCertificateProperties struct { + // REQUIRED; The type of the certificate source. + Type *string `json:"type,omitempty"` -// ExecAction describes a "run in container" action. -type ExecAction struct { - // REQUIRED; The type of the action to take to perform the health check. - Type *ProbeActionType `json:"type,omitempty"` + // The content of uploaded certificate. + Content *string `json:"content,omitempty"` - // Command is the command line to execute inside the container, the working directory for the command is root ('/') in the - // container's filesystem. The command is not run inside a shell, so traditional - // shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of - // 0 is treated as live/healthy and non-zero is unhealthy. - Command []*string `json:"command,omitempty"` -} + // READ-ONLY; The activate date of certificate. + ActivateDate *string `json:"activateDate,omitempty" azure:"ro"` -// GetProbeAction implements the ProbeActionClassification interface for type ExecAction. -func (e *ExecAction) GetProbeAction() *ProbeAction { - return &ProbeAction{ - Type: e.Type, - } -} + // READ-ONLY; The domain list of certificate. + DNSNames []*string `json:"dnsNames,omitempty" azure:"ro"` -// GatewayAPIMetadataProperties - API metadata property for Spring Cloud Gateway -type GatewayAPIMetadataProperties struct { - // Detailed description of the APIs available on the Gateway instance (default: Generated OpenAPI 3 document that describes - // the API routes configured.) - Description *string `json:"description,omitempty"` + // READ-ONLY; The expiration date of certificate. + ExpirationDate *string `json:"expirationDate,omitempty" azure:"ro"` - // Location of additional documentation for the APIs available on the Gateway instance - Documentation *string `json:"documentation,omitempty"` + // READ-ONLY; The issue date of certificate. + IssuedDate *string `json:"issuedDate,omitempty" azure:"ro"` - // Base URL that API consumers will use to access APIs on the Gateway instance. - ServerURL *string `json:"serverUrl,omitempty"` + // READ-ONLY; The issuer of certificate. + Issuer *string `json:"issuer,omitempty" azure:"ro"` - // Title describing the context of the APIs available on the Gateway instance (default: Spring Cloud Gateway for K8S) - Title *string `json:"title,omitempty"` + // READ-ONLY; The subject name of certificate. + SubjectName *string `json:"subjectName,omitempty" azure:"ro"` - // Version of APIs available on this Gateway instance (default: unspecified). - Version *string `json:"version,omitempty"` + // READ-ONLY; The thumbprint of certificate. + Thumbprint *string `json:"thumbprint,omitempty" azure:"ro"` } -// GatewayAPIRoute - API route config of the Spring Cloud Gateway -type GatewayAPIRoute struct { - // A description, will be applied to methods in the generated OpenAPI documentation. - Description *string `json:"description,omitempty"` - - // To modify the request before sending it to the target endpoint, or the received response. - Filters []*string `json:"filters,omitempty"` - - // Route processing order. - Order *int32 `json:"order,omitempty"` - - // A number of conditions to evaluate a route for each request. Each predicate may be evaluated against request headers and - // parameter values. All of the predicates associated with a route must evaluate - // to true for the route to be matched to the request. - Predicates []*string `json:"predicates,omitempty"` - - // Enable sso validation. - SsoEnabled *bool `json:"ssoEnabled,omitempty"` - - // Classification tags, will be applied to methods in the generated OpenAPI documentation. - Tags []*string `json:"tags,omitempty"` - - // A title, will be applied to methods in the generated OpenAPI documentation. - Title *string `json:"title,omitempty"` - - // Pass currently-authenticated user's identity token to application service, default is 'false' - TokenRelay *bool `json:"tokenRelay,omitempty"` - - // Full uri, will override appName. - URI *string `json:"uri,omitempty"` +// GetCertificateProperties implements the CertificatePropertiesClassification interface for type ContentCertificateProperties. +func (c *ContentCertificateProperties) GetCertificateProperties() *CertificateProperties { + return &CertificateProperties{ + Type: c.Type, + Thumbprint: c.Thumbprint, + Issuer: c.Issuer, + IssuedDate: c.IssuedDate, + ExpirationDate: c.ExpirationDate, + ActivateDate: c.ActivateDate, + SubjectName: c.SubjectName, + DNSNames: c.DNSNames, + } } -// GatewayCorsProperties - Cross-Origin Resource Sharing property -type GatewayCorsProperties struct { - // Whether user credentials are supported on cross-site requests. Valid values: true, false. - AllowCredentials *bool `json:"allowCredentials,omitempty"` - - // Allowed headers in cross-site requests. The special value * allows actual requests to send any header. - AllowedHeaders []*string `json:"allowedHeaders,omitempty"` - - // Allowed HTTP methods on cross-site requests. The special value * allows all methods. If not set, GET and HEAD are allowed - // by default. - AllowedMethods []*string `json:"allowedMethods,omitempty"` - - // Allowed origins to make cross-site requests. The special value * allows all domains. - AllowedOrigins []*string `json:"allowedOrigins,omitempty"` - - // HTTP response headers to expose for cross-site requests. - ExposedHeaders []*string `json:"exposedHeaders,omitempty"` - - // How long, in seconds, the response from a pre-flight request can be cached by clients. - MaxAge *int32 `json:"maxAge,omitempty"` -} +// CustomDomainProperties - Custom domain of app resource payload. +type CustomDomainProperties struct { + // The bound certificate name of domain. + CertName *string `json:"certName,omitempty"` -// GatewayCustomDomainProperties - The properties of custom domain for Spring Cloud Gateway -type GatewayCustomDomainProperties struct { // The thumbprint of bound certificate. Thumbprint *string `json:"thumbprint,omitempty"` + + // READ-ONLY; The app name of domain. + AppName *string `json:"appName,omitempty" azure:"ro"` } -// GatewayCustomDomainResource - Custom domain of the Spring Cloud Gateway -type GatewayCustomDomainResource struct { - // The properties of custom domain for Spring Cloud Gateway - Properties *GatewayCustomDomainProperties `json:"properties,omitempty"` +// CustomDomainResource - Custom domain resource payload. +type CustomDomainResource struct { + // Properties of the custom domain resource. + Properties *CustomDomainProperties `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource Id for the resource. ID *string `json:"id,omitempty" azure:"ro"` @@ -2395,125 +1150,86 @@ type GatewayCustomDomainResource struct { Type *string `json:"type,omitempty" azure:"ro"` } -// GatewayCustomDomainResourceCollection - Object that includes an array of Spring Cloud Gateway custom domain resources and -// a possible link for next set -type GatewayCustomDomainResourceCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. +// CustomDomainResourceCollection - Collection compose of a custom domain resources list and a possible link for next page. +type CustomDomainResourceCollection struct { + // The link to next page of custom domain list. NextLink *string `json:"nextLink,omitempty"` - // Collection of Spring Cloud Gateway custom domain resources - Value []*GatewayCustomDomainResource `json:"value,omitempty"` + // The custom domain resources list. + Value []*CustomDomainResource `json:"value,omitempty"` +} + +// CustomDomainValidatePayload - Custom domain validate payload. +type CustomDomainValidatePayload struct { + // REQUIRED; Name to be validated + Name *string `json:"name,omitempty"` +} + +// CustomDomainValidateResult - Validation result for custom domain. +type CustomDomainValidateResult struct { + // Indicates if domain name is valid. + IsValid *bool `json:"isValid,omitempty"` + + // Message of why domain name is invalid. + Message *string `json:"message,omitempty"` } -// GatewayCustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewayCustomDomainsClient.BeginCreateOrUpdate +// CustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginCreateOrUpdate // method. -type GatewayCustomDomainsClientBeginCreateOrUpdateOptions struct { +type CustomDomainsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string } -// GatewayCustomDomainsClientBeginDeleteOptions contains the optional parameters for the GatewayCustomDomainsClient.BeginDelete -// method. -type GatewayCustomDomainsClientBeginDeleteOptions struct { +// CustomDomainsClientBeginDeleteOptions contains the optional parameters for the CustomDomainsClient.BeginDelete method. +type CustomDomainsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string } -// GatewayCustomDomainsClientGetOptions contains the optional parameters for the GatewayCustomDomainsClient.Get method. -type GatewayCustomDomainsClientGetOptions struct { - // placeholder for future optional parameters +// CustomDomainsClientBeginUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginUpdate method. +type CustomDomainsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// GatewayCustomDomainsClientListOptions contains the optional parameters for the GatewayCustomDomainsClient.NewListPager -// method. -type GatewayCustomDomainsClientListOptions struct { +// CustomDomainsClientGetOptions contains the optional parameters for the CustomDomainsClient.Get method. +type CustomDomainsClientGetOptions struct { // placeholder for future optional parameters } -// GatewayInstance - Collection of instances belong to the Spring Cloud Gateway -type GatewayInstance struct { - // READ-ONLY; Name of the Spring Cloud Gateway instance - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Status of the Spring Cloud Gateway instance - Status *string `json:"status,omitempty" azure:"ro"` -} - -// GatewayOperatorProperties - Properties of the Spring Cloud Gateway Operator. -type GatewayOperatorProperties struct { - // READ-ONLY; Collection of instances belong to Spring Cloud Gateway operator. - Instances []*GatewayInstance `json:"instances,omitempty" azure:"ro"` - - // READ-ONLY; The requested resource quantity for required CPU and Memory. - ResourceRequests *GatewayOperatorResourceRequests `json:"resourceRequests,omitempty" azure:"ro"` -} - -// GatewayOperatorResourceRequests - Properties of the Spring Cloud Gateway Operator. -type GatewayOperatorResourceRequests struct { - // READ-ONLY; Cpu allocated to each Spring Cloud Gateway Operator instance. - CPU *string `json:"cpu,omitempty" azure:"ro"` - - // READ-ONLY; Instance count of the Spring Cloud Gateway Operator. - InstanceCount *int32 `json:"instanceCount,omitempty" azure:"ro"` - - // READ-ONLY; Memory allocated to each Spring Cloud Gateway Operator instance. - Memory *string `json:"memory,omitempty" azure:"ro"` +// CustomDomainsClientListOptions contains the optional parameters for the CustomDomainsClient.NewListPager method. +type CustomDomainsClientListOptions struct { + // placeholder for future optional parameters } -// GatewayProperties - Spring Cloud Gateway properties payload -type GatewayProperties struct { - // API metadata property for Spring Cloud Gateway - APIMetadataProperties *GatewayAPIMetadataProperties `json:"apiMetadataProperties,omitempty"` - - // Collection of APM type used in Spring Cloud Gateway - ApmTypes []*ApmType `json:"apmTypes,omitempty"` - - // Cross-Origin Resource Sharing property - CorsProperties *GatewayCorsProperties `json:"corsProperties,omitempty"` - - // Environment variables of Spring Cloud Gateway - EnvironmentVariables *GatewayPropertiesEnvironmentVariables `json:"environmentVariables,omitempty"` - - // Indicate if only https is allowed. - HTTPSOnly *bool `json:"httpsOnly,omitempty"` - - // Indicates whether the Spring Cloud Gateway exposes endpoint. - Public *bool `json:"public,omitempty"` - - // The requested resource quantity for required CPU and Memory. - ResourceRequests *GatewayResourceRequests `json:"resourceRequests,omitempty"` - - // Single sign-on related configuration - SsoProperties *SsoProperties `json:"ssoProperties,omitempty"` - - // READ-ONLY; Collection of instances belong to Spring Cloud Gateway. - Instances []*GatewayInstance `json:"instances,omitempty" azure:"ro"` +// DeploymentInstance - Deployment instance payload +type DeploymentInstance struct { + // READ-ONLY; Discovery status of the deployment instance + DiscoveryStatus *string `json:"discoveryStatus,omitempty" azure:"ro"` - // READ-ONLY; Properties of the Spring Cloud Gateway Operator. - OperatorProperties *GatewayOperatorProperties `json:"operatorProperties,omitempty" azure:"ro"` + // READ-ONLY; Name of the deployment instance + Name *string `json:"name,omitempty" azure:"ro"` - // READ-ONLY; State of the Spring Cloud Gateway. - ProvisioningState *GatewayProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + // READ-ONLY; Failed reason of the deployment instance + Reason *string `json:"reason,omitempty" azure:"ro"` - // READ-ONLY; URL of the Spring Cloud Gateway, exposed when 'public' is true. - URL *string `json:"url,omitempty" azure:"ro"` -} + // READ-ONLY; Start time of the deployment instance + StartTime *string `json:"startTime,omitempty" azure:"ro"` -// GatewayPropertiesEnvironmentVariables - Environment variables of Spring Cloud Gateway -type GatewayPropertiesEnvironmentVariables struct { - // Non-sensitive properties - Properties map[string]*string `json:"properties,omitempty"` + // READ-ONLY; Status of the deployment instance + Status *string `json:"status,omitempty" azure:"ro"` - // Sensitive properties - Secrets map[string]*string `json:"secrets,omitempty"` + // READ-ONLY; Availability zone information of the deployment instance + Zone *string `json:"zone,omitempty" azure:"ro"` } -// GatewayResource - Spring Cloud Gateway resource -type GatewayResource struct { - // Spring Cloud Gateway properties payload - Properties *GatewayProperties `json:"properties,omitempty"` +// DeploymentResource - Deployment resource payload +type DeploymentResource struct { + // Properties of the Deployment resource + Properties *DeploymentResourceProperties `json:"properties,omitempty"` - // Sku of the Spring Cloud Gateway resource + // Sku of the Deployment resource SKU *SKU `json:"sku,omitempty"` // READ-ONLY; Fully qualified resource Id for the resource. @@ -2529,141 +1245,149 @@ type GatewayResource struct { Type *string `json:"type,omitempty" azure:"ro"` } -// GatewayResourceCollection - Object that includes an array of gateway resources and a possible link for next set -type GatewayResourceCollection struct { +// DeploymentResourceCollection - Object that includes an array of App resources and a possible link for next set +type DeploymentResourceCollection struct { // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. NextLink *string `json:"nextLink,omitempty"` - // Collection of gateway resources - Value []*GatewayResource `json:"value,omitempty"` -} - -// GatewayResourceRequests - Resource request payload of Spring Cloud Gateway. -type GatewayResourceRequests struct { - // Cpu allocated to each Spring Cloud Gateway instance. - CPU *string `json:"cpu,omitempty"` - - // Memory allocated to each Spring Cloud Gateway instance. - Memory *string `json:"memory,omitempty"` -} - -// GatewayRouteConfigOpenAPIProperties - OpenAPI properties of Spring Cloud Gateway route config. -type GatewayRouteConfigOpenAPIProperties struct { - // The URI of OpenAPI specification. - URI *string `json:"uri,omitempty"` + // Collection of Deployment resources + Value []*DeploymentResource `json:"value,omitempty"` } -// GatewayRouteConfigProperties - API route config of the Spring Cloud Gateway -type GatewayRouteConfigProperties struct { - // The resource Id of the Azure Spring Apps app, required unless route defines uri. - AppResourceID *string `json:"appResourceId,omitempty"` - - // To modify the request before sending it to the target endpoint, or the received response in app level. - Filters []*string `json:"filters,omitempty"` - - // OpenAPI properties of Spring Cloud Gateway route config. - OpenAPI *GatewayRouteConfigOpenAPIProperties `json:"openApi,omitempty"` - - // A number of conditions to evaluate a route for each request in app level. Each predicate may be evaluated against request - // headers and parameter values. All of the predicates associated with a route - // must evaluate to true for the route to be matched to the request. - Predicates []*string `json:"predicates,omitempty"` - - // Protocol of routed Azure Spring Apps applications. - Protocol *GatewayRouteConfigProtocol `json:"protocol,omitempty"` +// DeploymentResourceProperties - Deployment resource properties payload +type DeploymentResourceProperties struct { + // Indicates whether the Deployment is active + Active *bool `json:"active,omitempty"` - // Array of API routes, each route contains properties such as title, uri, ssoEnabled, predicates, filters. - Routes []*GatewayAPIRoute `json:"routes,omitempty"` + // Deployment settings of the Deployment + DeploymentSettings *DeploymentSettings `json:"deploymentSettings,omitempty"` - // Enable Single Sign-On in app level. - SsoEnabled *bool `json:"ssoEnabled,omitempty"` + // Uploaded source information of the deployment. + Source UserSourceInfoClassification `json:"source,omitempty"` - // READ-ONLY; State of the Spring Cloud Gateway route config. - ProvisioningState *GatewayProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} + // READ-ONLY; Collection of instances belong to the Deployment + Instances []*DeploymentInstance `json:"instances,omitempty" azure:"ro"` -// GatewayRouteConfigResource - Spring Cloud Gateway route config resource -type GatewayRouteConfigResource struct { - // API route config of the Spring Cloud Gateway - Properties *GatewayRouteConfigProperties `json:"properties,omitempty"` + // READ-ONLY; Provisioning state of the Deployment + ProvisioningState *DeploymentResourceProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` + // READ-ONLY; Status of the Deployment + Status *DeploymentResourceStatus `json:"status,omitempty" azure:"ro"` +} - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` +// DeploymentSettings - Deployment settings payload +type DeploymentSettings struct { + // Collection of addons + AddonConfigs map[string]map[string]any `json:"addonConfigs,omitempty"` - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + // Collection of environment variables + EnvironmentVariables map[string]*string `json:"environmentVariables,omitempty"` - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` + // The requested resource quantity for required CPU and Memory. It is recommended that using this field to represent the required + // CPU and Memory, the old field cpu and memoryInGB will be deprecated + // later. + ResourceRequests *ResourceRequests `json:"resourceRequests,omitempty"` } -// GatewayRouteConfigResourceCollection - Object that includes an array of Spring Cloud Gateway route config resources and -// a possible link for next set -type GatewayRouteConfigResourceCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` +// DeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdate +// method. +type DeploymentsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // Collection of Spring Cloud Gateway route config resources - Value []*GatewayRouteConfigResource `json:"value,omitempty"` +// DeploymentsClientBeginDeleteOptions contains the optional parameters for the DeploymentsClient.BeginDelete method. +type DeploymentsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// GatewayRouteConfigsClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewayRouteConfigsClient.BeginCreateOrUpdate +// DeploymentsClientBeginGenerateHeapDumpOptions contains the optional parameters for the DeploymentsClient.BeginGenerateHeapDump // method. -type GatewayRouteConfigsClientBeginCreateOrUpdateOptions struct { +type DeploymentsClientBeginGenerateHeapDumpOptions struct { // Resumes the LRO from the provided token. ResumeToken string } -// GatewayRouteConfigsClientBeginDeleteOptions contains the optional parameters for the GatewayRouteConfigsClient.BeginDelete +// DeploymentsClientBeginGenerateThreadDumpOptions contains the optional parameters for the DeploymentsClient.BeginGenerateThreadDump // method. -type GatewayRouteConfigsClientBeginDeleteOptions struct { +type DeploymentsClientBeginGenerateThreadDumpOptions struct { // Resumes the LRO from the provided token. ResumeToken string } -// GatewayRouteConfigsClientGetOptions contains the optional parameters for the GatewayRouteConfigsClient.Get method. -type GatewayRouteConfigsClientGetOptions struct { - // placeholder for future optional parameters +// DeploymentsClientBeginRestartOptions contains the optional parameters for the DeploymentsClient.BeginRestart method. +type DeploymentsClientBeginRestartOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// GatewayRouteConfigsClientListOptions contains the optional parameters for the GatewayRouteConfigsClient.NewListPager method. -type GatewayRouteConfigsClientListOptions struct { - // placeholder for future optional parameters +// DeploymentsClientBeginStartJFROptions contains the optional parameters for the DeploymentsClient.BeginStartJFR method. +type DeploymentsClientBeginStartJFROptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// GatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewaysClient.BeginCreateOrUpdate method. -type GatewaysClientBeginCreateOrUpdateOptions struct { +// DeploymentsClientBeginStartOptions contains the optional parameters for the DeploymentsClient.BeginStart method. +type DeploymentsClientBeginStartOptions struct { // Resumes the LRO from the provided token. ResumeToken string } -// GatewaysClientBeginDeleteOptions contains the optional parameters for the GatewaysClient.BeginDelete method. -type GatewaysClientBeginDeleteOptions struct { +// DeploymentsClientBeginStopOptions contains the optional parameters for the DeploymentsClient.BeginStop method. +type DeploymentsClientBeginStopOptions struct { // Resumes the LRO from the provided token. ResumeToken string } -// GatewaysClientGetOptions contains the optional parameters for the GatewaysClient.Get method. -type GatewaysClientGetOptions struct { - // placeholder for future optional parameters +// DeploymentsClientBeginUpdateOptions contains the optional parameters for the DeploymentsClient.BeginUpdate method. +type DeploymentsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// GatewaysClientListEnvSecretsOptions contains the optional parameters for the GatewaysClient.ListEnvSecrets method. -type GatewaysClientListEnvSecretsOptions struct { +// DeploymentsClientGetLogFileURLOptions contains the optional parameters for the DeploymentsClient.GetLogFileURL method. +type DeploymentsClientGetLogFileURLOptions struct { // placeholder for future optional parameters } -// GatewaysClientListOptions contains the optional parameters for the GatewaysClient.NewListPager method. -type GatewaysClientListOptions struct { +// DeploymentsClientGetOptions contains the optional parameters for the DeploymentsClient.Get method. +type DeploymentsClientGetOptions struct { // placeholder for future optional parameters } -// GatewaysClientValidateDomainOptions contains the optional parameters for the GatewaysClient.ValidateDomain method. -type GatewaysClientValidateDomainOptions struct { - // placeholder for future optional parameters +// DeploymentsClientListForClusterOptions contains the optional parameters for the DeploymentsClient.NewListForClusterPager +// method. +type DeploymentsClientListForClusterOptions struct { + // Version of the deployments to be listed + Version []string +} + +// DeploymentsClientListOptions contains the optional parameters for the DeploymentsClient.NewListPager method. +type DeploymentsClientListOptions struct { + // Version of the deployments to be listed + Version []string +} + +// DiagnosticParameters - Diagnostic parameters of diagnostic operations +type DiagnosticParameters struct { + // App instance name + AppInstance *string `json:"appInstance,omitempty"` + + // Duration of your JFR. 1 min can be represented by 1m or 60s. + Duration *string `json:"duration,omitempty"` + + // Your target file path in your own BYOS + FilePath *string `json:"filePath,omitempty"` +} + +// Error - The error code compose of code and message. +type Error struct { + // The code of error. + Code *string `json:"code,omitempty"` + + // The message of error. + Message *string `json:"message,omitempty"` } // GitPatternRepository - Git repository property payload for config server @@ -2702,70 +1426,6 @@ type GitPatternRepository struct { Username *string `json:"username,omitempty"` } -// HTTPGetAction describes an action based on HTTP Get requests. -type HTTPGetAction struct { - // REQUIRED; The type of the action to take to perform the health check. - Type *ProbeActionType `json:"type,omitempty"` - - // Path to access on the HTTP server. - Path *string `json:"path,omitempty"` - - // Scheme to use for connecting to the host. Defaults to HTTP. - // Possible enum values: - // * "HTTP" means that the scheme used will be http:// - // * "HTTPS" means that the scheme used will be https:// - Scheme *HTTPSchemeType `json:"scheme,omitempty"` -} - -// GetProbeAction implements the ProbeActionClassification interface for type HTTPGetAction. -func (h *HTTPGetAction) GetProbeAction() *ProbeAction { - return &ProbeAction{ - Type: h.Type, - } -} - -// ImageRegistryCredential - Credential of the image registry -type ImageRegistryCredential struct { - // The password of the image registry credential - Password *string `json:"password,omitempty"` - - // The username of the image registry credential - Username *string `json:"username,omitempty"` -} - -// IngressConfig - Ingress configuration payload for Azure Spring Apps resource. -type IngressConfig struct { - // Ingress read time out in seconds. - ReadTimeoutInSeconds *int32 `json:"readTimeoutInSeconds,omitempty"` -} - -// IngressSettings - App ingress settings payload. -type IngressSettings struct { - // How ingress should communicate with this app backend service. - BackendProtocol *BackendProtocol `json:"backendProtocol,omitempty"` - - // Client-Certification Authentication. - ClientAuth *IngressSettingsClientAuth `json:"clientAuth,omitempty"` - - // Ingress read time out in seconds. - ReadTimeoutInSeconds *int32 `json:"readTimeoutInSeconds,omitempty"` - - // Ingress send time out in seconds. - SendTimeoutInSeconds *int32 `json:"sendTimeoutInSeconds,omitempty"` - - // Type of the affinity, set this to Cookie to enable session affinity. - SessionAffinity *SessionAffinity `json:"sessionAffinity,omitempty"` - - // Time in seconds until the cookie expires. - SessionCookieMaxAge *int32 `json:"sessionCookieMaxAge,omitempty"` -} - -// IngressSettingsClientAuth - Client-Certification Authentication. -type IngressSettingsClientAuth struct { - // Collection of certificate resource id. - Certificates []*string `json:"certificates,omitempty"` -} - // JarUploadedUserSourceInfo - Uploaded Jar binary for a deployment type JarUploadedUserSourceInfo struct { // REQUIRED; Type of the source uploaded @@ -2833,9 +1493,6 @@ type KeyVaultCertificateProperties struct { // READ-ONLY; The issuer of certificate. Issuer *string `json:"issuer,omitempty" azure:"ro"` - // READ-ONLY; Provisioning state of the Certificate - ProvisioningState *CertificateResourceProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - // READ-ONLY; The subject name of certificate. SubjectName *string `json:"subjectName,omitempty" azure:"ro"` @@ -2846,15 +1503,14 @@ type KeyVaultCertificateProperties struct { // GetCertificateProperties implements the CertificatePropertiesClassification interface for type KeyVaultCertificateProperties. func (k *KeyVaultCertificateProperties) GetCertificateProperties() *CertificateProperties { return &CertificateProperties{ - Type: k.Type, - Thumbprint: k.Thumbprint, - Issuer: k.Issuer, - IssuedDate: k.IssuedDate, - ExpirationDate: k.ExpirationDate, - ActivateDate: k.ActivateDate, - SubjectName: k.SubjectName, - DNSNames: k.DNSNames, - ProvisioningState: k.ProvisioningState, + Type: k.Type, + Thumbprint: k.Thumbprint, + Issuer: k.Issuer, + IssuedDate: k.IssuedDate, + ExpirationDate: k.ExpirationDate, + ActivateDate: k.ActivateDate, + SubjectName: k.SubjectName, + DNSNames: k.DNSNames, } } @@ -2895,21 +1551,6 @@ type ManagedIdentityProperties struct { // Type of the managed identity Type *ManagedIdentityType `json:"type,omitempty"` - - // Properties of user-assigned managed identities - UserAssignedIdentities map[string]*UserAssignedManagedIdentity `json:"userAssignedIdentities,omitempty"` -} - -// MarketplaceResource - Purchasing 3rd Party product for one Azure Spring Apps instance -type MarketplaceResource struct { - // The plan id of the 3rd Party Artifact that is being procured. - Plan *string `json:"plan,omitempty"` - - // The 3rd Party artifact that is being procured. - Product *string `json:"product,omitempty"` - - // The publisher id of the 3rd Party Artifact that is being bought. - Publisher *string `json:"publisher,omitempty"` } // MetricDimension - Specifications of the Dimension of metrics @@ -3084,12 +1725,6 @@ type NetworkProfile struct { // Fully qualified resource Id of the subnet to host customer apps in Azure Spring Apps AppSubnetID *string `json:"appSubnetId,omitempty"` - // Ingress configuration payload for Azure Spring Apps resource. - IngressConfig *IngressConfig `json:"ingressConfig,omitempty"` - - // The egress traffic type of Azure Spring Apps VNet instances. - OutboundType *string `json:"outboundType,omitempty"` - // Azure Spring Apps service reserved CIDR ServiceCidr *string `json:"serviceCidr,omitempty"` @@ -3171,122 +1806,6 @@ type PersistentDisk struct { UsedInGB *int32 `json:"usedInGB,omitempty" azure:"ro"` } -// PredefinedAcceleratorProperties - Predefined accelerator properties payload -type PredefinedAcceleratorProperties struct { - // State of the predefined accelerator. - State *PredefinedAcceleratorState `json:"state,omitempty"` - - // READ-ONLY - AcceleratorTags []*string `json:"acceleratorTags,omitempty" azure:"ro"` - - // READ-ONLY - Description *string `json:"description,omitempty" azure:"ro"` - - // READ-ONLY - DisplayName *string `json:"displayName,omitempty" azure:"ro"` - - // READ-ONLY - IconURL *string `json:"iconUrl,omitempty" azure:"ro"` - - // READ-ONLY; Provisioning state of the predefined accelerator. - ProvisioningState *PredefinedAcceleratorProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// PredefinedAcceleratorResource - Predefined accelerator resource -type PredefinedAcceleratorResource struct { - // Predefined accelerator properties payload - Properties *PredefinedAcceleratorProperties `json:"properties,omitempty"` - - // Sku of the predefined accelerator resource - SKU *SKU `json:"sku,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -type PredefinedAcceleratorResourceCollection struct { - NextLink *string `json:"nextLink,omitempty"` - Value []*PredefinedAcceleratorResource `json:"value,omitempty"` -} - -// PredefinedAcceleratorsClientBeginDisableOptions contains the optional parameters for the PredefinedAcceleratorsClient.BeginDisable -// method. -type PredefinedAcceleratorsClientBeginDisableOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PredefinedAcceleratorsClientBeginEnableOptions contains the optional parameters for the PredefinedAcceleratorsClient.BeginEnable -// method. -type PredefinedAcceleratorsClientBeginEnableOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PredefinedAcceleratorsClientGetOptions contains the optional parameters for the PredefinedAcceleratorsClient.Get method. -type PredefinedAcceleratorsClientGetOptions struct { - // placeholder for future optional parameters -} - -// PredefinedAcceleratorsClientListOptions contains the optional parameters for the PredefinedAcceleratorsClient.NewListPager -// method. -type PredefinedAcceleratorsClientListOptions struct { - // placeholder for future optional parameters -} - -// Probe describes a health check to be performed against an App Instance to determine whether it is alive or ready to receive -// traffic. -type Probe struct { - // REQUIRED; Indicate whether the probe is disabled. - DisableProbe *bool `json:"disableProbe,omitempty"` - - // Minimum consecutive failures for the probe to be considered failed after having succeeded. Minimum value is 1. - FailureThreshold *int32 `json:"failureThreshold,omitempty"` - - // Number of seconds after the App Instance has started before probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - InitialDelaySeconds *int32 `json:"initialDelaySeconds,omitempty"` - - // How often (in seconds) to perform the probe. Minimum value is 1. - PeriodSeconds *int32 `json:"periodSeconds,omitempty"` - - // The action of the probe. - ProbeAction ProbeActionClassification `json:"probeAction,omitempty"` - - // Minimum consecutive successes for the probe to be considered successful after having failed. Must be 1 for liveness and - // startup. Minimum value is 1. - SuccessThreshold *int32 `json:"successThreshold,omitempty"` - - // Number of seconds after which the probe times out. Minimum value is 1. - TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` -} - -// ProbeActionClassification provides polymorphic access to related types. -// Call the interface's GetProbeAction() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ExecAction, *HTTPGetAction, *ProbeAction, *TCPSocketAction -type ProbeActionClassification interface { - // GetProbeAction returns the ProbeAction content of the underlying type. - GetProbeAction() *ProbeAction -} - -// ProbeAction - The action of the probe. -type ProbeAction struct { - // REQUIRED; The type of the action to take to perform the health check. - Type *ProbeActionType `json:"type,omitempty"` -} - -// GetProbeAction implements the ProbeActionClassification interface for type ProbeAction. -func (p *ProbeAction) GetProbeAction() *ProbeAction { return p } - // ProxyResource - The resource model definition for a ARM proxy resource. It will have everything other than required location // and tags. type ProxyResource struct { @@ -3309,21 +1828,6 @@ type RegenerateTestKeyRequestPayload struct { KeyType *TestKeyType `json:"keyType,omitempty"` } -// RemoteDebugging - Remote debugging config. -type RemoteDebugging struct { - // Indicate if remote debugging is enabled - Enabled *bool `json:"enabled,omitempty"` - - // Application debugging port - Port *int32 `json:"port,omitempty"` -} - -// RemoteDebuggingPayload - Remote debugging payload. -type RemoteDebuggingPayload struct { - // Application debugging port. - Port *int32 `json:"port,omitempty"` -} - // RequiredTraffic - Required inbound or outbound traffic for Azure Spring Apps resource. type RequiredTraffic struct { // READ-ONLY; The direction of required traffic @@ -3632,12 +2136,6 @@ type ServiceSpecification struct { MetricSpecifications []*MetricSpecification `json:"metricSpecifications,omitempty"` } -// ServiceVNetAddons - Additional Service settings in vnet injection instance -type ServiceVNetAddons struct { - // Indicates whether the log stream in vnet injection instance could be accessed from internet. - LogStreamPublicEndpoint *bool `json:"logStreamPublicEndpoint,omitempty"` -} - // ServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServicesClient.BeginCreateOrUpdate method. type ServicesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. @@ -3650,18 +2148,6 @@ type ServicesClientBeginDeleteOptions struct { ResumeToken string } -// ServicesClientBeginStartOptions contains the optional parameters for the ServicesClient.BeginStart method. -type ServicesClientBeginStartOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServicesClientBeginStopOptions contains the optional parameters for the ServicesClient.BeginStop method. -type ServicesClientBeginStopOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - // ServicesClientBeginUpdateOptions contains the optional parameters for the ServicesClient.BeginUpdate method. type ServicesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. @@ -3746,21 +2232,6 @@ func (s *SourceUploadedUserSourceInfo) GetUserSourceInfo() *UserSourceInfo { } } -// SsoProperties - Single sign-on related configuration -type SsoProperties struct { - // The public identifier for the application - ClientID *string `json:"clientId,omitempty"` - - // The secret known only to the application and the authorization server - ClientSecret *string `json:"clientSecret,omitempty"` - - // The URI of Issuer Identifier - IssuerURI *string `json:"issuerUri,omitempty"` - - // It defines the specific actions applications can be allowed to do on a user's behalf - Scope []*string `json:"scope,omitempty"` -} - // StackProperties - KPack ClusterStack properties payload type StackProperties struct { // Id of the ClusterStack. @@ -3770,92 +2241,6 @@ type StackProperties struct { Version *string `json:"version,omitempty"` } -// StorageAccount - storage resource of type Azure Storage Account. -type StorageAccount struct { - // REQUIRED; The account key of the Azure Storage Account. - AccountKey *string `json:"accountKey,omitempty"` - - // REQUIRED; The account name of the Azure Storage Account. - AccountName *string `json:"accountName,omitempty"` - - // REQUIRED; The type of the storage. - StorageType *StorageType `json:"storageType,omitempty"` -} - -// GetStorageProperties implements the StoragePropertiesClassification interface for type StorageAccount. -func (s *StorageAccount) GetStorageProperties() *StorageProperties { - return &StorageProperties{ - StorageType: s.StorageType, - } -} - -// StoragePropertiesClassification provides polymorphic access to related types. -// Call the interface's GetStorageProperties() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *StorageAccount, *StorageProperties -type StoragePropertiesClassification interface { - // GetStorageProperties returns the StorageProperties content of the underlying type. - GetStorageProperties() *StorageProperties -} - -// StorageProperties - Storage resource payload. -type StorageProperties struct { - // REQUIRED; The type of the storage. - StorageType *StorageType `json:"storageType,omitempty"` -} - -// GetStorageProperties implements the StoragePropertiesClassification interface for type StorageProperties. -func (s *StorageProperties) GetStorageProperties() *StorageProperties { return s } - -// StorageResource - Storage resource payload. -type StorageResource struct { - // Properties of the storage resource payload. - Properties StoragePropertiesClassification `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StorageResourceCollection - Collection compose of storage resources list and a possible link for next page. -type StorageResourceCollection struct { - // The link to next page of storage list. - NextLink *string `json:"nextLink,omitempty"` - - // The storage resources list. - Value []*StorageResource `json:"value,omitempty"` -} - -// StoragesClientBeginCreateOrUpdateOptions contains the optional parameters for the StoragesClient.BeginCreateOrUpdate method. -type StoragesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StoragesClientBeginDeleteOptions contains the optional parameters for the StoragesClient.BeginDelete method. -type StoragesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StoragesClientGetOptions contains the optional parameters for the StoragesClient.Get method. -type StoragesClientGetOptions struct { - // placeholder for future optional parameters -} - -// StoragesClientListOptions contains the optional parameters for the StoragesClient.NewListPager method. -type StoragesClientListOptions struct { - // placeholder for future optional parameters -} - // SupportedBuildpackResource - Supported buildpack resource payload type SupportedBuildpackResource struct { // Supported buildpack resource properties @@ -3959,19 +2344,6 @@ type SystemData struct { LastModifiedByType *LastModifiedByType `json:"lastModifiedByType,omitempty"` } -// TCPSocketAction describes an action based on opening a socket -type TCPSocketAction struct { - // REQUIRED; The type of the action to take to perform the health check. - Type *ProbeActionType `json:"type,omitempty"` -} - -// GetProbeAction implements the ProbeActionClassification interface for type TCPSocketAction. -func (t *TCPSocketAction) GetProbeAction() *ProbeAction { - return &ProbeAction{ - Type: t.Type, - } -} - // TemporaryDisk - Temporary disk payload type TemporaryDisk struct { // Mount path of the temporary disk @@ -4059,20 +2431,11 @@ func (u *UploadedUserSourceInfo) GetUserSourceInfo() *UserSourceInfo { } } -// UserAssignedManagedIdentity - The details of the user-assigned managed identity assigned to an App. -type UserAssignedManagedIdentity struct { - // READ-ONLY; Client Id of user-assigned managed identity. - ClientID *string `json:"clientId,omitempty" azure:"ro"` - - // READ-ONLY; Principal Id of user-assigned managed identity. - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` -} - // UserSourceInfoClassification provides polymorphic access to related types. // Call the interface's GetUserSourceInfo() method to access the common type. // Use a type switch to determine the concrete type. The possible types are: -// - *BuildResultUserSourceInfo, *CustomContainerUserSourceInfo, *JarUploadedUserSourceInfo, *NetCoreZipUploadedUserSourceInfo, -// - *SourceUploadedUserSourceInfo, *UploadedUserSourceInfo, *UserSourceInfo +// - *BuildResultUserSourceInfo, *JarUploadedUserSourceInfo, *NetCoreZipUploadedUserSourceInfo, *SourceUploadedUserSourceInfo, +// - *UploadedUserSourceInfo, *UserSourceInfo type UserSourceInfoClassification interface { // GetUserSourceInfo returns the UserSourceInfo content of the underlying type. GetUserSourceInfo() *UserSourceInfo diff --git a/sdk/resourcemanager/appplatform/armappplatform/models_serde.go b/sdk/resourcemanager/appplatform/armappplatform/models_serde.go index 63091013901d..c0572f985dac 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/models_serde.go +++ b/sdk/resourcemanager/appplatform/armappplatform/models_serde.go @@ -16,15 +16,15 @@ import ( "reflect" ) -// MarshalJSON implements the json.Marshaller interface for type APIPortalCustomDomainProperties. -func (a APIPortalCustomDomainProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ActiveDeploymentCollection. +func (a ActiveDeploymentCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "thumbprint", a.Thumbprint) + populate(objectMap, "activeDeploymentNames", a.ActiveDeploymentNames) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type APIPortalCustomDomainProperties. -func (a *APIPortalCustomDomainProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ActiveDeploymentCollection. +func (a *ActiveDeploymentCollection) 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", a, err) @@ -32,8 +32,8 @@ func (a *APIPortalCustomDomainProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "thumbprint": - err = unpopulate(val, "Thumbprint", &a.Thumbprint) + case "activeDeploymentNames": + err = unpopulate(val, "ActiveDeploymentNames", &a.ActiveDeploymentNames) delete(rawMsg, key) } if err != nil { @@ -43,10 +43,12 @@ func (a *APIPortalCustomDomainProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type APIPortalCustomDomainResource. -func (a APIPortalCustomDomainResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type AppResource. +func (a AppResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", a.ID) + populate(objectMap, "identity", a.Identity) + populate(objectMap, "location", a.Location) populate(objectMap, "name", a.Name) populate(objectMap, "properties", a.Properties) populate(objectMap, "systemData", a.SystemData) @@ -54,8 +56,8 @@ func (a APIPortalCustomDomainResource) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type APIPortalCustomDomainResource. -func (a *APIPortalCustomDomainResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type AppResource. +func (a *AppResource) 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", a, err) @@ -66,6 +68,12 @@ func (a *APIPortalCustomDomainResource) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &a.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &a.Name) delete(rawMsg, key) @@ -86,16 +94,16 @@ func (a *APIPortalCustomDomainResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type APIPortalCustomDomainResourceCollection. -func (a APIPortalCustomDomainResourceCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type AppResourceCollection. +func (a AppResourceCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type APIPortalCustomDomainResourceCollection. -func (a *APIPortalCustomDomainResourceCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type AppResourceCollection. +func (a *AppResourceCollection) 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", a, err) @@ -117,54 +125,24 @@ func (a *APIPortalCustomDomainResourceCollection) UnmarshalJSON(data []byte) err return nil } -// MarshalJSON implements the json.Marshaller interface for type APIPortalInstance. -func (a APIPortalInstance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", a.Name) - populate(objectMap, "status", a.Status) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APIPortalInstance. -func (a *APIPortalInstance) 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", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &a.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APIPortalProperties. -func (a APIPortalProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type AppResourceProperties. +func (a AppResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "gatewayIds", a.GatewayIDs) + populate(objectMap, "addonConfigs", a.AddonConfigs) + populate(objectMap, "enableEndToEndTLS", a.EnableEndToEndTLS) + populate(objectMap, "fqdn", a.Fqdn) populate(objectMap, "httpsOnly", a.HTTPSOnly) - populate(objectMap, "instances", a.Instances) + populate(objectMap, "loadedCertificates", a.LoadedCertificates) + populate(objectMap, "persistentDisk", a.PersistentDisk) populate(objectMap, "provisioningState", a.ProvisioningState) populate(objectMap, "public", a.Public) - populate(objectMap, "resourceRequests", a.ResourceRequests) - populate(objectMap, "sourceUrls", a.SourceUrls) - populate(objectMap, "ssoProperties", a.SsoProperties) + populate(objectMap, "temporaryDisk", a.TemporaryDisk) populate(objectMap, "url", a.URL) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type APIPortalProperties. -func (a *APIPortalProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type AppResourceProperties. +func (a *AppResourceProperties) 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", a, err) @@ -172,14 +150,23 @@ func (a *APIPortalProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "gatewayIds": - err = unpopulate(val, "GatewayIDs", &a.GatewayIDs) + case "addonConfigs": + err = unpopulate(val, "AddonConfigs", &a.AddonConfigs) + delete(rawMsg, key) + case "enableEndToEndTLS": + err = unpopulate(val, "EnableEndToEndTLS", &a.EnableEndToEndTLS) + delete(rawMsg, key) + case "fqdn": + err = unpopulate(val, "Fqdn", &a.Fqdn) delete(rawMsg, key) case "httpsOnly": err = unpopulate(val, "HTTPSOnly", &a.HTTPSOnly) delete(rawMsg, key) - case "instances": - err = unpopulate(val, "Instances", &a.Instances) + case "loadedCertificates": + err = unpopulate(val, "LoadedCertificates", &a.LoadedCertificates) + delete(rawMsg, key) + case "persistentDisk": + err = unpopulate(val, "PersistentDisk", &a.PersistentDisk) delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) @@ -187,14 +174,8 @@ func (a *APIPortalProperties) UnmarshalJSON(data []byte) error { case "public": err = unpopulate(val, "Public", &a.Public) delete(rawMsg, key) - case "resourceRequests": - err = unpopulate(val, "ResourceRequests", &a.ResourceRequests) - delete(rawMsg, key) - case "sourceUrls": - err = unpopulate(val, "SourceUrls", &a.SourceUrls) - delete(rawMsg, key) - case "ssoProperties": - err = unpopulate(val, "SsoProperties", &a.SsoProperties) + case "temporaryDisk": + err = unpopulate(val, "TemporaryDisk", &a.TemporaryDisk) delete(rawMsg, key) case "url": err = unpopulate(val, "URL", &a.URL) @@ -207,20 +188,15 @@ func (a *APIPortalProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type APIPortalResource. -func (a APIPortalResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ApplicationInsightsAgentVersions. +func (a ApplicationInsightsAgentVersions) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "sku", a.SKU) - populate(objectMap, "systemData", a.SystemData) - populate(objectMap, "type", a.Type) + populate(objectMap, "java", a.Java) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type APIPortalResource. -func (a *APIPortalResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationInsightsAgentVersions. +func (a *ApplicationInsightsAgentVersions) 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", a, err) @@ -228,23 +204,8 @@ func (a *APIPortalResource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &a.SKU) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) + case "java": + err = unpopulate(val, "Java", &a.Java) delete(rawMsg, key) } if err != nil { @@ -254,16 +215,16 @@ func (a *APIPortalResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type APIPortalResourceCollection. -func (a APIPortalResourceCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type AvailableOperations. +func (a AvailableOperations) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type APIPortalResourceCollection. -func (a *APIPortalResourceCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableOperations. +func (a *AvailableOperations) 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", a, err) @@ -285,16 +246,15 @@ func (a *APIPortalResourceCollection) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type APIPortalResourceRequests. -func (a APIPortalResourceRequests) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type AvailableRuntimeVersions. +func (a AvailableRuntimeVersions) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "cpu", a.CPU) - populate(objectMap, "memory", a.Memory) + populate(objectMap, "value", a.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type APIPortalResourceRequests. -func (a *APIPortalResourceRequests) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableRuntimeVersions. +func (a *AvailableRuntimeVersions) 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", a, err) @@ -302,11 +262,8 @@ func (a *APIPortalResourceRequests) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "cpu": - err = unpopulate(val, "CPU", &a.CPU) - delete(rawMsg, key) - case "memory": - err = unpopulate(val, "Memory", &a.Memory) + case "value": + err = unpopulate(val, "Value", &a.Value) delete(rawMsg, key) } if err != nil { @@ -316,953 +273,930 @@ func (a *APIPortalResourceRequests) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type AcceleratorAuthSetting. -func (a AcceleratorAuthSetting) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BindingResource. +func (b BindingResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["authType"] = a.AuthType + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "type", b.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type AcceleratorAuthSetting. -func (a *AcceleratorAuthSetting) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BindingResource. +func (b *BindingResource) 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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { - case "authType": - err = unpopulate(val, "AuthType", &a.AuthType) + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &b.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type AcceleratorBasicAuthSetting. -func (a AcceleratorBasicAuthSetting) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BindingResourceCollection. +func (b BindingResourceCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["authType"] = "BasicAuth" - populate(objectMap, "password", a.Password) - populate(objectMap, "username", a.Username) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type AcceleratorBasicAuthSetting. -func (a *AcceleratorBasicAuthSetting) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BindingResourceCollection. +func (b *BindingResourceCollection) 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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { - case "authType": - err = unpopulate(val, "AuthType", &a.AuthType) - delete(rawMsg, key) - case "password": - err = unpopulate(val, "Password", &a.Password) + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) delete(rawMsg, key) - case "username": - err = unpopulate(val, "Username", &a.Username) + case "value": + err = unpopulate(val, "Value", &b.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type AcceleratorGitRepository. -func (a AcceleratorGitRepository) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BindingResourceProperties. +func (b BindingResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "authSetting", a.AuthSetting) - populate(objectMap, "branch", a.Branch) - populate(objectMap, "commit", a.Commit) - populate(objectMap, "gitTag", a.GitTag) - populate(objectMap, "intervalInSeconds", a.IntervalInSeconds) - populate(objectMap, "url", a.URL) + populate(objectMap, "bindingParameters", b.BindingParameters) + populate(objectMap, "createdAt", b.CreatedAt) + populate(objectMap, "generatedProperties", b.GeneratedProperties) + populate(objectMap, "key", b.Key) + populate(objectMap, "resourceId", b.ResourceID) + populate(objectMap, "resourceName", b.ResourceName) + populate(objectMap, "resourceType", b.ResourceType) + populate(objectMap, "updatedAt", b.UpdatedAt) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type AcceleratorGitRepository. -func (a *AcceleratorGitRepository) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BindingResourceProperties. +func (b *BindingResourceProperties) 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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { - case "authSetting": - a.AuthSetting, err = unmarshalAcceleratorAuthSettingClassification(val) + case "bindingParameters": + err = unpopulate(val, "BindingParameters", &b.BindingParameters) delete(rawMsg, key) - case "branch": - err = unpopulate(val, "Branch", &a.Branch) + case "createdAt": + err = unpopulate(val, "CreatedAt", &b.CreatedAt) delete(rawMsg, key) - case "commit": - err = unpopulate(val, "Commit", &a.Commit) + case "generatedProperties": + err = unpopulate(val, "GeneratedProperties", &b.GeneratedProperties) delete(rawMsg, key) - case "gitTag": - err = unpopulate(val, "GitTag", &a.GitTag) + case "key": + err = unpopulate(val, "Key", &b.Key) delete(rawMsg, key) - case "intervalInSeconds": - err = unpopulate(val, "IntervalInSeconds", &a.IntervalInSeconds) + case "resourceId": + err = unpopulate(val, "ResourceID", &b.ResourceID) delete(rawMsg, key) - case "url": - err = unpopulate(val, "URL", &a.URL) + case "resourceName": + err = unpopulate(val, "ResourceName", &b.ResourceName) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &b.ResourceType) + delete(rawMsg, key) + case "updatedAt": + err = unpopulate(val, "UpdatedAt", &b.UpdatedAt) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type AcceleratorPublicSetting. -func (a AcceleratorPublicSetting) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Build. +func (b Build) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["authType"] = "Public" + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "type", b.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type AcceleratorPublicSetting. -func (a *AcceleratorPublicSetting) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Build. +func (b *Build) 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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { - case "authType": - err = unpopulate(val, "AuthType", &a.AuthType) + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &b.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type AcceleratorSSHSetting. -func (a AcceleratorSSHSetting) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildCollection. +func (b BuildCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["authType"] = "SSH" - populate(objectMap, "hostKey", a.HostKey) - populate(objectMap, "hostKeyAlgorithm", a.HostKeyAlgorithm) - populate(objectMap, "privateKey", a.PrivateKey) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type AcceleratorSSHSetting. -func (a *AcceleratorSSHSetting) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildCollection. +func (b *BuildCollection) 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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { - case "authType": - err = unpopulate(val, "AuthType", &a.AuthType) - delete(rawMsg, key) - case "hostKey": - err = unpopulate(val, "HostKey", &a.HostKey) - delete(rawMsg, key) - case "hostKeyAlgorithm": - err = unpopulate(val, "HostKeyAlgorithm", &a.HostKeyAlgorithm) + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) delete(rawMsg, key) - case "privateKey": - err = unpopulate(val, "PrivateKey", &a.PrivateKey) + case "value": + err = unpopulate(val, "Value", &b.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ActiveDeploymentCollection. -func (a ActiveDeploymentCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildProperties. +func (b BuildProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "activeDeploymentNames", a.ActiveDeploymentNames) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ActiveDeploymentCollection. -func (a *ActiveDeploymentCollection) UnmarshalJSON(data []byte) error { + populate(objectMap, "agentPool", b.AgentPool) + populate(objectMap, "builder", b.Builder) + populate(objectMap, "env", b.Env) + populate(objectMap, "provisioningState", b.ProvisioningState) + populate(objectMap, "relativePath", b.RelativePath) + populate(objectMap, "triggeredBuildResult", b.TriggeredBuildResult) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildProperties. +func (b *BuildProperties) 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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { - case "activeDeploymentNames": - err = unpopulate(val, "ActiveDeploymentNames", &a.ActiveDeploymentNames) + case "agentPool": + err = unpopulate(val, "AgentPool", &b.AgentPool) + delete(rawMsg, key) + case "builder": + err = unpopulate(val, "Builder", &b.Builder) + delete(rawMsg, key) + case "env": + err = unpopulate(val, "Env", &b.Env) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + delete(rawMsg, key) + case "relativePath": + err = unpopulate(val, "RelativePath", &b.RelativePath) + delete(rawMsg, key) + case "triggeredBuildResult": + err = unpopulate(val, "TriggeredBuildResult", &b.TriggeredBuildResult) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type AppResource. -func (a AppResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildResult. +func (b BuildResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - populate(objectMap, "identity", a.Identity) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "systemData", a.SystemData) - populate(objectMap, "type", a.Type) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "type", b.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type AppResource. -func (a *AppResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildResult. +func (b *BuildResult) 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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &a.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &a.Location) + err = unpopulate(val, "ID", &b.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &a.Name) + err = unpopulate(val, "Name", &b.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &a.Properties) + err = unpopulate(val, "Properties", &b.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) + err = unpopulate(val, "SystemData", &b.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &a.Type) + err = unpopulate(val, "Type", &b.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type AppResourceCollection. -func (a AppResourceCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildResultCollection. +func (b BuildResultCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type AppResourceCollection. -func (a *AppResourceCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildResultCollection. +func (b *BuildResultCollection) 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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) + err = unpopulate(val, "NextLink", &b.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &a.Value) + err = unpopulate(val, "Value", &b.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type AppResourceProperties. -func (a AppResourceProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildResultLog. +func (b BuildResultLog) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "addonConfigs", a.AddonConfigs) - populate(objectMap, "customPersistentDisks", a.CustomPersistentDisks) - populate(objectMap, "enableEndToEndTLS", a.EnableEndToEndTLS) - populate(objectMap, "fqdn", a.Fqdn) - populate(objectMap, "httpsOnly", a.HTTPSOnly) - populate(objectMap, "ingressSettings", a.IngressSettings) - populate(objectMap, "loadedCertificates", a.LoadedCertificates) - populate(objectMap, "persistentDisk", a.PersistentDisk) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "public", a.Public) - populate(objectMap, "temporaryDisk", a.TemporaryDisk) - populate(objectMap, "url", a.URL) - populate(objectMap, "vnetAddons", a.VnetAddons) + populate(objectMap, "blobUrl", b.BlobURL) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type AppResourceProperties. -func (a *AppResourceProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildResultLog. +func (b *BuildResultLog) 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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { - case "addonConfigs": - err = unpopulate(val, "AddonConfigs", &a.AddonConfigs) - delete(rawMsg, key) - case "customPersistentDisks": - err = unpopulate(val, "CustomPersistentDisks", &a.CustomPersistentDisks) - delete(rawMsg, key) - case "enableEndToEndTLS": - err = unpopulate(val, "EnableEndToEndTLS", &a.EnableEndToEndTLS) - delete(rawMsg, key) - case "fqdn": - err = unpopulate(val, "Fqdn", &a.Fqdn) - delete(rawMsg, key) - case "httpsOnly": - err = unpopulate(val, "HTTPSOnly", &a.HTTPSOnly) - delete(rawMsg, key) - case "ingressSettings": - err = unpopulate(val, "IngressSettings", &a.IngressSettings) - delete(rawMsg, key) - case "loadedCertificates": - err = unpopulate(val, "LoadedCertificates", &a.LoadedCertificates) - delete(rawMsg, key) - case "persistentDisk": - err = unpopulate(val, "PersistentDisk", &a.PersistentDisk) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "public": - err = unpopulate(val, "Public", &a.Public) - delete(rawMsg, key) - case "temporaryDisk": - err = unpopulate(val, "TemporaryDisk", &a.TemporaryDisk) - delete(rawMsg, key) - case "url": - err = unpopulate(val, "URL", &a.URL) - delete(rawMsg, key) - case "vnetAddons": - err = unpopulate(val, "VnetAddons", &a.VnetAddons) + case "blobUrl": + err = unpopulate(val, "BlobURL", &b.BlobURL) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type AppVNetAddons. -func (a AppVNetAddons) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildResultProperties. +func (b BuildResultProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "publicEndpoint", a.PublicEndpoint) - populate(objectMap, "publicEndpointUrl", a.PublicEndpointURL) + populate(objectMap, "buildPodName", b.BuildPodName) + populate(objectMap, "buildStages", b.BuildStages) + populate(objectMap, "name", b.Name) + populate(objectMap, "provisioningState", b.ProvisioningState) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type AppVNetAddons. -func (a *AppVNetAddons) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildResultProperties. +func (b *BuildResultProperties) 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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { - case "publicEndpoint": - err = unpopulate(val, "PublicEndpoint", &a.PublicEndpoint) + case "buildPodName": + err = unpopulate(val, "BuildPodName", &b.BuildPodName) + delete(rawMsg, key) + case "buildStages": + err = unpopulate(val, "BuildStages", &b.BuildStages) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) delete(rawMsg, key) - case "publicEndpointUrl": - err = unpopulate(val, "PublicEndpointURL", &a.PublicEndpointURL) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ApplicationAcceleratorComponent. -func (a ApplicationAcceleratorComponent) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildResultUserSourceInfo. +func (b BuildResultUserSourceInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "instances", a.Instances) - populate(objectMap, "name", a.Name) - populate(objectMap, "resourceRequests", a.ResourceRequests) + populate(objectMap, "buildResultId", b.BuildResultID) + objectMap["type"] = "BuildResult" + populate(objectMap, "version", b.Version) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationAcceleratorComponent. -func (a *ApplicationAcceleratorComponent) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildResultUserSourceInfo. +func (b *BuildResultUserSourceInfo) 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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { - case "instances": - err = unpopulate(val, "Instances", &a.Instances) + case "buildResultId": + err = unpopulate(val, "BuildResultID", &b.BuildResultID) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) + case "type": + err = unpopulate(val, "Type", &b.Type) delete(rawMsg, key) - case "resourceRequests": - err = unpopulate(val, "ResourceRequests", &a.ResourceRequests) + case "version": + err = unpopulate(val, "Version", &b.Version) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ApplicationAcceleratorInstance. -func (a ApplicationAcceleratorInstance) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildService. +func (b BuildService) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "name", a.Name) - populate(objectMap, "status", a.Status) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "type", b.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationAcceleratorInstance. -func (a *ApplicationAcceleratorInstance) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildService. +func (b *BuildService) 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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &a.Name) + err = unpopulate(val, "Name", &b.Name) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &a.Status) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &b.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ApplicationAcceleratorProperties. -func (a ApplicationAcceleratorProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolProperties. +func (b BuildServiceAgentPoolProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "components", a.Components) - populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "poolSize", b.PoolSize) + populate(objectMap, "provisioningState", b.ProvisioningState) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationAcceleratorProperties. -func (a *ApplicationAcceleratorProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceAgentPoolProperties. +func (b *BuildServiceAgentPoolProperties) 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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { - case "components": - err = unpopulate(val, "Components", &a.Components) + case "poolSize": + err = unpopulate(val, "PoolSize", &b.PoolSize) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ApplicationAcceleratorResource. -func (a ApplicationAcceleratorResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolResource. +func (b BuildServiceAgentPoolResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "sku", a.SKU) - populate(objectMap, "systemData", a.SystemData) - populate(objectMap, "type", a.Type) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "type", b.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationAcceleratorResource. -func (a *ApplicationAcceleratorResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceAgentPoolResource. +func (b *BuildServiceAgentPoolResource) 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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { case "id": - err = unpopulate(val, "ID", &a.ID) + err = unpopulate(val, "ID", &b.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &a.Name) + err = unpopulate(val, "Name", &b.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &a.SKU) + err = unpopulate(val, "Properties", &b.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) + err = unpopulate(val, "SystemData", &b.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &a.Type) + err = unpopulate(val, "Type", &b.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ApplicationAcceleratorResourceCollection. -func (a ApplicationAcceleratorResourceCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolResourceCollection. +func (b BuildServiceAgentPoolResourceCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationAcceleratorResourceCollection. -func (a *ApplicationAcceleratorResourceCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceAgentPoolResourceCollection. +func (b *BuildServiceAgentPoolResourceCollection) 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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) + err = unpopulate(val, "NextLink", &b.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &a.Value) + err = unpopulate(val, "Value", &b.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ApplicationAcceleratorResourceRequests. -func (a ApplicationAcceleratorResourceRequests) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolSizeProperties. +func (b BuildServiceAgentPoolSizeProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "cpu", a.CPU) - populate(objectMap, "instanceCount", a.InstanceCount) - populate(objectMap, "memory", a.Memory) + populate(objectMap, "cpu", b.CPU) + populate(objectMap, "memory", b.Memory) + populate(objectMap, "name", b.Name) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationAcceleratorResourceRequests. -func (a *ApplicationAcceleratorResourceRequests) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceAgentPoolSizeProperties. +func (b *BuildServiceAgentPoolSizeProperties) 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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { case "cpu": - err = unpopulate(val, "CPU", &a.CPU) - delete(rawMsg, key) - case "instanceCount": - err = unpopulate(val, "InstanceCount", &a.InstanceCount) + err = unpopulate(val, "CPU", &b.CPU) delete(rawMsg, key) case "memory": - err = unpopulate(val, "Memory", &a.Memory) + err = unpopulate(val, "Memory", &b.Memory) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ApplicationInsightsAgentVersions. -func (a ApplicationInsightsAgentVersions) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildServiceCollection. +func (b BuildServiceCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "java", a.Java) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationInsightsAgentVersions. -func (a *ApplicationInsightsAgentVersions) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceCollection. +func (b *BuildServiceCollection) 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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { - case "java": - err = unpopulate(val, "Java", &a.Java) + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ApplicationLiveViewComponent. -func (a ApplicationLiveViewComponent) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildServiceProperties. +func (b BuildServiceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "instances", a.Instances) - populate(objectMap, "name", &a.Name) - populate(objectMap, "resourceRequests", a.ResourceRequests) + populate(objectMap, "kPackVersion", b.KPackVersion) + populate(objectMap, "provisioningState", b.ProvisioningState) + populate(objectMap, "resourceRequests", b.ResourceRequests) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationLiveViewComponent. -func (a *ApplicationLiveViewComponent) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceProperties. +func (b *BuildServiceProperties) 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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { - case "instances": - err = unpopulate(val, "Instances", &a.Instances) + case "kPackVersion": + err = unpopulate(val, "KPackVersion", &b.KPackVersion) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) delete(rawMsg, key) case "resourceRequests": - err = unpopulate(val, "ResourceRequests", &a.ResourceRequests) + err = unpopulate(val, "ResourceRequests", &b.ResourceRequests) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ApplicationLiveViewInstance. -func (a ApplicationLiveViewInstance) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildServicePropertiesResourceRequests. +func (b BuildServicePropertiesResourceRequests) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "name", a.Name) - populate(objectMap, "status", a.Status) + populate(objectMap, "cpu", b.CPU) + populate(objectMap, "memory", b.Memory) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationLiveViewInstance. -func (a *ApplicationLiveViewInstance) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildServicePropertiesResourceRequests. +func (b *BuildServicePropertiesResourceRequests) 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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cpu": + err = unpopulate(val, "CPU", &b.CPU) + delete(rawMsg, key) + case "memory": + err = unpopulate(val, "Memory", &b.Memory) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildStageProperties. +func (b BuildStageProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", b.Name) + populate(objectMap, "status", b.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildStageProperties. +func (b *BuildStageProperties) 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", b, err) } for key, val := range rawMsg { var err error switch key { case "name": - err = unpopulate(val, "Name", &a.Name) + err = unpopulate(val, "Name", &b.Name) delete(rawMsg, key) case "status": - err = unpopulate(val, "Status", &a.Status) + err = unpopulate(val, "Status", &b.Status) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ApplicationLiveViewProperties. -func (a ApplicationLiveViewProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuilderProperties. +func (b BuilderProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "components", a.Components) - populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "buildpackGroups", b.BuildpackGroups) + populate(objectMap, "provisioningState", b.ProvisioningState) + populate(objectMap, "stack", b.Stack) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationLiveViewProperties. -func (a *ApplicationLiveViewProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuilderProperties. +func (b *BuilderProperties) 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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { - case "components": - err = unpopulate(val, "Components", &a.Components) + case "buildpackGroups": + err = unpopulate(val, "BuildpackGroups", &b.BuildpackGroups) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + delete(rawMsg, key) + case "stack": + err = unpopulate(val, "Stack", &b.Stack) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ApplicationLiveViewResource. -func (a ApplicationLiveViewResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuilderResource. +func (b BuilderResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "systemData", a.SystemData) - populate(objectMap, "type", a.Type) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "type", b.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationLiveViewResource. -func (a *ApplicationLiveViewResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuilderResource. +func (b *BuilderResource) 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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { case "id": - err = unpopulate(val, "ID", &a.ID) + err = unpopulate(val, "ID", &b.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &a.Name) + err = unpopulate(val, "Name", &b.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &a.Properties) + err = unpopulate(val, "Properties", &b.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) + err = unpopulate(val, "SystemData", &b.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &a.Type) + err = unpopulate(val, "Type", &b.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ApplicationLiveViewResourceCollection. -func (a ApplicationLiveViewResourceCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuilderResourceCollection. +func (b BuilderResourceCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationLiveViewResourceCollection. -func (a *ApplicationLiveViewResourceCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuilderResourceCollection. +func (b *BuilderResourceCollection) 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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) + err = unpopulate(val, "NextLink", &b.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &a.Value) + err = unpopulate(val, "Value", &b.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ApplicationLiveViewResourceRequests. -func (a ApplicationLiveViewResourceRequests) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildpackBindingLaunchProperties. +func (b BuildpackBindingLaunchProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "cpu", a.CPU) - populate(objectMap, "instanceCount", a.InstanceCount) - populate(objectMap, "memory", a.Memory) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "secrets", b.Secrets) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationLiveViewResourceRequests. -func (a *ApplicationLiveViewResourceRequests) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildpackBindingLaunchProperties. +func (b *BuildpackBindingLaunchProperties) 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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { - case "cpu": - err = unpopulate(val, "CPU", &a.CPU) - delete(rawMsg, key) - case "instanceCount": - err = unpopulate(val, "InstanceCount", &a.InstanceCount) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) delete(rawMsg, key) - case "memory": - err = unpopulate(val, "Memory", &a.Memory) + case "secrets": + err = unpopulate(val, "Secrets", &b.Secrets) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type AvailableOperations. -func (a AvailableOperations) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildpackBindingProperties. +func (b BuildpackBindingProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) + populate(objectMap, "bindingType", b.BindingType) + populate(objectMap, "launchProperties", b.LaunchProperties) + populate(objectMap, "provisioningState", b.ProvisioningState) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableOperations. -func (a *AvailableOperations) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildpackBindingProperties. +func (b *BuildpackBindingProperties) 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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) + case "bindingType": + err = unpopulate(val, "BindingType", &b.BindingType) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) + case "launchProperties": + err = unpopulate(val, "LaunchProperties", &b.LaunchProperties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type AvailableRuntimeVersions. -func (a AvailableRuntimeVersions) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildpackBindingResource. +func (b BuildpackBindingResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", a.Value) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "type", b.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableRuntimeVersions. -func (a *AvailableRuntimeVersions) 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", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFileVolume. -func (a AzureFileVolume) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "mountOptions", a.MountOptions) - populate(objectMap, "mountPath", a.MountPath) - populate(objectMap, "readOnly", a.ReadOnly) - populate(objectMap, "shareName", a.ShareName) - objectMap["type"] = TypeAzureFileVolume - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFileVolume. -func (a *AzureFileVolume) 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", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "mountOptions": - err = unpopulate(val, "MountOptions", &a.MountOptions) - delete(rawMsg, key) - case "mountPath": - err = unpopulate(val, "MountPath", &a.MountPath) - delete(rawMsg, key) - case "readOnly": - err = unpopulate(val, "ReadOnly", &a.ReadOnly) - delete(rawMsg, key) - case "shareName": - err = unpopulate(val, "ShareName", &a.ShareName) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BindingResource. -func (b BindingResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", b.ID) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "systemData", b.SystemData) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BindingResource. -func (b *BindingResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildpackBindingResource. +func (b *BuildpackBindingResource) 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", b, err) @@ -1293,16 +1227,16 @@ func (b *BindingResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type BindingResourceCollection. -func (b BindingResourceCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildpackBindingResourceCollection. +func (b BuildpackBindingResourceCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "nextLink", b.NextLink) populate(objectMap, "value", b.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type BindingResourceCollection. -func (b *BindingResourceCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildpackBindingResourceCollection. +func (b *BuildpackBindingResourceCollection) 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", b, err) @@ -1324,74 +1258,15 @@ func (b *BindingResourceCollection) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type BindingResourceProperties. -func (b BindingResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "bindingParameters", b.BindingParameters) - populate(objectMap, "createdAt", b.CreatedAt) - populate(objectMap, "generatedProperties", b.GeneratedProperties) - populate(objectMap, "key", b.Key) - populate(objectMap, "resourceId", b.ResourceID) - populate(objectMap, "resourceName", b.ResourceName) - populate(objectMap, "resourceType", b.ResourceType) - populate(objectMap, "updatedAt", b.UpdatedAt) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BindingResourceProperties. -func (b *BindingResourceProperties) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "bindingParameters": - err = unpopulate(val, "BindingParameters", &b.BindingParameters) - delete(rawMsg, key) - case "createdAt": - err = unpopulate(val, "CreatedAt", &b.CreatedAt) - delete(rawMsg, key) - case "generatedProperties": - err = unpopulate(val, "GeneratedProperties", &b.GeneratedProperties) - delete(rawMsg, key) - case "key": - err = unpopulate(val, "Key", &b.Key) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &b.ResourceID) - delete(rawMsg, key) - case "resourceName": - err = unpopulate(val, "ResourceName", &b.ResourceName) - delete(rawMsg, key) - case "resourceType": - err = unpopulate(val, "ResourceType", &b.ResourceType) - delete(rawMsg, key) - case "updatedAt": - err = unpopulate(val, "UpdatedAt", &b.UpdatedAt) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Build. -func (b Build) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildpackProperties. +func (b BuildpackProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", b.ID) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "systemData", b.SystemData) - populate(objectMap, "type", b.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Build. -func (b *Build) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildpackProperties. +func (b *BuildpackProperties) 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", b, err) @@ -1402,18 +1277,6 @@ func (b *Build) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &b.ID) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &b.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &b.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &b.Type) - delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", b, err) @@ -1422,16 +1285,16 @@ func (b *Build) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type BuildCollection. -func (b BuildCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildpacksGroupProperties. +func (b BuildpacksGroupProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", b.NextLink) - populate(objectMap, "value", b.Value) + populate(objectMap, "buildpacks", b.Buildpacks) + populate(objectMap, "name", b.Name) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildCollection. -func (b *BuildCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildpacksGroupProperties. +func (b *BuildpacksGroupProperties) 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", b, err) @@ -1439,11 +1302,11 @@ func (b *BuildCollection) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &b.NextLink) + case "buildpacks": + err = unpopulate(val, "Buildpacks", &b.Buildpacks) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &b.Value) + case "name": + err = unpopulate(val, "Name", &b.Name) delete(rawMsg, key) } if err != nil { @@ -1453,3832 +1316,1335 @@ func (b *BuildCollection) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type BuildProperties. -func (b BuildProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CertificateProperties. +func (c CertificateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "agentPool", b.AgentPool) - populate(objectMap, "builder", b.Builder) - populate(objectMap, "env", b.Env) - populate(objectMap, "provisioningState", b.ProvisioningState) - populate(objectMap, "relativePath", b.RelativePath) - populate(objectMap, "resourceRequests", b.ResourceRequests) - populate(objectMap, "triggeredBuildResult", b.TriggeredBuildResult) + populate(objectMap, "activateDate", c.ActivateDate) + populate(objectMap, "dnsNames", c.DNSNames) + populate(objectMap, "expirationDate", c.ExpirationDate) + populate(objectMap, "issuedDate", c.IssuedDate) + populate(objectMap, "issuer", c.Issuer) + populate(objectMap, "subjectName", c.SubjectName) + populate(objectMap, "thumbprint", c.Thumbprint) + objectMap["type"] = c.Type return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildProperties. -func (b *BuildProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateProperties. +func (c *CertificateProperties) 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", b, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "agentPool": - err = unpopulate(val, "AgentPool", &b.AgentPool) - delete(rawMsg, key) - case "builder": - err = unpopulate(val, "Builder", &b.Builder) + case "activateDate": + err = unpopulate(val, "ActivateDate", &c.ActivateDate) delete(rawMsg, key) - case "env": - err = unpopulate(val, "Env", &b.Env) + case "dnsNames": + err = unpopulate(val, "DNSNames", &c.DNSNames) delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + case "expirationDate": + err = unpopulate(val, "ExpirationDate", &c.ExpirationDate) delete(rawMsg, key) - case "relativePath": - err = unpopulate(val, "RelativePath", &b.RelativePath) + case "issuedDate": + err = unpopulate(val, "IssuedDate", &c.IssuedDate) delete(rawMsg, key) - case "resourceRequests": - err = unpopulate(val, "ResourceRequests", &b.ResourceRequests) + case "issuer": + err = unpopulate(val, "Issuer", &c.Issuer) delete(rawMsg, key) - case "triggeredBuildResult": - err = unpopulate(val, "TriggeredBuildResult", &b.TriggeredBuildResult) + case "subjectName": + err = unpopulate(val, "SubjectName", &c.SubjectName) delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BuildResourceRequests. -func (b BuildResourceRequests) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "cpu", b.CPU) - populate(objectMap, "memory", b.Memory) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildResourceRequests. -func (b *BuildResourceRequests) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "cpu": - err = unpopulate(val, "CPU", &b.CPU) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &c.Thumbprint) delete(rawMsg, key) - case "memory": - err = unpopulate(val, "Memory", &b.Memory) + case "type": + err = unpopulate(val, "Type", &c.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type BuildResult. -func (b BuildResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", b.ID) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "systemData", b.SystemData) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildResult. -func (b *BuildResult) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &b.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &b.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &b.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &b.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BuildResultCollection. -func (b BuildResultCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", b.NextLink) - populate(objectMap, "value", b.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildResultCollection. -func (b *BuildResultCollection) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &b.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &b.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BuildResultLog. -func (b BuildResultLog) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "blobUrl", b.BlobURL) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildResultLog. -func (b *BuildResultLog) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "blobUrl": - err = unpopulate(val, "BlobURL", &b.BlobURL) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BuildResultProperties. -func (b BuildResultProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "buildPodName", b.BuildPodName) - populate(objectMap, "buildStages", b.BuildStages) - populate(objectMap, "error", b.Error) - populate(objectMap, "name", b.Name) - populate(objectMap, "provisioningState", b.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildResultProperties. -func (b *BuildResultProperties) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "buildPodName": - err = unpopulate(val, "BuildPodName", &b.BuildPodName) - delete(rawMsg, key) - case "buildStages": - err = unpopulate(val, "BuildStages", &b.BuildStages) - delete(rawMsg, key) - case "error": - err = unpopulate(val, "Error", &b.Error) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BuildResultUserSourceInfo. -func (b BuildResultUserSourceInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "buildResultId", b.BuildResultID) - objectMap["type"] = "BuildResult" - populate(objectMap, "version", b.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildResultUserSourceInfo. -func (b *BuildResultUserSourceInfo) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "buildResultId": - err = unpopulate(val, "BuildResultID", &b.BuildResultID) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &b.Type) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &b.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BuildService. -func (b BuildService) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", b.ID) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "systemData", b.SystemData) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildService. -func (b *BuildService) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &b.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &b.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &b.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &b.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolProperties. -func (b BuildServiceAgentPoolProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "poolSize", b.PoolSize) - populate(objectMap, "provisioningState", b.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceAgentPoolProperties. -func (b *BuildServiceAgentPoolProperties) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "poolSize": - err = unpopulate(val, "PoolSize", &b.PoolSize) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolResource. -func (b BuildServiceAgentPoolResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", b.ID) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "systemData", b.SystemData) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceAgentPoolResource. -func (b *BuildServiceAgentPoolResource) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &b.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &b.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &b.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &b.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolResourceCollection. -func (b BuildServiceAgentPoolResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", b.NextLink) - populate(objectMap, "value", b.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceAgentPoolResourceCollection. -func (b *BuildServiceAgentPoolResourceCollection) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &b.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &b.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolSizeProperties. -func (b BuildServiceAgentPoolSizeProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "cpu", b.CPU) - populate(objectMap, "memory", b.Memory) - populate(objectMap, "name", b.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceAgentPoolSizeProperties. -func (b *BuildServiceAgentPoolSizeProperties) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "cpu": - err = unpopulate(val, "CPU", &b.CPU) - delete(rawMsg, key) - case "memory": - err = unpopulate(val, "Memory", &b.Memory) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BuildServiceCollection. -func (b BuildServiceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", b.NextLink) - populate(objectMap, "value", b.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceCollection. -func (b *BuildServiceCollection) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &b.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &b.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BuildServiceProperties. -func (b BuildServiceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "kPackVersion", b.KPackVersion) - populate(objectMap, "provisioningState", b.ProvisioningState) - populate(objectMap, "resourceRequests", b.ResourceRequests) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceProperties. -func (b *BuildServiceProperties) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "kPackVersion": - err = unpopulate(val, "KPackVersion", &b.KPackVersion) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) - delete(rawMsg, key) - case "resourceRequests": - err = unpopulate(val, "ResourceRequests", &b.ResourceRequests) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BuildServicePropertiesResourceRequests. -func (b BuildServicePropertiesResourceRequests) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "cpu", b.CPU) - populate(objectMap, "memory", b.Memory) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildServicePropertiesResourceRequests. -func (b *BuildServicePropertiesResourceRequests) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "cpu": - err = unpopulate(val, "CPU", &b.CPU) - delete(rawMsg, key) - case "memory": - err = unpopulate(val, "Memory", &b.Memory) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BuildStageProperties. -func (b BuildStageProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "exitCode", b.ExitCode) - populate(objectMap, "name", b.Name) - populate(objectMap, "reason", b.Reason) - populate(objectMap, "status", b.Status) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildStageProperties. -func (b *BuildStageProperties) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "exitCode": - err = unpopulate(val, "ExitCode", &b.ExitCode) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "reason": - err = unpopulate(val, "Reason", &b.Reason) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &b.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BuilderProperties. -func (b BuilderProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "buildpackGroups", b.BuildpackGroups) - populate(objectMap, "provisioningState", b.ProvisioningState) - populate(objectMap, "stack", b.Stack) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuilderProperties. -func (b *BuilderProperties) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "buildpackGroups": - err = unpopulate(val, "BuildpackGroups", &b.BuildpackGroups) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) - delete(rawMsg, key) - case "stack": - err = unpopulate(val, "Stack", &b.Stack) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BuilderResource. -func (b BuilderResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", b.ID) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "systemData", b.SystemData) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuilderResource. -func (b *BuilderResource) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &b.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &b.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &b.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &b.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BuilderResourceCollection. -func (b BuilderResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", b.NextLink) - populate(objectMap, "value", b.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuilderResourceCollection. -func (b *BuilderResourceCollection) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &b.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &b.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BuildpackBindingLaunchProperties. -func (b BuildpackBindingLaunchProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "secrets", b.Secrets) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildpackBindingLaunchProperties. -func (b *BuildpackBindingLaunchProperties) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &b.Properties) - delete(rawMsg, key) - case "secrets": - err = unpopulate(val, "Secrets", &b.Secrets) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BuildpackBindingProperties. -func (b BuildpackBindingProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "bindingType", b.BindingType) - populate(objectMap, "launchProperties", b.LaunchProperties) - populate(objectMap, "provisioningState", b.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildpackBindingProperties. -func (b *BuildpackBindingProperties) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "bindingType": - err = unpopulate(val, "BindingType", &b.BindingType) - delete(rawMsg, key) - case "launchProperties": - err = unpopulate(val, "LaunchProperties", &b.LaunchProperties) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BuildpackBindingResource. -func (b BuildpackBindingResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", b.ID) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "systemData", b.SystemData) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildpackBindingResource. -func (b *BuildpackBindingResource) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &b.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &b.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &b.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &b.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BuildpackBindingResourceCollection. -func (b BuildpackBindingResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", b.NextLink) - populate(objectMap, "value", b.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildpackBindingResourceCollection. -func (b *BuildpackBindingResourceCollection) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &b.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &b.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BuildpackProperties. -func (b BuildpackProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", b.ID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildpackProperties. -func (b *BuildpackProperties) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &b.ID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BuildpacksGroupProperties. -func (b BuildpacksGroupProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "buildpacks", b.Buildpacks) - populate(objectMap, "name", b.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildpacksGroupProperties. -func (b *BuildpacksGroupProperties) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "buildpacks": - err = unpopulate(val, "Buildpacks", &b.Buildpacks) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateProperties. -func (c CertificateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "activateDate", c.ActivateDate) - populate(objectMap, "dnsNames", c.DNSNames) - populate(objectMap, "expirationDate", c.ExpirationDate) - populate(objectMap, "issuedDate", c.IssuedDate) - populate(objectMap, "issuer", c.Issuer) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "subjectName", c.SubjectName) - populate(objectMap, "thumbprint", c.Thumbprint) - objectMap["type"] = c.Type - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateProperties. -func (c *CertificateProperties) 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 "activateDate": - err = unpopulate(val, "ActivateDate", &c.ActivateDate) - delete(rawMsg, key) - case "dnsNames": - err = unpopulate(val, "DNSNames", &c.DNSNames) - delete(rawMsg, key) - case "expirationDate": - err = unpopulate(val, "ExpirationDate", &c.ExpirationDate) - delete(rawMsg, key) - case "issuedDate": - err = unpopulate(val, "IssuedDate", &c.IssuedDate) - delete(rawMsg, key) - case "issuer": - err = unpopulate(val, "Issuer", &c.Issuer) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - case "subjectName": - err = unpopulate(val, "SubjectName", &c.SubjectName) - delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &c.Thumbprint) - 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 CertificateResource. -func (c CertificateResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", c.ID) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "systemData", c.SystemData) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateResource. -func (c *CertificateResource) 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 "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "properties": - c.Properties, err = unmarshalCertificatePropertiesClassification(val) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &c.SystemData) - 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 CertificateResourceCollection. -func (c CertificateResourceCollection) 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 CertificateResourceCollection. -func (c *CertificateResourceCollection) 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) - 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 ClusterResourceProperties. -func (c ClusterResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "fqdn", c.Fqdn) - populate(objectMap, "marketplaceResource", c.MarketplaceResource) - populate(objectMap, "networkProfile", c.NetworkProfile) - populate(objectMap, "powerState", c.PowerState) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "serviceId", c.ServiceID) - populate(objectMap, "version", c.Version) - populate(objectMap, "vnetAddons", c.VnetAddons) - populate(objectMap, "zoneRedundant", c.ZoneRedundant) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterResourceProperties. -func (c *ClusterResourceProperties) 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 "fqdn": - err = unpopulate(val, "Fqdn", &c.Fqdn) - delete(rawMsg, key) - case "marketplaceResource": - err = unpopulate(val, "MarketplaceResource", &c.MarketplaceResource) - delete(rawMsg, key) - case "networkProfile": - err = unpopulate(val, "NetworkProfile", &c.NetworkProfile) - delete(rawMsg, key) - case "powerState": - err = unpopulate(val, "PowerState", &c.PowerState) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - case "serviceId": - err = unpopulate(val, "ServiceID", &c.ServiceID) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &c.Version) - delete(rawMsg, key) - case "vnetAddons": - err = unpopulate(val, "VnetAddons", &c.VnetAddons) - delete(rawMsg, key) - case "zoneRedundant": - err = unpopulate(val, "ZoneRedundant", &c.ZoneRedundant) - 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 ConfigServerGitProperty. -func (c ConfigServerGitProperty) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "hostKey", c.HostKey) - populate(objectMap, "hostKeyAlgorithm", c.HostKeyAlgorithm) - populate(objectMap, "label", c.Label) - populate(objectMap, "password", c.Password) - populate(objectMap, "privateKey", c.PrivateKey) - populate(objectMap, "repositories", c.Repositories) - populate(objectMap, "searchPaths", c.SearchPaths) - populate(objectMap, "strictHostKeyChecking", c.StrictHostKeyChecking) - populate(objectMap, "uri", c.URI) - populate(objectMap, "username", c.Username) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigServerGitProperty. -func (c *ConfigServerGitProperty) 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 "hostKey": - err = unpopulate(val, "HostKey", &c.HostKey) - delete(rawMsg, key) - case "hostKeyAlgorithm": - err = unpopulate(val, "HostKeyAlgorithm", &c.HostKeyAlgorithm) - delete(rawMsg, key) - case "label": - err = unpopulate(val, "Label", &c.Label) - delete(rawMsg, key) - case "password": - err = unpopulate(val, "Password", &c.Password) - delete(rawMsg, key) - case "privateKey": - err = unpopulate(val, "PrivateKey", &c.PrivateKey) - delete(rawMsg, key) - case "repositories": - err = unpopulate(val, "Repositories", &c.Repositories) - delete(rawMsg, key) - case "searchPaths": - err = unpopulate(val, "SearchPaths", &c.SearchPaths) - delete(rawMsg, key) - case "strictHostKeyChecking": - err = unpopulate(val, "StrictHostKeyChecking", &c.StrictHostKeyChecking) - delete(rawMsg, key) - case "uri": - err = unpopulate(val, "URI", &c.URI) - delete(rawMsg, key) - case "username": - err = unpopulate(val, "Username", &c.Username) - 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 ConfigServerProperties. -func (c ConfigServerProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "configServer", c.ConfigServer) - populate(objectMap, "error", c.Error) - populate(objectMap, "provisioningState", c.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigServerProperties. -func (c *ConfigServerProperties) 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 "configServer": - err = unpopulate(val, "ConfigServer", &c.ConfigServer) - delete(rawMsg, key) - case "error": - err = unpopulate(val, "Error", &c.Error) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - 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 ConfigServerResource. -func (c ConfigServerResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", c.ID) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "systemData", c.SystemData) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigServerResource. -func (c *ConfigServerResource) 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 "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 "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 ConfigServerSettings. -func (c ConfigServerSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "gitProperty", c.GitProperty) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigServerSettings. -func (c *ConfigServerSettings) 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 "gitProperty": - err = unpopulate(val, "GitProperty", &c.GitProperty) - 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 ConfigServerSettingsErrorRecord. -func (c ConfigServerSettingsErrorRecord) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "messages", c.Messages) - populate(objectMap, "name", c.Name) - populate(objectMap, "uri", c.URI) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigServerSettingsErrorRecord. -func (c *ConfigServerSettingsErrorRecord) 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 "messages": - err = unpopulate(val, "Messages", &c.Messages) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "uri": - err = unpopulate(val, "URI", &c.URI) - 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 ConfigServerSettingsValidateResult. -func (c ConfigServerSettingsValidateResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "details", c.Details) - populate(objectMap, "isValid", c.IsValid) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigServerSettingsValidateResult. -func (c *ConfigServerSettingsValidateResult) 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 "details": - err = unpopulate(val, "Details", &c.Details) - delete(rawMsg, key) - case "isValid": - err = unpopulate(val, "IsValid", &c.IsValid) - 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 ConfigurationServiceGitProperty. -func (c ConfigurationServiceGitProperty) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "repositories", c.Repositories) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceGitProperty. -func (c *ConfigurationServiceGitProperty) 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 "repositories": - err = unpopulate(val, "Repositories", &c.Repositories) - 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 ConfigurationServiceGitPropertyValidateResult. -func (c ConfigurationServiceGitPropertyValidateResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "gitReposValidationResult", c.GitReposValidationResult) - populate(objectMap, "isValid", c.IsValid) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceGitPropertyValidateResult. -func (c *ConfigurationServiceGitPropertyValidateResult) 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 "gitReposValidationResult": - err = unpopulate(val, "GitReposValidationResult", &c.GitReposValidationResult) - delete(rawMsg, key) - case "isValid": - err = unpopulate(val, "IsValid", &c.IsValid) - 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 ConfigurationServiceGitRepository. -func (c ConfigurationServiceGitRepository) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "hostKey", c.HostKey) - populate(objectMap, "hostKeyAlgorithm", c.HostKeyAlgorithm) - populate(objectMap, "label", c.Label) - populate(objectMap, "name", c.Name) - populate(objectMap, "password", c.Password) - populate(objectMap, "patterns", c.Patterns) - populate(objectMap, "privateKey", c.PrivateKey) - populate(objectMap, "searchPaths", c.SearchPaths) - populate(objectMap, "strictHostKeyChecking", c.StrictHostKeyChecking) - populate(objectMap, "uri", c.URI) - populate(objectMap, "username", c.Username) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceGitRepository. -func (c *ConfigurationServiceGitRepository) 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 "hostKey": - err = unpopulate(val, "HostKey", &c.HostKey) - delete(rawMsg, key) - case "hostKeyAlgorithm": - err = unpopulate(val, "HostKeyAlgorithm", &c.HostKeyAlgorithm) - delete(rawMsg, key) - case "label": - err = unpopulate(val, "Label", &c.Label) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "password": - err = unpopulate(val, "Password", &c.Password) - delete(rawMsg, key) - case "patterns": - err = unpopulate(val, "Patterns", &c.Patterns) - delete(rawMsg, key) - case "privateKey": - err = unpopulate(val, "PrivateKey", &c.PrivateKey) - delete(rawMsg, key) - case "searchPaths": - err = unpopulate(val, "SearchPaths", &c.SearchPaths) - delete(rawMsg, key) - case "strictHostKeyChecking": - err = unpopulate(val, "StrictHostKeyChecking", &c.StrictHostKeyChecking) - delete(rawMsg, key) - case "uri": - err = unpopulate(val, "URI", &c.URI) - delete(rawMsg, key) - case "username": - err = unpopulate(val, "Username", &c.Username) - 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 ConfigurationServiceInstance. -func (c ConfigurationServiceInstance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", c.Name) - populate(objectMap, "status", c.Status) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceInstance. -func (c *ConfigurationServiceInstance) 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 "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &c.Status) - 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 ConfigurationServiceProperties. -func (c ConfigurationServiceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "instances", c.Instances) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "resourceRequests", c.ResourceRequests) - populate(objectMap, "settings", c.Settings) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceProperties. -func (c *ConfigurationServiceProperties) 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 "instances": - err = unpopulate(val, "Instances", &c.Instances) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - case "resourceRequests": - err = unpopulate(val, "ResourceRequests", &c.ResourceRequests) - delete(rawMsg, key) - case "settings": - err = unpopulate(val, "Settings", &c.Settings) - 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 ConfigurationServiceResource. -func (c ConfigurationServiceResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", c.ID) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "systemData", c.SystemData) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceResource. -func (c *ConfigurationServiceResource) 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 "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 "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 ConfigurationServiceResourceCollection. -func (c ConfigurationServiceResourceCollection) 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 ConfigurationServiceResourceCollection. -func (c *ConfigurationServiceResourceCollection) 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) - 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 ConfigurationServiceResourceRequests. -func (c ConfigurationServiceResourceRequests) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "cpu", c.CPU) - populate(objectMap, "instanceCount", c.InstanceCount) - populate(objectMap, "memory", c.Memory) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceResourceRequests. -func (c *ConfigurationServiceResourceRequests) 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 "cpu": - err = unpopulate(val, "CPU", &c.CPU) - delete(rawMsg, key) - case "instanceCount": - err = unpopulate(val, "InstanceCount", &c.InstanceCount) - delete(rawMsg, key) - case "memory": - err = unpopulate(val, "Memory", &c.Memory) - 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 ConfigurationServiceSettings. -func (c ConfigurationServiceSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "gitProperty", c.GitProperty) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceSettings. -func (c *ConfigurationServiceSettings) 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 "gitProperty": - err = unpopulate(val, "GitProperty", &c.GitProperty) - 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 ConfigurationServiceSettingsValidateResult. -func (c ConfigurationServiceSettingsValidateResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "gitPropertyValidationResult", c.GitPropertyValidationResult) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceSettingsValidateResult. -func (c *ConfigurationServiceSettingsValidateResult) 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 "gitPropertyValidationResult": - err = unpopulate(val, "GitPropertyValidationResult", &c.GitPropertyValidationResult) - 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 ContainerProbeSettings. -func (c ContainerProbeSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "disableProbe", c.DisableProbe) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerProbeSettings. -func (c *ContainerProbeSettings) 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 "disableProbe": - err = unpopulate(val, "DisableProbe", &c.DisableProbe) - 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 ContentCertificateProperties. -func (c ContentCertificateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "activateDate", c.ActivateDate) - populate(objectMap, "content", c.Content) - populate(objectMap, "dnsNames", c.DNSNames) - populate(objectMap, "expirationDate", c.ExpirationDate) - populate(objectMap, "issuedDate", c.IssuedDate) - populate(objectMap, "issuer", c.Issuer) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "subjectName", c.SubjectName) - populate(objectMap, "thumbprint", c.Thumbprint) - objectMap["type"] = "ContentCertificate" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContentCertificateProperties. -func (c *ContentCertificateProperties) 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 "activateDate": - err = unpopulate(val, "ActivateDate", &c.ActivateDate) - delete(rawMsg, key) - case "content": - err = unpopulate(val, "Content", &c.Content) - delete(rawMsg, key) - case "dnsNames": - err = unpopulate(val, "DNSNames", &c.DNSNames) - delete(rawMsg, key) - case "expirationDate": - err = unpopulate(val, "ExpirationDate", &c.ExpirationDate) - delete(rawMsg, key) - case "issuedDate": - err = unpopulate(val, "IssuedDate", &c.IssuedDate) - delete(rawMsg, key) - case "issuer": - err = unpopulate(val, "Issuer", &c.Issuer) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - case "subjectName": - err = unpopulate(val, "SubjectName", &c.SubjectName) - delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &c.Thumbprint) - 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 CustomContainer. -func (c CustomContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "args", c.Args) - populate(objectMap, "command", c.Command) - populate(objectMap, "containerImage", c.ContainerImage) - populate(objectMap, "imageRegistryCredential", c.ImageRegistryCredential) - populate(objectMap, "languageFramework", c.LanguageFramework) - populate(objectMap, "server", c.Server) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomContainer. -func (c *CustomContainer) 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 "args": - err = unpopulate(val, "Args", &c.Args) - delete(rawMsg, key) - case "command": - err = unpopulate(val, "Command", &c.Command) - delete(rawMsg, key) - case "containerImage": - err = unpopulate(val, "ContainerImage", &c.ContainerImage) - delete(rawMsg, key) - case "imageRegistryCredential": - err = unpopulate(val, "ImageRegistryCredential", &c.ImageRegistryCredential) - delete(rawMsg, key) - case "languageFramework": - err = unpopulate(val, "LanguageFramework", &c.LanguageFramework) - delete(rawMsg, key) - case "server": - err = unpopulate(val, "Server", &c.Server) - 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 CustomContainerUserSourceInfo. -func (c CustomContainerUserSourceInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "customContainer", c.CustomContainer) - objectMap["type"] = "Container" - populate(objectMap, "version", c.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomContainerUserSourceInfo. -func (c *CustomContainerUserSourceInfo) 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 "customContainer": - err = unpopulate(val, "CustomContainer", &c.CustomContainer) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &c.Version) - 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 CustomDomainProperties. -func (c CustomDomainProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "appName", c.AppName) - populate(objectMap, "certName", c.CertName) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "thumbprint", c.Thumbprint) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainProperties. -func (c *CustomDomainProperties) 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 "appName": - err = unpopulate(val, "AppName", &c.AppName) - delete(rawMsg, key) - case "certName": - err = unpopulate(val, "CertName", &c.CertName) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &c.Thumbprint) - 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 CustomDomainResource. -func (c CustomDomainResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", c.ID) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "systemData", c.SystemData) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainResource. -func (c *CustomDomainResource) 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 "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 "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 CustomDomainResourceCollection. -func (c CustomDomainResourceCollection) 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 CustomDomainResourceCollection. -func (c *CustomDomainResourceCollection) 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) - 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 CustomDomainValidatePayload. -func (c CustomDomainValidatePayload) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", c.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainValidatePayload. -func (c *CustomDomainValidatePayload) 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 "name": - err = unpopulate(val, "Name", &c.Name) - 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 CustomDomainValidateResult. -func (c CustomDomainValidateResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "isValid", c.IsValid) - populate(objectMap, "message", c.Message) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainValidateResult. -func (c *CustomDomainValidateResult) 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 "isValid": - err = unpopulate(val, "IsValid", &c.IsValid) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &c.Message) - 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 CustomPersistentDiskProperties. -func (c CustomPersistentDiskProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "mountOptions", c.MountOptions) - populate(objectMap, "mountPath", c.MountPath) - populate(objectMap, "readOnly", c.ReadOnly) - objectMap["type"] = c.Type - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomPersistentDiskProperties. -func (c *CustomPersistentDiskProperties) 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 "mountOptions": - err = unpopulate(val, "MountOptions", &c.MountOptions) - delete(rawMsg, key) - case "mountPath": - err = unpopulate(val, "MountPath", &c.MountPath) - delete(rawMsg, key) - case "readOnly": - err = unpopulate(val, "ReadOnly", &c.ReadOnly) - 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 CustomPersistentDiskResource. -func (c CustomPersistentDiskResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "customPersistentDiskProperties", c.CustomPersistentDiskProperties) - populate(objectMap, "storageId", c.StorageID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomPersistentDiskResource. -func (c *CustomPersistentDiskResource) 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 "customPersistentDiskProperties": - c.CustomPersistentDiskProperties, err = unmarshalCustomPersistentDiskPropertiesClassification(val) - delete(rawMsg, key) - case "storageId": - err = unpopulate(val, "StorageID", &c.StorageID) - 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 CustomizedAcceleratorProperties. -func (c CustomizedAcceleratorProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "acceleratorTags", c.AcceleratorTags) - populate(objectMap, "description", c.Description) - populate(objectMap, "displayName", c.DisplayName) - populate(objectMap, "gitRepository", c.GitRepository) - populate(objectMap, "iconUrl", c.IconURL) - populate(objectMap, "provisioningState", c.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomizedAcceleratorProperties. -func (c *CustomizedAcceleratorProperties) 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 "acceleratorTags": - err = unpopulate(val, "AcceleratorTags", &c.AcceleratorTags) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &c.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &c.DisplayName) - delete(rawMsg, key) - case "gitRepository": - err = unpopulate(val, "GitRepository", &c.GitRepository) - delete(rawMsg, key) - case "iconUrl": - err = unpopulate(val, "IconURL", &c.IconURL) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - 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 CustomizedAcceleratorResource. -func (c CustomizedAcceleratorResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", c.ID) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "sku", c.SKU) - populate(objectMap, "systemData", c.SystemData) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomizedAcceleratorResource. -func (c *CustomizedAcceleratorResource) 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 "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &c.SKU) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &c.SystemData) - 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 CustomizedAcceleratorResourceCollection. -func (c CustomizedAcceleratorResourceCollection) 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 CustomizedAcceleratorResourceCollection. -func (c *CustomizedAcceleratorResourceCollection) 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) - 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 CustomizedAcceleratorValidateResult. -func (c CustomizedAcceleratorValidateResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "errorMessage", c.ErrorMessage) - populate(objectMap, "state", c.State) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomizedAcceleratorValidateResult. -func (c *CustomizedAcceleratorValidateResult) 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 "errorMessage": - err = unpopulate(val, "ErrorMessage", &c.ErrorMessage) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &c.State) - 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 DeploymentInstance. -func (d DeploymentInstance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "discoveryStatus", d.DiscoveryStatus) - populate(objectMap, "name", d.Name) - populate(objectMap, "reason", d.Reason) - populate(objectMap, "startTime", d.StartTime) - populate(objectMap, "status", d.Status) - populate(objectMap, "zone", d.Zone) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentInstance. -func (d *DeploymentInstance) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "discoveryStatus": - err = unpopulate(val, "DiscoveryStatus", &d.DiscoveryStatus) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "reason": - err = unpopulate(val, "Reason", &d.Reason) - delete(rawMsg, key) - case "startTime": - err = unpopulate(val, "StartTime", &d.StartTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &d.Status) - delete(rawMsg, key) - case "zone": - err = unpopulate(val, "Zone", &d.Zone) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeploymentList. -func (d DeploymentList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "deployments", d.Deployments) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentList. -func (d *DeploymentList) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "deployments": - err = unpopulate(val, "Deployments", &d.Deployments) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeploymentResource. -func (d DeploymentResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", d.ID) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "sku", d.SKU) - populate(objectMap, "systemData", d.SystemData) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentResource. -func (d *DeploymentResource) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &d.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &d.SKU) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &d.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeploymentResourceCollection. -func (d DeploymentResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", d.NextLink) - populate(objectMap, "value", d.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentResourceCollection. -func (d *DeploymentResourceCollection) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &d.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &d.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeploymentResourceProperties. -func (d DeploymentResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "active", d.Active) - populate(objectMap, "deploymentSettings", d.DeploymentSettings) - populate(objectMap, "instances", d.Instances) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "source", d.Source) - populate(objectMap, "status", d.Status) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentResourceProperties. -func (d *DeploymentResourceProperties) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "active": - err = unpopulate(val, "Active", &d.Active) - delete(rawMsg, key) - case "deploymentSettings": - err = unpopulate(val, "DeploymentSettings", &d.DeploymentSettings) - delete(rawMsg, key) - case "instances": - err = unpopulate(val, "Instances", &d.Instances) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) - delete(rawMsg, key) - case "source": - d.Source, err = unmarshalUserSourceInfoClassification(val) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &d.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeploymentSettings. -func (d DeploymentSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "addonConfigs", d.AddonConfigs) - populate(objectMap, "containerProbeSettings", d.ContainerProbeSettings) - populate(objectMap, "environmentVariables", d.EnvironmentVariables) - populate(objectMap, "livenessProbe", d.LivenessProbe) - populate(objectMap, "readinessProbe", d.ReadinessProbe) - populate(objectMap, "resourceRequests", d.ResourceRequests) - populate(objectMap, "startupProbe", d.StartupProbe) - populate(objectMap, "terminationGracePeriodSeconds", d.TerminationGracePeriodSeconds) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentSettings. -func (d *DeploymentSettings) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "addonConfigs": - err = unpopulate(val, "AddonConfigs", &d.AddonConfigs) - delete(rawMsg, key) - case "containerProbeSettings": - err = unpopulate(val, "ContainerProbeSettings", &d.ContainerProbeSettings) - delete(rawMsg, key) - case "environmentVariables": - err = unpopulate(val, "EnvironmentVariables", &d.EnvironmentVariables) - delete(rawMsg, key) - case "livenessProbe": - err = unpopulate(val, "LivenessProbe", &d.LivenessProbe) - delete(rawMsg, key) - case "readinessProbe": - err = unpopulate(val, "ReadinessProbe", &d.ReadinessProbe) - delete(rawMsg, key) - case "resourceRequests": - err = unpopulate(val, "ResourceRequests", &d.ResourceRequests) - delete(rawMsg, key) - case "startupProbe": - err = unpopulate(val, "StartupProbe", &d.StartupProbe) - delete(rawMsg, key) - case "terminationGracePeriodSeconds": - err = unpopulate(val, "TerminationGracePeriodSeconds", &d.TerminationGracePeriodSeconds) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DevToolPortalFeatureDetail. -func (d DevToolPortalFeatureDetail) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "route", d.Route) - populate(objectMap, "state", d.State) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DevToolPortalFeatureDetail. -func (d *DevToolPortalFeatureDetail) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "route": - err = unpopulate(val, "Route", &d.Route) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &d.State) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DevToolPortalFeatureSettings. -func (d DevToolPortalFeatureSettings) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CertificateResource. +func (c CertificateResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "applicationAccelerator", d.ApplicationAccelerator) - populate(objectMap, "applicationLiveView", d.ApplicationLiveView) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "type", c.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DevToolPortalFeatureSettings. -func (d *DevToolPortalFeatureSettings) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateResource. +func (c *CertificateResource) 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", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "applicationAccelerator": - err = unpopulate(val, "ApplicationAccelerator", &d.ApplicationAccelerator) + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + c.Properties, err = unmarshalCertificatePropertiesClassification(val) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) delete(rawMsg, key) - case "applicationLiveView": - err = unpopulate(val, "ApplicationLiveView", &d.ApplicationLiveView) + case "type": + err = unpopulate(val, "Type", &c.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DevToolPortalInstance. -func (d DevToolPortalInstance) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CertificateResourceCollection. +func (c CertificateResourceCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "name", d.Name) - populate(objectMap, "status", d.Status) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DevToolPortalInstance. -func (d *DevToolPortalInstance) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateResourceCollection. +func (c *CertificateResourceCollection) 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", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &d.Status) + case "value": + err = unpopulate(val, "Value", &c.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DevToolPortalProperties. -func (d DevToolPortalProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ClusterResourceProperties. +func (c ClusterResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "features", d.Features) - populate(objectMap, "instances", d.Instances) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "public", d.Public) - populate(objectMap, "resourceRequests", d.ResourceRequests) - populate(objectMap, "ssoProperties", d.SsoProperties) - populate(objectMap, "url", d.URL) + populate(objectMap, "fqdn", c.Fqdn) + populate(objectMap, "networkProfile", c.NetworkProfile) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "serviceId", c.ServiceID) + populate(objectMap, "version", c.Version) + populate(objectMap, "zoneRedundant", c.ZoneRedundant) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DevToolPortalProperties. -func (d *DevToolPortalProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterResourceProperties. +func (c *ClusterResourceProperties) 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", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "features": - err = unpopulate(val, "Features", &d.Features) + case "fqdn": + err = unpopulate(val, "Fqdn", &c.Fqdn) delete(rawMsg, key) - case "instances": - err = unpopulate(val, "Instances", &d.Instances) + case "networkProfile": + err = unpopulate(val, "NetworkProfile", &c.NetworkProfile) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) - delete(rawMsg, key) - case "public": - err = unpopulate(val, "Public", &d.Public) + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) delete(rawMsg, key) - case "resourceRequests": - err = unpopulate(val, "ResourceRequests", &d.ResourceRequests) + case "serviceId": + err = unpopulate(val, "ServiceID", &c.ServiceID) delete(rawMsg, key) - case "ssoProperties": - err = unpopulate(val, "SsoProperties", &d.SsoProperties) + case "version": + err = unpopulate(val, "Version", &c.Version) delete(rawMsg, key) - case "url": - err = unpopulate(val, "URL", &d.URL) + case "zoneRedundant": + err = unpopulate(val, "ZoneRedundant", &c.ZoneRedundant) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DevToolPortalResource. -func (d DevToolPortalResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConfigServerGitProperty. +func (c ConfigServerGitProperty) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", d.ID) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "systemData", d.SystemData) - populate(objectMap, "type", d.Type) + populate(objectMap, "hostKey", c.HostKey) + populate(objectMap, "hostKeyAlgorithm", c.HostKeyAlgorithm) + populate(objectMap, "label", c.Label) + populate(objectMap, "password", c.Password) + populate(objectMap, "privateKey", c.PrivateKey) + populate(objectMap, "repositories", c.Repositories) + populate(objectMap, "searchPaths", c.SearchPaths) + populate(objectMap, "strictHostKeyChecking", c.StrictHostKeyChecking) + populate(objectMap, "uri", c.URI) + populate(objectMap, "username", c.Username) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DevToolPortalResource. -func (d *DevToolPortalResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigServerGitProperty. +func (c *ConfigServerGitProperty) 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", d, err) + 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", &d.ID) + case "hostKey": + err = unpopulate(val, "HostKey", &c.HostKey) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) + case "hostKeyAlgorithm": + err = unpopulate(val, "HostKeyAlgorithm", &c.HostKeyAlgorithm) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &d.Properties) + case "label": + err = unpopulate(val, "Label", &c.Label) delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &d.SystemData) + case "password": + err = unpopulate(val, "Password", &c.Password) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) + case "privateKey": + err = unpopulate(val, "PrivateKey", &c.PrivateKey) + delete(rawMsg, key) + case "repositories": + err = unpopulate(val, "Repositories", &c.Repositories) + delete(rawMsg, key) + case "searchPaths": + err = unpopulate(val, "SearchPaths", &c.SearchPaths) + delete(rawMsg, key) + case "strictHostKeyChecking": + err = unpopulate(val, "StrictHostKeyChecking", &c.StrictHostKeyChecking) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &c.URI) + delete(rawMsg, key) + case "username": + err = unpopulate(val, "Username", &c.Username) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DevToolPortalResourceCollection. -func (d DevToolPortalResourceCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConfigServerProperties. +func (c ConfigServerProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", d.NextLink) - populate(objectMap, "value", d.Value) + populate(objectMap, "configServer", c.ConfigServer) + populate(objectMap, "error", c.Error) + populate(objectMap, "provisioningState", c.ProvisioningState) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DevToolPortalResourceCollection. -func (d *DevToolPortalResourceCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigServerProperties. +func (c *ConfigServerProperties) 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", d, err) + 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", &d.NextLink) + case "configServer": + err = unpopulate(val, "ConfigServer", &c.ConfigServer) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &d.Value) + case "error": + err = unpopulate(val, "Error", &c.Error) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DevToolPortalResourceRequests. -func (d DevToolPortalResourceRequests) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConfigServerResource. +func (c ConfigServerResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "cpu", d.CPU) - populate(objectMap, "instanceCount", d.InstanceCount) - populate(objectMap, "memory", d.Memory) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "type", c.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DevToolPortalResourceRequests. -func (d *DevToolPortalResourceRequests) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigServerResource. +func (c *ConfigServerResource) 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", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "cpu": - err = unpopulate(val, "CPU", &d.CPU) + case "id": + err = unpopulate(val, "ID", &c.ID) delete(rawMsg, key) - case "instanceCount": - err = unpopulate(val, "InstanceCount", &d.InstanceCount) + case "name": + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) - case "memory": - err = unpopulate(val, "Memory", &d.Memory) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DevToolPortalSsoProperties. -func (d DevToolPortalSsoProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConfigServerSettings. +func (c ConfigServerSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "clientId", d.ClientID) - populate(objectMap, "clientSecret", d.ClientSecret) - populate(objectMap, "metadataUrl", d.MetadataURL) - populate(objectMap, "scopes", d.Scopes) + populate(objectMap, "gitProperty", c.GitProperty) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DevToolPortalSsoProperties. -func (d *DevToolPortalSsoProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigServerSettings. +func (c *ConfigServerSettings) 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", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "clientId": - err = unpopulate(val, "ClientID", &d.ClientID) - delete(rawMsg, key) - case "clientSecret": - err = unpopulate(val, "ClientSecret", &d.ClientSecret) - delete(rawMsg, key) - case "metadataUrl": - err = unpopulate(val, "MetadataURL", &d.MetadataURL) - delete(rawMsg, key) - case "scopes": - err = unpopulate(val, "Scopes", &d.Scopes) + case "gitProperty": + err = unpopulate(val, "GitProperty", &c.GitProperty) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DiagnosticParameters. -func (d DiagnosticParameters) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConfigServerSettingsErrorRecord. +func (c ConfigServerSettingsErrorRecord) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "appInstance", d.AppInstance) - populate(objectMap, "duration", d.Duration) - populate(objectMap, "filePath", d.FilePath) + populate(objectMap, "messages", c.Messages) + populate(objectMap, "name", c.Name) + populate(objectMap, "uri", c.URI) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticParameters. -func (d *DiagnosticParameters) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigServerSettingsErrorRecord. +func (c *ConfigServerSettingsErrorRecord) 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", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "appInstance": - err = unpopulate(val, "AppInstance", &d.AppInstance) + case "messages": + err = unpopulate(val, "Messages", &c.Messages) delete(rawMsg, key) - case "duration": - err = unpopulate(val, "Duration", &d.Duration) + case "name": + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) - case "filePath": - err = unpopulate(val, "FilePath", &d.FilePath) + case "uri": + err = unpopulate(val, "URI", &c.URI) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type Error. -func (e Error) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConfigServerSettingsValidateResult. +func (c ConfigServerSettingsValidateResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "code", e.Code) - populate(objectMap, "message", e.Message) + populate(objectMap, "details", c.Details) + populate(objectMap, "isValid", c.IsValid) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Error. -func (e *Error) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigServerSettingsValidateResult. +func (c *ConfigServerSettingsValidateResult) 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) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "code": - err = unpopulate(val, "Code", &e.Code) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &e.Message) + case "details": + err = unpopulate(val, "Details", &c.Details) + delete(rawMsg, key) + case "isValid": + err = unpopulate(val, "IsValid", &c.IsValid) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ExecAction. -func (e ExecAction) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceGitProperty. +func (c ConfigurationServiceGitProperty) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "command", e.Command) - objectMap["type"] = ProbeActionTypeExecAction + populate(objectMap, "repositories", c.Repositories) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ExecAction. -func (e *ExecAction) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceGitProperty. +func (c *ConfigurationServiceGitProperty) 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) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "command": - err = unpopulate(val, "Command", &e.Command) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) + case "repositories": + err = unpopulate(val, "Repositories", &c.Repositories) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GatewayAPIMetadataProperties. -func (g GatewayAPIMetadataProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceGitPropertyValidateResult. +func (c ConfigurationServiceGitPropertyValidateResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "description", g.Description) - populate(objectMap, "documentation", g.Documentation) - populate(objectMap, "serverUrl", g.ServerURL) - populate(objectMap, "title", g.Title) - populate(objectMap, "version", g.Version) + populate(objectMap, "gitReposValidationResult", c.GitReposValidationResult) + populate(objectMap, "isValid", c.IsValid) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayAPIMetadataProperties. -func (g *GatewayAPIMetadataProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceGitPropertyValidateResult. +func (c *ConfigurationServiceGitPropertyValidateResult) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "description": - err = unpopulate(val, "Description", &g.Description) - delete(rawMsg, key) - case "documentation": - err = unpopulate(val, "Documentation", &g.Documentation) - delete(rawMsg, key) - case "serverUrl": - err = unpopulate(val, "ServerURL", &g.ServerURL) - delete(rawMsg, key) - case "title": - err = unpopulate(val, "Title", &g.Title) + case "gitReposValidationResult": + err = unpopulate(val, "GitReposValidationResult", &c.GitReposValidationResult) delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &g.Version) + case "isValid": + err = unpopulate(val, "IsValid", &c.IsValid) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GatewayAPIRoute. -func (g GatewayAPIRoute) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceGitRepository. +func (c ConfigurationServiceGitRepository) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "description", g.Description) - populate(objectMap, "filters", g.Filters) - populate(objectMap, "order", g.Order) - populate(objectMap, "predicates", g.Predicates) - populate(objectMap, "ssoEnabled", g.SsoEnabled) - populate(objectMap, "tags", g.Tags) - populate(objectMap, "title", g.Title) - populate(objectMap, "tokenRelay", g.TokenRelay) - populate(objectMap, "uri", g.URI) + populate(objectMap, "hostKey", c.HostKey) + populate(objectMap, "hostKeyAlgorithm", c.HostKeyAlgorithm) + populate(objectMap, "label", c.Label) + populate(objectMap, "name", c.Name) + populate(objectMap, "password", c.Password) + populate(objectMap, "patterns", c.Patterns) + populate(objectMap, "privateKey", c.PrivateKey) + populate(objectMap, "searchPaths", c.SearchPaths) + populate(objectMap, "strictHostKeyChecking", c.StrictHostKeyChecking) + populate(objectMap, "uri", c.URI) + populate(objectMap, "username", c.Username) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayAPIRoute. -func (g *GatewayAPIRoute) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceGitRepository. +func (c *ConfigurationServiceGitRepository) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "description": - err = unpopulate(val, "Description", &g.Description) + case "hostKey": + err = unpopulate(val, "HostKey", &c.HostKey) + delete(rawMsg, key) + case "hostKeyAlgorithm": + err = unpopulate(val, "HostKeyAlgorithm", &c.HostKeyAlgorithm) delete(rawMsg, key) - case "filters": - err = unpopulate(val, "Filters", &g.Filters) + case "label": + err = unpopulate(val, "Label", &c.Label) delete(rawMsg, key) - case "order": - err = unpopulate(val, "Order", &g.Order) + case "name": + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) - case "predicates": - err = unpopulate(val, "Predicates", &g.Predicates) + case "password": + err = unpopulate(val, "Password", &c.Password) delete(rawMsg, key) - case "ssoEnabled": - err = unpopulate(val, "SsoEnabled", &g.SsoEnabled) + case "patterns": + err = unpopulate(val, "Patterns", &c.Patterns) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &g.Tags) + case "privateKey": + err = unpopulate(val, "PrivateKey", &c.PrivateKey) delete(rawMsg, key) - case "title": - err = unpopulate(val, "Title", &g.Title) + case "searchPaths": + err = unpopulate(val, "SearchPaths", &c.SearchPaths) delete(rawMsg, key) - case "tokenRelay": - err = unpopulate(val, "TokenRelay", &g.TokenRelay) + case "strictHostKeyChecking": + err = unpopulate(val, "StrictHostKeyChecking", &c.StrictHostKeyChecking) delete(rawMsg, key) case "uri": - err = unpopulate(val, "URI", &g.URI) + err = unpopulate(val, "URI", &c.URI) + delete(rawMsg, key) + case "username": + err = unpopulate(val, "Username", &c.Username) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GatewayCorsProperties. -func (g GatewayCorsProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceInstance. +func (c ConfigurationServiceInstance) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "allowCredentials", g.AllowCredentials) - populate(objectMap, "allowedHeaders", g.AllowedHeaders) - populate(objectMap, "allowedMethods", g.AllowedMethods) - populate(objectMap, "allowedOrigins", g.AllowedOrigins) - populate(objectMap, "exposedHeaders", g.ExposedHeaders) - populate(objectMap, "maxAge", g.MaxAge) + populate(objectMap, "name", c.Name) + populate(objectMap, "status", c.Status) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayCorsProperties. -func (g *GatewayCorsProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceInstance. +func (c *ConfigurationServiceInstance) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "allowCredentials": - err = unpopulate(val, "AllowCredentials", &g.AllowCredentials) - delete(rawMsg, key) - case "allowedHeaders": - err = unpopulate(val, "AllowedHeaders", &g.AllowedHeaders) - delete(rawMsg, key) - case "allowedMethods": - err = unpopulate(val, "AllowedMethods", &g.AllowedMethods) - delete(rawMsg, key) - case "allowedOrigins": - err = unpopulate(val, "AllowedOrigins", &g.AllowedOrigins) - delete(rawMsg, key) - case "exposedHeaders": - err = unpopulate(val, "ExposedHeaders", &g.ExposedHeaders) + case "name": + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) - case "maxAge": - err = unpopulate(val, "MaxAge", &g.MaxAge) + case "status": + err = unpopulate(val, "Status", &c.Status) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GatewayCustomDomainProperties. -func (g GatewayCustomDomainProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceProperties. +func (c ConfigurationServiceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "thumbprint", g.Thumbprint) + populate(objectMap, "instances", c.Instances) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "resourceRequests", c.ResourceRequests) + populate(objectMap, "settings", c.Settings) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayCustomDomainProperties. -func (g *GatewayCustomDomainProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceProperties. +func (c *ConfigurationServiceProperties) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "thumbprint": - err = unpopulate(val, "Thumbprint", &g.Thumbprint) + case "instances": + err = unpopulate(val, "Instances", &c.Instances) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "resourceRequests": + err = unpopulate(val, "ResourceRequests", &c.ResourceRequests) + delete(rawMsg, key) + case "settings": + err = unpopulate(val, "Settings", &c.Settings) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GatewayCustomDomainResource. -func (g GatewayCustomDomainResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceResource. +func (c ConfigurationServiceResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", g.ID) - populate(objectMap, "name", g.Name) - populate(objectMap, "properties", g.Properties) - populate(objectMap, "systemData", g.SystemData) - populate(objectMap, "type", g.Type) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "type", c.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayCustomDomainResource. -func (g *GatewayCustomDomainResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceResource. +func (c *ConfigurationServiceResource) 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", g, err) + 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", &g.ID) + err = unpopulate(val, "ID", &c.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &g.Name) + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &g.Properties) + err = unpopulate(val, "Properties", &c.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &g.SystemData) + err = unpopulate(val, "SystemData", &c.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &g.Type) + err = unpopulate(val, "Type", &c.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GatewayCustomDomainResourceCollection. -func (g GatewayCustomDomainResourceCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceResourceCollection. +func (c ConfigurationServiceResourceCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", g.NextLink) - populate(objectMap, "value", g.Value) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayCustomDomainResourceCollection. -func (g *GatewayCustomDomainResourceCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceResourceCollection. +func (c *ConfigurationServiceResourceCollection) 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", g, err) + 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", &g.NextLink) + err = unpopulate(val, "NextLink", &c.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &g.Value) + err = unpopulate(val, "Value", &c.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GatewayInstance. -func (g GatewayInstance) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceResourceRequests. +func (c ConfigurationServiceResourceRequests) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "name", g.Name) - populate(objectMap, "status", g.Status) + populate(objectMap, "cpu", c.CPU) + populate(objectMap, "instanceCount", c.InstanceCount) + populate(objectMap, "memory", c.Memory) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayInstance. -func (g *GatewayInstance) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceResourceRequests. +func (c *ConfigurationServiceResourceRequests) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "name": - err = unpopulate(val, "Name", &g.Name) + case "cpu": + err = unpopulate(val, "CPU", &c.CPU) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &g.Status) + case "instanceCount": + err = unpopulate(val, "InstanceCount", &c.InstanceCount) + delete(rawMsg, key) + case "memory": + err = unpopulate(val, "Memory", &c.Memory) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GatewayOperatorProperties. -func (g GatewayOperatorProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceSettings. +func (c ConfigurationServiceSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "instances", g.Instances) - populate(objectMap, "resourceRequests", g.ResourceRequests) + populate(objectMap, "gitProperty", c.GitProperty) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayOperatorProperties. -func (g *GatewayOperatorProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceSettings. +func (c *ConfigurationServiceSettings) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "instances": - err = unpopulate(val, "Instances", &g.Instances) - delete(rawMsg, key) - case "resourceRequests": - err = unpopulate(val, "ResourceRequests", &g.ResourceRequests) + case "gitProperty": + err = unpopulate(val, "GitProperty", &c.GitProperty) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GatewayOperatorResourceRequests. -func (g GatewayOperatorResourceRequests) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceSettingsValidateResult. +func (c ConfigurationServiceSettingsValidateResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "cpu", g.CPU) - populate(objectMap, "instanceCount", g.InstanceCount) - populate(objectMap, "memory", g.Memory) + populate(objectMap, "gitPropertyValidationResult", c.GitPropertyValidationResult) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayOperatorResourceRequests. -func (g *GatewayOperatorResourceRequests) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceSettingsValidateResult. +func (c *ConfigurationServiceSettingsValidateResult) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "cpu": - err = unpopulate(val, "CPU", &g.CPU) - delete(rawMsg, key) - case "instanceCount": - err = unpopulate(val, "InstanceCount", &g.InstanceCount) - delete(rawMsg, key) - case "memory": - err = unpopulate(val, "Memory", &g.Memory) + case "gitPropertyValidationResult": + err = unpopulate(val, "GitPropertyValidationResult", &c.GitPropertyValidationResult) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GatewayProperties. -func (g GatewayProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContentCertificateProperties. +func (c ContentCertificateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "apiMetadataProperties", g.APIMetadataProperties) - populate(objectMap, "apmTypes", g.ApmTypes) - populate(objectMap, "corsProperties", g.CorsProperties) - populate(objectMap, "environmentVariables", g.EnvironmentVariables) - populate(objectMap, "httpsOnly", g.HTTPSOnly) - populate(objectMap, "instances", g.Instances) - populate(objectMap, "operatorProperties", g.OperatorProperties) - populate(objectMap, "provisioningState", g.ProvisioningState) - populate(objectMap, "public", g.Public) - populate(objectMap, "resourceRequests", g.ResourceRequests) - populate(objectMap, "ssoProperties", g.SsoProperties) - populate(objectMap, "url", g.URL) + populate(objectMap, "activateDate", c.ActivateDate) + populate(objectMap, "content", c.Content) + populate(objectMap, "dnsNames", c.DNSNames) + populate(objectMap, "expirationDate", c.ExpirationDate) + populate(objectMap, "issuedDate", c.IssuedDate) + populate(objectMap, "issuer", c.Issuer) + populate(objectMap, "subjectName", c.SubjectName) + populate(objectMap, "thumbprint", c.Thumbprint) + objectMap["type"] = "ContentCertificate" return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayProperties. -func (g *GatewayProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContentCertificateProperties. +func (c *ContentCertificateProperties) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "apiMetadataProperties": - err = unpopulate(val, "APIMetadataProperties", &g.APIMetadataProperties) - delete(rawMsg, key) - case "apmTypes": - err = unpopulate(val, "ApmTypes", &g.ApmTypes) - delete(rawMsg, key) - case "corsProperties": - err = unpopulate(val, "CorsProperties", &g.CorsProperties) - delete(rawMsg, key) - case "environmentVariables": - err = unpopulate(val, "EnvironmentVariables", &g.EnvironmentVariables) + case "activateDate": + err = unpopulate(val, "ActivateDate", &c.ActivateDate) delete(rawMsg, key) - case "httpsOnly": - err = unpopulate(val, "HTTPSOnly", &g.HTTPSOnly) + case "content": + err = unpopulate(val, "Content", &c.Content) delete(rawMsg, key) - case "instances": - err = unpopulate(val, "Instances", &g.Instances) + case "dnsNames": + err = unpopulate(val, "DNSNames", &c.DNSNames) delete(rawMsg, key) - case "operatorProperties": - err = unpopulate(val, "OperatorProperties", &g.OperatorProperties) + case "expirationDate": + err = unpopulate(val, "ExpirationDate", &c.ExpirationDate) delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &g.ProvisioningState) + case "issuedDate": + err = unpopulate(val, "IssuedDate", &c.IssuedDate) delete(rawMsg, key) - case "public": - err = unpopulate(val, "Public", &g.Public) + case "issuer": + err = unpopulate(val, "Issuer", &c.Issuer) delete(rawMsg, key) - case "resourceRequests": - err = unpopulate(val, "ResourceRequests", &g.ResourceRequests) + case "subjectName": + err = unpopulate(val, "SubjectName", &c.SubjectName) delete(rawMsg, key) - case "ssoProperties": - err = unpopulate(val, "SsoProperties", &g.SsoProperties) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &c.Thumbprint) delete(rawMsg, key) - case "url": - err = unpopulate(val, "URL", &g.URL) + case "type": + err = unpopulate(val, "Type", &c.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GatewayPropertiesEnvironmentVariables. -func (g GatewayPropertiesEnvironmentVariables) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CustomDomainProperties. +func (c CustomDomainProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "properties", g.Properties) - populate(objectMap, "secrets", g.Secrets) + populate(objectMap, "appName", c.AppName) + populate(objectMap, "certName", c.CertName) + populate(objectMap, "thumbprint", c.Thumbprint) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayPropertiesEnvironmentVariables. -func (g *GatewayPropertiesEnvironmentVariables) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainProperties. +func (c *CustomDomainProperties) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "properties": - err = unpopulate(val, "Properties", &g.Properties) + case "appName": + err = unpopulate(val, "AppName", &c.AppName) delete(rawMsg, key) - case "secrets": - err = unpopulate(val, "Secrets", &g.Secrets) + case "certName": + err = unpopulate(val, "CertName", &c.CertName) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &c.Thumbprint) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GatewayResource. -func (g GatewayResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CustomDomainResource. +func (c CustomDomainResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", g.ID) - populate(objectMap, "name", g.Name) - populate(objectMap, "properties", g.Properties) - populate(objectMap, "sku", g.SKU) - populate(objectMap, "systemData", g.SystemData) - populate(objectMap, "type", g.Type) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "type", c.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayResource. -func (g *GatewayResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainResource. +func (c *CustomDomainResource) 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", g, err) + 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", &g.ID) + err = unpopulate(val, "ID", &c.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &g.Name) + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &g.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &g.SKU) + err = unpopulate(val, "Properties", &c.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &g.SystemData) + err = unpopulate(val, "SystemData", &c.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &g.Type) + err = unpopulate(val, "Type", &c.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GatewayResourceCollection. -func (g GatewayResourceCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CustomDomainResourceCollection. +func (c CustomDomainResourceCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", g.NextLink) - populate(objectMap, "value", g.Value) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayResourceCollection. -func (g *GatewayResourceCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainResourceCollection. +func (c *CustomDomainResourceCollection) 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", g, err) + 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", &g.NextLink) + err = unpopulate(val, "NextLink", &c.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &g.Value) + err = unpopulate(val, "Value", &c.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GatewayResourceRequests. -func (g GatewayResourceRequests) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CustomDomainValidatePayload. +func (c CustomDomainValidatePayload) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "cpu", g.CPU) - populate(objectMap, "memory", g.Memory) + populate(objectMap, "name", c.Name) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayResourceRequests. -func (g *GatewayResourceRequests) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainValidatePayload. +func (c *CustomDomainValidatePayload) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "cpu": - err = unpopulate(val, "CPU", &g.CPU) - delete(rawMsg, key) - case "memory": - err = unpopulate(val, "Memory", &g.Memory) + case "name": + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GatewayRouteConfigOpenAPIProperties. -func (g GatewayRouteConfigOpenAPIProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CustomDomainValidateResult. +func (c CustomDomainValidateResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "uri", g.URI) + populate(objectMap, "isValid", c.IsValid) + populate(objectMap, "message", c.Message) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayRouteConfigOpenAPIProperties. -func (g *GatewayRouteConfigOpenAPIProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainValidateResult. +func (c *CustomDomainValidateResult) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "uri": - err = unpopulate(val, "URI", &g.URI) + case "isValid": + err = unpopulate(val, "IsValid", &c.IsValid) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &c.Message) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GatewayRouteConfigProperties. -func (g GatewayRouteConfigProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DeploymentInstance. +func (d DeploymentInstance) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "appResourceId", g.AppResourceID) - populate(objectMap, "filters", g.Filters) - populate(objectMap, "openApi", g.OpenAPI) - populate(objectMap, "predicates", g.Predicates) - populate(objectMap, "protocol", g.Protocol) - populate(objectMap, "provisioningState", g.ProvisioningState) - populate(objectMap, "routes", g.Routes) - populate(objectMap, "ssoEnabled", g.SsoEnabled) + populate(objectMap, "discoveryStatus", d.DiscoveryStatus) + populate(objectMap, "name", d.Name) + populate(objectMap, "reason", d.Reason) + populate(objectMap, "startTime", d.StartTime) + populate(objectMap, "status", d.Status) + populate(objectMap, "zone", d.Zone) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayRouteConfigProperties. -func (g *GatewayRouteConfigProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentInstance. +func (d *DeploymentInstance) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "appResourceId": - err = unpopulate(val, "AppResourceID", &g.AppResourceID) - delete(rawMsg, key) - case "filters": - err = unpopulate(val, "Filters", &g.Filters) - delete(rawMsg, key) - case "openApi": - err = unpopulate(val, "OpenAPI", &g.OpenAPI) + case "discoveryStatus": + err = unpopulate(val, "DiscoveryStatus", &d.DiscoveryStatus) delete(rawMsg, key) - case "predicates": - err = unpopulate(val, "Predicates", &g.Predicates) + case "name": + err = unpopulate(val, "Name", &d.Name) delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &g.Protocol) + case "reason": + err = unpopulate(val, "Reason", &d.Reason) delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &g.ProvisioningState) + case "startTime": + err = unpopulate(val, "StartTime", &d.StartTime) delete(rawMsg, key) - case "routes": - err = unpopulate(val, "Routes", &g.Routes) + case "status": + err = unpopulate(val, "Status", &d.Status) delete(rawMsg, key) - case "ssoEnabled": - err = unpopulate(val, "SsoEnabled", &g.SsoEnabled) + case "zone": + err = unpopulate(val, "Zone", &d.Zone) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GatewayRouteConfigResource. -func (g GatewayRouteConfigResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DeploymentResource. +func (d DeploymentResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", g.ID) - populate(objectMap, "name", g.Name) - populate(objectMap, "properties", g.Properties) - populate(objectMap, "systemData", g.SystemData) - populate(objectMap, "type", g.Type) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "sku", d.SKU) + populate(objectMap, "systemData", d.SystemData) + populate(objectMap, "type", d.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayRouteConfigResource. -func (g *GatewayRouteConfigResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentResource. +func (d *DeploymentResource) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { case "id": - err = unpopulate(val, "ID", &g.ID) + err = unpopulate(val, "ID", &d.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &g.Name) + err = unpopulate(val, "Name", &d.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &g.Properties) + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &d.SKU) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &g.SystemData) + err = unpopulate(val, "SystemData", &d.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &g.Type) + err = unpopulate(val, "Type", &d.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GatewayRouteConfigResourceCollection. -func (g GatewayRouteConfigResourceCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DeploymentResourceCollection. +func (d DeploymentResourceCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", g.NextLink) - populate(objectMap, "value", g.Value) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayRouteConfigResourceCollection. -func (g *GatewayRouteConfigResourceCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentResourceCollection. +func (d *DeploymentResourceCollection) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &g.NextLink) + err = unpopulate(val, "NextLink", &d.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &g.Value) + err = unpopulate(val, "Value", &d.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GitPatternRepository. -func (g GitPatternRepository) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DeploymentResourceProperties. +func (d DeploymentResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "hostKey", g.HostKey) - populate(objectMap, "hostKeyAlgorithm", g.HostKeyAlgorithm) - populate(objectMap, "label", g.Label) - populate(objectMap, "name", g.Name) - populate(objectMap, "password", g.Password) - populate(objectMap, "pattern", g.Pattern) - populate(objectMap, "privateKey", g.PrivateKey) - populate(objectMap, "searchPaths", g.SearchPaths) - populate(objectMap, "strictHostKeyChecking", g.StrictHostKeyChecking) - populate(objectMap, "uri", g.URI) - populate(objectMap, "username", g.Username) + populate(objectMap, "active", d.Active) + populate(objectMap, "deploymentSettings", d.DeploymentSettings) + populate(objectMap, "instances", d.Instances) + populate(objectMap, "provisioningState", d.ProvisioningState) + populate(objectMap, "source", d.Source) + populate(objectMap, "status", d.Status) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GitPatternRepository. -func (g *GitPatternRepository) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentResourceProperties. +func (d *DeploymentResourceProperties) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "hostKey": - err = unpopulate(val, "HostKey", &g.HostKey) - delete(rawMsg, key) - case "hostKeyAlgorithm": - err = unpopulate(val, "HostKeyAlgorithm", &g.HostKeyAlgorithm) - delete(rawMsg, key) - case "label": - err = unpopulate(val, "Label", &g.Label) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &g.Name) - delete(rawMsg, key) - case "password": - err = unpopulate(val, "Password", &g.Password) - delete(rawMsg, key) - case "pattern": - err = unpopulate(val, "Pattern", &g.Pattern) + case "active": + err = unpopulate(val, "Active", &d.Active) delete(rawMsg, key) - case "privateKey": - err = unpopulate(val, "PrivateKey", &g.PrivateKey) + case "deploymentSettings": + err = unpopulate(val, "DeploymentSettings", &d.DeploymentSettings) delete(rawMsg, key) - case "searchPaths": - err = unpopulate(val, "SearchPaths", &g.SearchPaths) + case "instances": + err = unpopulate(val, "Instances", &d.Instances) delete(rawMsg, key) - case "strictHostKeyChecking": - err = unpopulate(val, "StrictHostKeyChecking", &g.StrictHostKeyChecking) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) delete(rawMsg, key) - case "uri": - err = unpopulate(val, "URI", &g.URI) + case "source": + d.Source, err = unmarshalUserSourceInfoClassification(val) delete(rawMsg, key) - case "username": - err = unpopulate(val, "Username", &g.Username) + case "status": + err = unpopulate(val, "Status", &d.Status) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type HTTPGetAction. -func (h HTTPGetAction) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DeploymentSettings. +func (d DeploymentSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "path", h.Path) - populate(objectMap, "scheme", h.Scheme) - objectMap["type"] = ProbeActionTypeHTTPGetAction + populate(objectMap, "addonConfigs", d.AddonConfigs) + populate(objectMap, "environmentVariables", d.EnvironmentVariables) + populate(objectMap, "resourceRequests", d.ResourceRequests) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPGetAction. -func (h *HTTPGetAction) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentSettings. +func (d *DeploymentSettings) 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", h, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "path": - err = unpopulate(val, "Path", &h.Path) - delete(rawMsg, key) - case "scheme": - err = unpopulate(val, "Scheme", &h.Scheme) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &h.Type) + case "addonConfigs": + err = unpopulate(val, "AddonConfigs", &d.AddonConfigs) delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ImageRegistryCredential. -func (i ImageRegistryCredential) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "password", i.Password) - populate(objectMap, "username", i.Username) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ImageRegistryCredential. -func (i *ImageRegistryCredential) 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", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "password": - err = unpopulate(val, "Password", &i.Password) + case "environmentVariables": + err = unpopulate(val, "EnvironmentVariables", &d.EnvironmentVariables) delete(rawMsg, key) - case "username": - err = unpopulate(val, "Username", &i.Username) + case "resourceRequests": + err = unpopulate(val, "ResourceRequests", &d.ResourceRequests) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type IngressConfig. -func (i IngressConfig) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DiagnosticParameters. +func (d DiagnosticParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "readTimeoutInSeconds", i.ReadTimeoutInSeconds) + populate(objectMap, "appInstance", d.AppInstance) + populate(objectMap, "duration", d.Duration) + populate(objectMap, "filePath", d.FilePath) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type IngressConfig. -func (i *IngressConfig) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticParameters. +func (d *DiagnosticParameters) 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", i, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "readTimeoutInSeconds": - err = unpopulate(val, "ReadTimeoutInSeconds", &i.ReadTimeoutInSeconds) + case "appInstance": + err = unpopulate(val, "AppInstance", &d.AppInstance) + delete(rawMsg, key) + case "duration": + err = unpopulate(val, "Duration", &d.Duration) + delete(rawMsg, key) + case "filePath": + err = unpopulate(val, "FilePath", &d.FilePath) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type IngressSettings. -func (i IngressSettings) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Error. +func (e Error) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "backendProtocol", i.BackendProtocol) - populate(objectMap, "clientAuth", i.ClientAuth) - populate(objectMap, "readTimeoutInSeconds", i.ReadTimeoutInSeconds) - populate(objectMap, "sendTimeoutInSeconds", i.SendTimeoutInSeconds) - populate(objectMap, "sessionAffinity", i.SessionAffinity) - populate(objectMap, "sessionCookieMaxAge", i.SessionCookieMaxAge) + populate(objectMap, "code", e.Code) + populate(objectMap, "message", e.Message) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type IngressSettings. -func (i *IngressSettings) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Error. +func (e *Error) 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", i, err) + return fmt.Errorf("unmarshalling type %T: %v", e, err) } for key, val := range rawMsg { var err error switch key { - case "backendProtocol": - err = unpopulate(val, "BackendProtocol", &i.BackendProtocol) - delete(rawMsg, key) - case "clientAuth": - err = unpopulate(val, "ClientAuth", &i.ClientAuth) - delete(rawMsg, key) - case "readTimeoutInSeconds": - err = unpopulate(val, "ReadTimeoutInSeconds", &i.ReadTimeoutInSeconds) - delete(rawMsg, key) - case "sendTimeoutInSeconds": - err = unpopulate(val, "SendTimeoutInSeconds", &i.SendTimeoutInSeconds) - delete(rawMsg, key) - case "sessionAffinity": - err = unpopulate(val, "SessionAffinity", &i.SessionAffinity) + case "code": + err = unpopulate(val, "Code", &e.Code) delete(rawMsg, key) - case "sessionCookieMaxAge": - err = unpopulate(val, "SessionCookieMaxAge", &i.SessionCookieMaxAge) + case "message": + err = unpopulate(val, "Message", &e.Message) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", e, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type IngressSettingsClientAuth. -func (i IngressSettingsClientAuth) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GitPatternRepository. +func (g GitPatternRepository) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "certificates", i.Certificates) + populate(objectMap, "hostKey", g.HostKey) + populate(objectMap, "hostKeyAlgorithm", g.HostKeyAlgorithm) + populate(objectMap, "label", g.Label) + populate(objectMap, "name", g.Name) + populate(objectMap, "password", g.Password) + populate(objectMap, "pattern", g.Pattern) + populate(objectMap, "privateKey", g.PrivateKey) + populate(objectMap, "searchPaths", g.SearchPaths) + populate(objectMap, "strictHostKeyChecking", g.StrictHostKeyChecking) + populate(objectMap, "uri", g.URI) + populate(objectMap, "username", g.Username) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type IngressSettingsClientAuth. -func (i *IngressSettingsClientAuth) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GitPatternRepository. +func (g *GitPatternRepository) 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", i, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } for key, val := range rawMsg { var err error switch key { - case "certificates": - err = unpopulate(val, "Certificates", &i.Certificates) + case "hostKey": + err = unpopulate(val, "HostKey", &g.HostKey) + delete(rawMsg, key) + case "hostKeyAlgorithm": + err = unpopulate(val, "HostKeyAlgorithm", &g.HostKeyAlgorithm) + delete(rawMsg, key) + case "label": + err = unpopulate(val, "Label", &g.Label) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + case "password": + err = unpopulate(val, "Password", &g.Password) + delete(rawMsg, key) + case "pattern": + err = unpopulate(val, "Pattern", &g.Pattern) + delete(rawMsg, key) + case "privateKey": + err = unpopulate(val, "PrivateKey", &g.PrivateKey) + delete(rawMsg, key) + case "searchPaths": + err = unpopulate(val, "SearchPaths", &g.SearchPaths) + delete(rawMsg, key) + case "strictHostKeyChecking": + err = unpopulate(val, "StrictHostKeyChecking", &g.StrictHostKeyChecking) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &g.URI) + delete(rawMsg, key) + case "username": + err = unpopulate(val, "Username", &g.Username) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } } return nil @@ -5338,7 +2704,6 @@ func (k KeyVaultCertificateProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "issuedDate", k.IssuedDate) populate(objectMap, "issuer", k.Issuer) populate(objectMap, "keyVaultCertName", k.KeyVaultCertName) - populate(objectMap, "provisioningState", k.ProvisioningState) populate(objectMap, "subjectName", k.SubjectName) populate(objectMap, "thumbprint", k.Thumbprint) objectMap["type"] = "KeyVaultCertificate" @@ -5379,9 +2744,6 @@ func (k *KeyVaultCertificateProperties) UnmarshalJSON(data []byte) error { case "keyVaultCertName": err = unpopulate(val, "KeyVaultCertName", &k.KeyVaultCertName) delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &k.ProvisioningState) - delete(rawMsg, key) case "subjectName": err = unpopulate(val, "SubjectName", &k.SubjectName) delete(rawMsg, key) @@ -5501,7 +2863,6 @@ func (m ManagedIdentityProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "principalId", m.PrincipalID) populate(objectMap, "tenantId", m.TenantID) populate(objectMap, "type", m.Type) - populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) return json.Marshal(objectMap) } @@ -5523,44 +2884,6 @@ func (m *ManagedIdentityProperties) UnmarshalJSON(data []byte) error { case "type": err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) - case "userAssignedIdentities": - err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) - 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 MarketplaceResource. -func (m MarketplaceResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "plan", m.Plan) - populate(objectMap, "product", m.Product) - populate(objectMap, "publisher", m.Publisher) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MarketplaceResource. -func (m *MarketplaceResource) 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 "plan": - err = unpopulate(val, "Plan", &m.Plan) - delete(rawMsg, key) - case "product": - err = unpopulate(val, "Product", &m.Product) - delete(rawMsg, key) - case "publisher": - err = unpopulate(val, "Publisher", &m.Publisher) - delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -5875,9 +3198,7 @@ func (n NetworkProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "appNetworkResourceGroup", n.AppNetworkResourceGroup) populate(objectMap, "appSubnetId", n.AppSubnetID) - populate(objectMap, "ingressConfig", n.IngressConfig) populate(objectMap, "outboundIPs", n.OutboundIPs) - populate(objectMap, "outboundType", n.OutboundType) populate(objectMap, "requiredTraffics", n.RequiredTraffics) populate(objectMap, "serviceCidr", n.ServiceCidr) populate(objectMap, "serviceRuntimeNetworkResourceGroup", n.ServiceRuntimeNetworkResourceGroup) @@ -5900,15 +3221,9 @@ func (n *NetworkProfile) UnmarshalJSON(data []byte) error { case "appSubnetId": err = unpopulate(val, "AppSubnetID", &n.AppSubnetID) delete(rawMsg, key) - case "ingressConfig": - err = unpopulate(val, "IngressConfig", &n.IngressConfig) - delete(rawMsg, key) case "outboundIPs": err = unpopulate(val, "OutboundIPs", &n.OutboundIPs) delete(rawMsg, key) - case "outboundType": - err = unpopulate(val, "OutboundType", &n.OutboundType) - delete(rawMsg, key) case "requiredTraffics": err = unpopulate(val, "RequiredTraffics", &n.RequiredTraffics) delete(rawMsg, key) @@ -6073,222 +3388,13 @@ func (o *OperationProperties) UnmarshalJSON(data []byte) error { func (p PersistentDisk) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "mountPath", p.MountPath) - populate(objectMap, "sizeInGB", p.SizeInGB) - populate(objectMap, "usedInGB", p.UsedInGB) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PersistentDisk. -func (p *PersistentDisk) 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", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "mountPath": - err = unpopulate(val, "MountPath", &p.MountPath) - delete(rawMsg, key) - case "sizeInGB": - err = unpopulate(val, "SizeInGB", &p.SizeInGB) - delete(rawMsg, key) - case "usedInGB": - err = unpopulate(val, "UsedInGB", &p.UsedInGB) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PredefinedAcceleratorProperties. -func (p PredefinedAcceleratorProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "acceleratorTags", p.AcceleratorTags) - populate(objectMap, "description", p.Description) - populate(objectMap, "displayName", p.DisplayName) - populate(objectMap, "iconUrl", p.IconURL) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "state", p.State) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PredefinedAcceleratorProperties. -func (p *PredefinedAcceleratorProperties) 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", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "acceleratorTags": - err = unpopulate(val, "AcceleratorTags", &p.AcceleratorTags) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &p.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &p.DisplayName) - delete(rawMsg, key) - case "iconUrl": - err = unpopulate(val, "IconURL", &p.IconURL) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &p.State) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PredefinedAcceleratorResource. -func (p PredefinedAcceleratorResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "sku", p.SKU) - populate(objectMap, "systemData", p.SystemData) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PredefinedAcceleratorResource. -func (p *PredefinedAcceleratorResource) 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", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &p.SKU) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &p.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PredefinedAcceleratorResourceCollection. -func (p PredefinedAcceleratorResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PredefinedAcceleratorResourceCollection. -func (p *PredefinedAcceleratorResourceCollection) 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", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &p.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Probe. -func (p Probe) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "disableProbe", p.DisableProbe) - populate(objectMap, "failureThreshold", p.FailureThreshold) - populate(objectMap, "initialDelaySeconds", p.InitialDelaySeconds) - populate(objectMap, "periodSeconds", p.PeriodSeconds) - populate(objectMap, "probeAction", p.ProbeAction) - populate(objectMap, "successThreshold", p.SuccessThreshold) - populate(objectMap, "timeoutSeconds", p.TimeoutSeconds) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Probe. -func (p *Probe) 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", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "disableProbe": - err = unpopulate(val, "DisableProbe", &p.DisableProbe) - delete(rawMsg, key) - case "failureThreshold": - err = unpopulate(val, "FailureThreshold", &p.FailureThreshold) - delete(rawMsg, key) - case "initialDelaySeconds": - err = unpopulate(val, "InitialDelaySeconds", &p.InitialDelaySeconds) - delete(rawMsg, key) - case "periodSeconds": - err = unpopulate(val, "PeriodSeconds", &p.PeriodSeconds) - delete(rawMsg, key) - case "probeAction": - p.ProbeAction, err = unmarshalProbeActionClassification(val) - delete(rawMsg, key) - case "successThreshold": - err = unpopulate(val, "SuccessThreshold", &p.SuccessThreshold) - delete(rawMsg, key) - case "timeoutSeconds": - err = unpopulate(val, "TimeoutSeconds", &p.TimeoutSeconds) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProbeAction. -func (p ProbeAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["type"] = p.Type + populate(objectMap, "sizeInGB", p.SizeInGB) + populate(objectMap, "usedInGB", p.UsedInGB) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ProbeAction. -func (p *ProbeAction) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PersistentDisk. +func (p *PersistentDisk) 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", p, err) @@ -6296,8 +3402,14 @@ func (p *ProbeAction) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "type": - err = unpopulate(val, "Type", &p.Type) + case "mountPath": + err = unpopulate(val, "MountPath", &p.MountPath) + delete(rawMsg, key) + case "sizeInGB": + err = unpopulate(val, "SizeInGB", &p.SizeInGB) + delete(rawMsg, key) + case "usedInGB": + err = unpopulate(val, "UsedInGB", &p.UsedInGB) delete(rawMsg, key) } if err != nil { @@ -6373,64 +3485,6 @@ func (r *RegenerateTestKeyRequestPayload) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type RemoteDebugging. -func (r RemoteDebugging) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", r.Enabled) - populate(objectMap, "port", r.Port) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RemoteDebugging. -func (r *RemoteDebugging) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &r.Enabled) - delete(rawMsg, key) - case "port": - err = unpopulate(val, "Port", &r.Port) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RemoteDebuggingPayload. -func (r RemoteDebuggingPayload) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "port", r.Port) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RemoteDebuggingPayload. -func (r *RemoteDebuggingPayload) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "port": - err = unpopulate(val, "Port", &r.Port) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type RequiredTraffic. func (r RequiredTraffic) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -7190,33 +4244,6 @@ func (s *ServiceSpecification) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ServiceVNetAddons. -func (s ServiceVNetAddons) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "logStreamPublicEndpoint", s.LogStreamPublicEndpoint) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceVNetAddons. -func (s *ServiceVNetAddons) 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", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "logStreamPublicEndpoint": - err = unpopulate(val, "LogStreamPublicEndpoint", &s.LogStreamPublicEndpoint) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type SourceUploadedUserSourceInfo. func (s SourceUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -7260,45 +4287,6 @@ func (s *SourceUploadedUserSourceInfo) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type SsoProperties. -func (s SsoProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "clientId", s.ClientID) - populate(objectMap, "clientSecret", s.ClientSecret) - populate(objectMap, "issuerUri", s.IssuerURI) - populate(objectMap, "scope", s.Scope) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SsoProperties. -func (s *SsoProperties) 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", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "clientId": - err = unpopulate(val, "ClientID", &s.ClientID) - delete(rawMsg, key) - case "clientSecret": - err = unpopulate(val, "ClientSecret", &s.ClientSecret) - delete(rawMsg, key) - case "issuerUri": - err = unpopulate(val, "IssuerURI", &s.IssuerURI) - delete(rawMsg, key) - case "scope": - err = unpopulate(val, "Scope", &s.Scope) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type StackProperties. func (s StackProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -7330,142 +4318,6 @@ func (s *StackProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type StorageAccount. -func (s StorageAccount) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "accountKey", s.AccountKey) - populate(objectMap, "accountName", s.AccountName) - objectMap["storageType"] = StorageTypeStorageAccount - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StorageAccount. -func (s *StorageAccount) 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", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "accountKey": - err = unpopulate(val, "AccountKey", &s.AccountKey) - delete(rawMsg, key) - case "accountName": - err = unpopulate(val, "AccountName", &s.AccountName) - delete(rawMsg, key) - case "storageType": - err = unpopulate(val, "StorageType", &s.StorageType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StorageProperties. -func (s StorageProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["storageType"] = s.StorageType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StorageProperties. -func (s *StorageProperties) 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", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "storageType": - err = unpopulate(val, "StorageType", &s.StorageType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StorageResource. -func (s StorageResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", s.ID) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "systemData", s.SystemData) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StorageResource. -func (s *StorageResource) 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", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - s.Properties, err = unmarshalStoragePropertiesClassification(val) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &s.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StorageResourceCollection. -func (s StorageResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StorageResourceCollection. -func (s *StorageResourceCollection) 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", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type SupportedBuildpackResource. func (s SupportedBuildpackResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -7754,33 +4606,6 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type TCPSocketAction. -func (t TCPSocketAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["type"] = ProbeActionTypeTCPSocketAction - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TCPSocketAction. -func (t *TCPSocketAction) 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", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "type": - err = unpopulate(val, "Type", &t.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type TemporaryDisk. func (t TemporaryDisk) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -7964,37 +4789,6 @@ func (u *UploadedUserSourceInfo) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type UserAssignedManagedIdentity. -func (u UserAssignedManagedIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "clientId", u.ClientID) - populate(objectMap, "principalId", u.PrincipalID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedManagedIdentity. -func (u *UserAssignedManagedIdentity) 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", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "clientId": - err = unpopulate(val, "ClientID", &u.ClientID) - delete(rawMsg, key) - case "principalId": - err = unpopulate(val, "PrincipalID", &u.PrincipalID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type UserSourceInfo. func (u UserSourceInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) diff --git a/sdk/resourcemanager/appplatform/armappplatform/monitoringsettings_client.go b/sdk/resourcemanager/appplatform/armappplatform/monitoringsettings_client.go index f896be4d3870..4a715d4157a2 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/monitoringsettings_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/monitoringsettings_client.go @@ -48,7 +48,7 @@ func NewMonitoringSettingsClient(subscriptionID string, credential azcore.TokenC // Get - Get the Monitoring Setting and its properties. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -88,7 +88,7 @@ func (client *MonitoringSettingsClient) getCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -106,7 +106,7 @@ func (client *MonitoringSettingsClient) getHandleResponse(resp *http.Response) ( // BeginUpdatePatch - Update the Monitoring Setting. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -119,7 +119,9 @@ func (client *MonitoringSettingsClient) BeginUpdatePatch(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller[MonitoringSettingsClientUpdatePatchResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[MonitoringSettingsClientUpdatePatchResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[MonitoringSettingsClientUpdatePatchResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -128,7 +130,7 @@ func (client *MonitoringSettingsClient) BeginUpdatePatch(ctx context.Context, re // UpdatePatch - Update the Monitoring Setting. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *MonitoringSettingsClient) updatePatch(ctx context.Context, resourceGroupName string, serviceName string, monitoringSettingResource MonitoringSettingResource, options *MonitoringSettingsClientBeginUpdatePatchOptions) (*http.Response, error) { req, err := client.updatePatchCreateRequest(ctx, resourceGroupName, serviceName, monitoringSettingResource, options) if err != nil { @@ -164,7 +166,7 @@ func (client *MonitoringSettingsClient) updatePatchCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, monitoringSettingResource) @@ -173,7 +175,7 @@ func (client *MonitoringSettingsClient) updatePatchCreateRequest(ctx context.Con // BeginUpdatePut - Update the Monitoring Setting. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -186,7 +188,9 @@ func (client *MonitoringSettingsClient) BeginUpdatePut(ctx context.Context, reso if err != nil { return nil, err } - return runtime.NewPoller[MonitoringSettingsClientUpdatePutResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[MonitoringSettingsClientUpdatePutResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[MonitoringSettingsClientUpdatePutResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -195,7 +199,7 @@ func (client *MonitoringSettingsClient) BeginUpdatePut(ctx context.Context, reso // UpdatePut - Update the Monitoring Setting. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *MonitoringSettingsClient) updatePut(ctx context.Context, resourceGroupName string, serviceName string, monitoringSettingResource MonitoringSettingResource, options *MonitoringSettingsClientBeginUpdatePutOptions) (*http.Response, error) { req, err := client.updatePutCreateRequest(ctx, resourceGroupName, serviceName, monitoringSettingResource, options) if err != nil { @@ -231,7 +235,7 @@ func (client *MonitoringSettingsClient) updatePutCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, monitoringSettingResource) diff --git a/sdk/resourcemanager/appplatform/armappplatform/monitoringsettings_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/monitoringsettings_client_example_test.go index 88b62ad78496..71c5809003e2 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/monitoringsettings_client_example_test.go +++ b/sdk/resourcemanager/appplatform/armappplatform/monitoringsettings_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/MonitoringSettings_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/MonitoringSettings_Get.json func ExampleMonitoringSettingsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -60,7 +60,7 @@ func ExampleMonitoringSettingsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/MonitoringSettings_UpdatePut.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/MonitoringSettings_UpdatePut.json func ExampleMonitoringSettingsClient_BeginUpdatePut() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -112,7 +112,7 @@ func ExampleMonitoringSettingsClient_BeginUpdatePut() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/MonitoringSettings_UpdatePatch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/MonitoringSettings_UpdatePatch.json func ExampleMonitoringSettingsClient_BeginUpdatePatch() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appplatform/armappplatform/operations_client.go b/sdk/resourcemanager/appplatform/armappplatform/operations_client.go index bcfe7f12b03f..54695f9d26e8 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/operations_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/operations_client.go @@ -40,7 +40,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available REST API operations of the Microsoft.AppPlatform provider. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -78,7 +78,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appplatform/armappplatform/operations_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/operations_client_example_test.go index ce53f9f247d3..418225dfb3b4 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/operations_client_example_test.go +++ b/sdk/resourcemanager/appplatform/armappplatform/operations_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Operations_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Operations_List.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appplatform/armappplatform/polymorphic_helpers.go b/sdk/resourcemanager/appplatform/armappplatform/polymorphic_helpers.go index b56f75c8c26a..260813d0c80d 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/polymorphic_helpers.go +++ b/sdk/resourcemanager/appplatform/armappplatform/polymorphic_helpers.go @@ -11,28 +11,6 @@ package armappplatform import "encoding/json" -func unmarshalAcceleratorAuthSettingClassification(rawMsg json.RawMessage) (AcceleratorAuthSettingClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]any - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b AcceleratorAuthSettingClassification - switch m["authType"] { - case "BasicAuth": - b = &AcceleratorBasicAuthSetting{} - case "Public": - b = &AcceleratorPublicSetting{} - case "SSH": - b = &AcceleratorSSHSetting{} - default: - b = &AcceleratorAuthSetting{} - } - return b, json.Unmarshal(rawMsg, b) -} - func unmarshalCertificatePropertiesClassification(rawMsg json.RawMessage) (CertificatePropertiesClassification, error) { if rawMsg == nil { return nil, nil @@ -53,64 +31,6 @@ func unmarshalCertificatePropertiesClassification(rawMsg json.RawMessage) (Certi return b, json.Unmarshal(rawMsg, b) } -func unmarshalCustomPersistentDiskPropertiesClassification(rawMsg json.RawMessage) (CustomPersistentDiskPropertiesClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]any - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b CustomPersistentDiskPropertiesClassification - switch m["type"] { - case string(TypeAzureFileVolume): - b = &AzureFileVolume{} - default: - b = &CustomPersistentDiskProperties{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalProbeActionClassification(rawMsg json.RawMessage) (ProbeActionClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]any - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ProbeActionClassification - switch m["type"] { - case string(ProbeActionTypeExecAction): - b = &ExecAction{} - case string(ProbeActionTypeHTTPGetAction): - b = &HTTPGetAction{} - case string(ProbeActionTypeTCPSocketAction): - b = &TCPSocketAction{} - default: - b = &ProbeAction{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalStoragePropertiesClassification(rawMsg json.RawMessage) (StoragePropertiesClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]any - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b StoragePropertiesClassification - switch m["storageType"] { - case string(StorageTypeStorageAccount): - b = &StorageAccount{} - default: - b = &StorageProperties{} - } - return b, json.Unmarshal(rawMsg, b) -} - func unmarshalUserSourceInfoClassification(rawMsg json.RawMessage) (UserSourceInfoClassification, error) { if rawMsg == nil { return nil, nil @@ -123,8 +43,6 @@ func unmarshalUserSourceInfoClassification(rawMsg json.RawMessage) (UserSourceIn switch m["type"] { case "BuildResult": b = &BuildResultUserSourceInfo{} - case "Container": - b = &CustomContainerUserSourceInfo{} case "Jar": b = &JarUploadedUserSourceInfo{} case "NetCoreZip": diff --git a/sdk/resourcemanager/appplatform/armappplatform/predefinedaccelerators_client.go b/sdk/resourcemanager/appplatform/armappplatform/predefinedaccelerators_client.go deleted file mode 100644 index 74fc7709fe59..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/predefinedaccelerators_client.go +++ /dev/null @@ -1,343 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappplatform - -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" -) - -// PredefinedAcceleratorsClient contains the methods for the PredefinedAccelerators group. -// Don't use this type directly, use NewPredefinedAcceleratorsClient() instead. -type PredefinedAcceleratorsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewPredefinedAcceleratorsClient creates a new instance of PredefinedAcceleratorsClient with the specified values. -// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewPredefinedAcceleratorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PredefinedAcceleratorsClient, error) { - cl, err := arm.NewClient(moduleName+".PredefinedAcceleratorsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &PredefinedAcceleratorsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginDisable - Disable predefined accelerator. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - applicationAcceleratorName - The name of the application accelerator. -// - predefinedAcceleratorName - The name of the predefined accelerator. -// - options - PredefinedAcceleratorsClientBeginDisableOptions contains the optional parameters for the PredefinedAcceleratorsClient.BeginDisable -// method. -func (client *PredefinedAcceleratorsClient) BeginDisable(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, predefinedAcceleratorName string, options *PredefinedAcceleratorsClientBeginDisableOptions) (*runtime.Poller[PredefinedAcceleratorsClientDisableResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.disable(ctx, resourceGroupName, serviceName, applicationAcceleratorName, predefinedAcceleratorName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[PredefinedAcceleratorsClientDisableResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[PredefinedAcceleratorsClientDisableResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Disable - Disable predefined accelerator. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *PredefinedAcceleratorsClient) disable(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, predefinedAcceleratorName string, options *PredefinedAcceleratorsClientBeginDisableOptions) (*http.Response, error) { - req, err := client.disableCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, predefinedAcceleratorName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// disableCreateRequest creates the Disable request. -func (client *PredefinedAcceleratorsClient) disableCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, predefinedAcceleratorName string, options *PredefinedAcceleratorsClientBeginDisableOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/predefinedAccelerators/{predefinedAcceleratorName}/disable" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if applicationAcceleratorName == "" { - return nil, errors.New("parameter applicationAcceleratorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationAcceleratorName}", url.PathEscape(applicationAcceleratorName)) - if predefinedAcceleratorName == "" { - return nil, errors.New("parameter predefinedAcceleratorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{predefinedAcceleratorName}", url.PathEscape(predefinedAcceleratorName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginEnable - Enable predefined accelerator. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - applicationAcceleratorName - The name of the application accelerator. -// - predefinedAcceleratorName - The name of the predefined accelerator. -// - options - PredefinedAcceleratorsClientBeginEnableOptions contains the optional parameters for the PredefinedAcceleratorsClient.BeginEnable -// method. -func (client *PredefinedAcceleratorsClient) BeginEnable(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, predefinedAcceleratorName string, options *PredefinedAcceleratorsClientBeginEnableOptions) (*runtime.Poller[PredefinedAcceleratorsClientEnableResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.enable(ctx, resourceGroupName, serviceName, applicationAcceleratorName, predefinedAcceleratorName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[PredefinedAcceleratorsClientEnableResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[PredefinedAcceleratorsClientEnableResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Enable - Enable predefined accelerator. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *PredefinedAcceleratorsClient) enable(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, predefinedAcceleratorName string, options *PredefinedAcceleratorsClientBeginEnableOptions) (*http.Response, error) { - req, err := client.enableCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, predefinedAcceleratorName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// enableCreateRequest creates the Enable request. -func (client *PredefinedAcceleratorsClient) enableCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, predefinedAcceleratorName string, options *PredefinedAcceleratorsClientBeginEnableOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/predefinedAccelerators/{predefinedAcceleratorName}/enable" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if applicationAcceleratorName == "" { - return nil, errors.New("parameter applicationAcceleratorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationAcceleratorName}", url.PathEscape(applicationAcceleratorName)) - if predefinedAcceleratorName == "" { - return nil, errors.New("parameter predefinedAcceleratorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{predefinedAcceleratorName}", url.PathEscape(predefinedAcceleratorName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the predefined accelerator. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - applicationAcceleratorName - The name of the application accelerator. -// - predefinedAcceleratorName - The name of the predefined accelerator. -// - options - PredefinedAcceleratorsClientGetOptions contains the optional parameters for the PredefinedAcceleratorsClient.Get -// method. -func (client *PredefinedAcceleratorsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, predefinedAcceleratorName string, options *PredefinedAcceleratorsClientGetOptions) (PredefinedAcceleratorsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, predefinedAcceleratorName, options) - if err != nil { - return PredefinedAcceleratorsClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PredefinedAcceleratorsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PredefinedAcceleratorsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *PredefinedAcceleratorsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, predefinedAcceleratorName string, options *PredefinedAcceleratorsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/predefinedAccelerators/{predefinedAcceleratorName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if applicationAcceleratorName == "" { - return nil, errors.New("parameter applicationAcceleratorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationAcceleratorName}", url.PathEscape(applicationAcceleratorName)) - if predefinedAcceleratorName == "" { - return nil, errors.New("parameter predefinedAcceleratorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{predefinedAcceleratorName}", url.PathEscape(predefinedAcceleratorName)) - 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", "2022-11-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 *PredefinedAcceleratorsClient) getHandleResponse(resp *http.Response) (PredefinedAcceleratorsClientGetResponse, error) { - result := PredefinedAcceleratorsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PredefinedAcceleratorResource); err != nil { - return PredefinedAcceleratorsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Handle requests to list all predefined accelerators. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - applicationAcceleratorName - The name of the application accelerator. -// - options - PredefinedAcceleratorsClientListOptions contains the optional parameters for the PredefinedAcceleratorsClient.NewListPager -// method. -func (client *PredefinedAcceleratorsClient) NewListPager(resourceGroupName string, serviceName string, applicationAcceleratorName string, options *PredefinedAcceleratorsClientListOptions) *runtime.Pager[PredefinedAcceleratorsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[PredefinedAcceleratorsClientListResponse]{ - More: func(page PredefinedAcceleratorsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PredefinedAcceleratorsClientListResponse) (PredefinedAcceleratorsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PredefinedAcceleratorsClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PredefinedAcceleratorsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PredefinedAcceleratorsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *PredefinedAcceleratorsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, options *PredefinedAcceleratorsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/predefinedAccelerators" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if applicationAcceleratorName == "" { - return nil, errors.New("parameter applicationAcceleratorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationAcceleratorName}", url.PathEscape(applicationAcceleratorName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *PredefinedAcceleratorsClient) listHandleResponse(resp *http.Response) (PredefinedAcceleratorsClientListResponse, error) { - result := PredefinedAcceleratorsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PredefinedAcceleratorResourceCollection); err != nil { - return PredefinedAcceleratorsClientListResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/predefinedaccelerators_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/predefinedaccelerators_client_example_test.go deleted file mode 100644 index 32db93051902..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/predefinedaccelerators_client_example_test.go +++ /dev/null @@ -1,164 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/PredefinedAccelerators_List.json -func ExamplePredefinedAcceleratorsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPredefinedAcceleratorsClient().NewListPager("myResourceGroup", "myservice", "default", 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.PredefinedAcceleratorResourceCollection = armappplatform.PredefinedAcceleratorResourceCollection{ - // Value: []*armappplatform.PredefinedAcceleratorResource{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/applicationAccelerators/predefinedAccelerators"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/applicationAccelerators/default/predefinedAccelerators"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.PredefinedAcceleratorProperties{ - // Description: to.Ptr("acc-desc"), - // AcceleratorTags: []*string{ - // to.Ptr("tag-a"), - // to.Ptr("tag-b")}, - // DisplayName: to.Ptr("acc-name"), - // IconURL: to.Ptr("acc-icon"), - // ProvisioningState: to.Ptr(armappplatform.PredefinedAcceleratorProvisioningStateSucceeded), - // State: to.Ptr(armappplatform.PredefinedAcceleratorStateEnabled), - // }, - // SKU: &armappplatform.SKU{ - // Name: to.Ptr("E0"), - // Capacity: to.Ptr[int32](2), - // Tier: to.Ptr("Enterprise"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/PredefinedAccelerators_Get.json -func ExamplePredefinedAcceleratorsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPredefinedAcceleratorsClient().Get(ctx, "myResourceGroup", "myservice", "default", "acc-name", 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.PredefinedAcceleratorResource = armappplatform.PredefinedAcceleratorResource{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/applicationAccelerators/predefinedAccelerators"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/applicationAccelerators/default/predefinedAccelerators/acc-name"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.PredefinedAcceleratorProperties{ - // Description: to.Ptr("acc-desc"), - // AcceleratorTags: []*string{ - // to.Ptr("tag-a"), - // to.Ptr("tag-b")}, - // DisplayName: to.Ptr("acc-name"), - // IconURL: to.Ptr("acc-icon"), - // ProvisioningState: to.Ptr(armappplatform.PredefinedAcceleratorProvisioningStateSucceeded), - // State: to.Ptr(armappplatform.PredefinedAcceleratorStateEnabled), - // }, - // SKU: &armappplatform.SKU{ - // Name: to.Ptr("E0"), - // Capacity: to.Ptr[int32](2), - // Tier: to.Ptr("Enterprise"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/PredefinedAccelerators_Disable.json -func ExamplePredefinedAcceleratorsClient_BeginDisable() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPredefinedAcceleratorsClient().BeginDisable(ctx, "myResourceGroup", "myservice", "default", "acc-name", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/PredefinedAccelerators_Enable.json -func ExamplePredefinedAcceleratorsClient_BeginEnable() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPredefinedAcceleratorsClient().BeginEnable(ctx, "myResourceGroup", "myservice", "default", "acc-name", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/response_types.go b/sdk/resourcemanager/appplatform/armappplatform/response_types.go index 9c9a33b3ba5b..18366c1f871c 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/response_types.go +++ b/sdk/resourcemanager/appplatform/armappplatform/response_types.go @@ -9,91 +9,6 @@ package armappplatform -// APIPortalCustomDomainsClientCreateOrUpdateResponse contains the response from method APIPortalCustomDomainsClient.BeginCreateOrUpdate. -type APIPortalCustomDomainsClientCreateOrUpdateResponse struct { - APIPortalCustomDomainResource -} - -// APIPortalCustomDomainsClientDeleteResponse contains the response from method APIPortalCustomDomainsClient.BeginDelete. -type APIPortalCustomDomainsClientDeleteResponse struct { - // placeholder for future response values -} - -// APIPortalCustomDomainsClientGetResponse contains the response from method APIPortalCustomDomainsClient.Get. -type APIPortalCustomDomainsClientGetResponse struct { - APIPortalCustomDomainResource -} - -// APIPortalCustomDomainsClientListResponse contains the response from method APIPortalCustomDomainsClient.NewListPager. -type APIPortalCustomDomainsClientListResponse struct { - APIPortalCustomDomainResourceCollection -} - -// APIPortalsClientCreateOrUpdateResponse contains the response from method APIPortalsClient.BeginCreateOrUpdate. -type APIPortalsClientCreateOrUpdateResponse struct { - APIPortalResource -} - -// APIPortalsClientDeleteResponse contains the response from method APIPortalsClient.BeginDelete. -type APIPortalsClientDeleteResponse struct { - // placeholder for future response values -} - -// APIPortalsClientGetResponse contains the response from method APIPortalsClient.Get. -type APIPortalsClientGetResponse struct { - APIPortalResource -} - -// APIPortalsClientListResponse contains the response from method APIPortalsClient.NewListPager. -type APIPortalsClientListResponse struct { - APIPortalResourceCollection -} - -// APIPortalsClientValidateDomainResponse contains the response from method APIPortalsClient.ValidateDomain. -type APIPortalsClientValidateDomainResponse struct { - CustomDomainValidateResult -} - -// ApplicationAcceleratorsClientCreateOrUpdateResponse contains the response from method ApplicationAcceleratorsClient.BeginCreateOrUpdate. -type ApplicationAcceleratorsClientCreateOrUpdateResponse struct { - ApplicationAcceleratorResource -} - -// ApplicationAcceleratorsClientDeleteResponse contains the response from method ApplicationAcceleratorsClient.BeginDelete. -type ApplicationAcceleratorsClientDeleteResponse struct { - // placeholder for future response values -} - -// ApplicationAcceleratorsClientGetResponse contains the response from method ApplicationAcceleratorsClient.Get. -type ApplicationAcceleratorsClientGetResponse struct { - ApplicationAcceleratorResource -} - -// ApplicationAcceleratorsClientListResponse contains the response from method ApplicationAcceleratorsClient.NewListPager. -type ApplicationAcceleratorsClientListResponse struct { - ApplicationAcceleratorResourceCollection -} - -// ApplicationLiveViewsClientCreateOrUpdateResponse contains the response from method ApplicationLiveViewsClient.BeginCreateOrUpdate. -type ApplicationLiveViewsClientCreateOrUpdateResponse struct { - ApplicationLiveViewResource -} - -// ApplicationLiveViewsClientDeleteResponse contains the response from method ApplicationLiveViewsClient.BeginDelete. -type ApplicationLiveViewsClientDeleteResponse struct { - // placeholder for future response values -} - -// ApplicationLiveViewsClientGetResponse contains the response from method ApplicationLiveViewsClient.Get. -type ApplicationLiveViewsClientGetResponse struct { - ApplicationLiveViewResource -} - -// ApplicationLiveViewsClientListResponse contains the response from method ApplicationLiveViewsClient.NewListPager. -type ApplicationLiveViewsClientListResponse struct { - ApplicationLiveViewResourceCollection -} - // AppsClientCreateOrUpdateResponse contains the response from method AppsClient.BeginCreateOrUpdate. type AppsClientCreateOrUpdateResponse struct { AppResource @@ -189,11 +104,6 @@ type BuildServiceBuilderClientGetResponse struct { BuilderResource } -// BuildServiceBuilderClientListDeploymentsResponse contains the response from method BuildServiceBuilderClient.ListDeployments. -type BuildServiceBuilderClientListDeploymentsResponse struct { - DeploymentList -} - // BuildServiceBuilderClientListResponse contains the response from method BuildServiceBuilderClient.NewListPager. type BuildServiceBuilderClientListResponse struct { BuilderResourceCollection @@ -374,31 +284,6 @@ type CustomDomainsClientUpdateResponse struct { CustomDomainResource } -// CustomizedAcceleratorsClientCreateOrUpdateResponse contains the response from method CustomizedAcceleratorsClient.BeginCreateOrUpdate. -type CustomizedAcceleratorsClientCreateOrUpdateResponse struct { - CustomizedAcceleratorResource -} - -// CustomizedAcceleratorsClientDeleteResponse contains the response from method CustomizedAcceleratorsClient.BeginDelete. -type CustomizedAcceleratorsClientDeleteResponse struct { - // placeholder for future response values -} - -// CustomizedAcceleratorsClientGetResponse contains the response from method CustomizedAcceleratorsClient.Get. -type CustomizedAcceleratorsClientGetResponse struct { - CustomizedAcceleratorResource -} - -// CustomizedAcceleratorsClientListResponse contains the response from method CustomizedAcceleratorsClient.NewListPager. -type CustomizedAcceleratorsClientListResponse struct { - CustomizedAcceleratorResourceCollection -} - -// CustomizedAcceleratorsClientValidateResponse contains the response from method CustomizedAcceleratorsClient.Validate. -type CustomizedAcceleratorsClientValidateResponse struct { - CustomizedAcceleratorValidateResult -} - // DeploymentsClientCreateOrUpdateResponse contains the response from method DeploymentsClient.BeginCreateOrUpdate. type DeploymentsClientCreateOrUpdateResponse struct { DeploymentResource @@ -409,16 +294,6 @@ type DeploymentsClientDeleteResponse struct { // placeholder for future response values } -// DeploymentsClientDisableRemoteDebuggingResponse contains the response from method DeploymentsClient.BeginDisableRemoteDebugging. -type DeploymentsClientDisableRemoteDebuggingResponse struct { - RemoteDebugging -} - -// DeploymentsClientEnableRemoteDebuggingResponse contains the response from method DeploymentsClient.BeginEnableRemoteDebugging. -type DeploymentsClientEnableRemoteDebuggingResponse struct { - RemoteDebugging -} - // DeploymentsClientGenerateHeapDumpResponse contains the response from method DeploymentsClient.BeginGenerateHeapDump. type DeploymentsClientGenerateHeapDumpResponse struct { // placeholder for future response values @@ -434,11 +309,6 @@ type DeploymentsClientGetLogFileURLResponse struct { LogFileURLResponse } -// DeploymentsClientGetRemoteDebuggingConfigResponse contains the response from method DeploymentsClient.GetRemoteDebuggingConfig. -type DeploymentsClientGetRemoteDebuggingConfigResponse struct { - RemoteDebugging -} - // DeploymentsClientGetResponse contains the response from method DeploymentsClient.Get. type DeploymentsClientGetResponse struct { DeploymentResource @@ -479,97 +349,6 @@ type DeploymentsClientUpdateResponse struct { DeploymentResource } -// DevToolPortalsClientCreateOrUpdateResponse contains the response from method DevToolPortalsClient.BeginCreateOrUpdate. -type DevToolPortalsClientCreateOrUpdateResponse struct { - DevToolPortalResource -} - -// DevToolPortalsClientDeleteResponse contains the response from method DevToolPortalsClient.BeginDelete. -type DevToolPortalsClientDeleteResponse struct { - // placeholder for future response values -} - -// DevToolPortalsClientGetResponse contains the response from method DevToolPortalsClient.Get. -type DevToolPortalsClientGetResponse struct { - DevToolPortalResource -} - -// DevToolPortalsClientListResponse contains the response from method DevToolPortalsClient.NewListPager. -type DevToolPortalsClientListResponse struct { - DevToolPortalResourceCollection -} - -// GatewayCustomDomainsClientCreateOrUpdateResponse contains the response from method GatewayCustomDomainsClient.BeginCreateOrUpdate. -type GatewayCustomDomainsClientCreateOrUpdateResponse struct { - GatewayCustomDomainResource -} - -// GatewayCustomDomainsClientDeleteResponse contains the response from method GatewayCustomDomainsClient.BeginDelete. -type GatewayCustomDomainsClientDeleteResponse struct { - // placeholder for future response values -} - -// GatewayCustomDomainsClientGetResponse contains the response from method GatewayCustomDomainsClient.Get. -type GatewayCustomDomainsClientGetResponse struct { - GatewayCustomDomainResource -} - -// GatewayCustomDomainsClientListResponse contains the response from method GatewayCustomDomainsClient.NewListPager. -type GatewayCustomDomainsClientListResponse struct { - GatewayCustomDomainResourceCollection -} - -// GatewayRouteConfigsClientCreateOrUpdateResponse contains the response from method GatewayRouteConfigsClient.BeginCreateOrUpdate. -type GatewayRouteConfigsClientCreateOrUpdateResponse struct { - GatewayRouteConfigResource -} - -// GatewayRouteConfigsClientDeleteResponse contains the response from method GatewayRouteConfigsClient.BeginDelete. -type GatewayRouteConfigsClientDeleteResponse struct { - // placeholder for future response values -} - -// GatewayRouteConfigsClientGetResponse contains the response from method GatewayRouteConfigsClient.Get. -type GatewayRouteConfigsClientGetResponse struct { - GatewayRouteConfigResource -} - -// GatewayRouteConfigsClientListResponse contains the response from method GatewayRouteConfigsClient.NewListPager. -type GatewayRouteConfigsClientListResponse struct { - GatewayRouteConfigResourceCollection -} - -// GatewaysClientCreateOrUpdateResponse contains the response from method GatewaysClient.BeginCreateOrUpdate. -type GatewaysClientCreateOrUpdateResponse struct { - GatewayResource -} - -// GatewaysClientDeleteResponse contains the response from method GatewaysClient.BeginDelete. -type GatewaysClientDeleteResponse struct { - // placeholder for future response values -} - -// GatewaysClientGetResponse contains the response from method GatewaysClient.Get. -type GatewaysClientGetResponse struct { - GatewayResource -} - -// GatewaysClientListEnvSecretsResponse contains the response from method GatewaysClient.ListEnvSecrets. -type GatewaysClientListEnvSecretsResponse struct { - // Sensitive properties for Spring Cloud Gateway - Value map[string]*string -} - -// GatewaysClientListResponse contains the response from method GatewaysClient.NewListPager. -type GatewaysClientListResponse struct { - GatewayResourceCollection -} - -// GatewaysClientValidateDomainResponse contains the response from method GatewaysClient.ValidateDomain. -type GatewaysClientValidateDomainResponse struct { - CustomDomainValidateResult -} - // MonitoringSettingsClientGetResponse contains the response from method MonitoringSettingsClient.Get. type MonitoringSettingsClientGetResponse struct { MonitoringSettingResource @@ -590,26 +369,6 @@ type OperationsClientListResponse struct { AvailableOperations } -// PredefinedAcceleratorsClientDisableResponse contains the response from method PredefinedAcceleratorsClient.BeginDisable. -type PredefinedAcceleratorsClientDisableResponse struct { - // placeholder for future response values -} - -// PredefinedAcceleratorsClientEnableResponse contains the response from method PredefinedAcceleratorsClient.BeginEnable. -type PredefinedAcceleratorsClientEnableResponse struct { - // placeholder for future response values -} - -// PredefinedAcceleratorsClientGetResponse contains the response from method PredefinedAcceleratorsClient.Get. -type PredefinedAcceleratorsClientGetResponse struct { - PredefinedAcceleratorResource -} - -// PredefinedAcceleratorsClientListResponse contains the response from method PredefinedAcceleratorsClient.NewListPager. -type PredefinedAcceleratorsClientListResponse struct { - PredefinedAcceleratorResourceCollection -} - // RuntimeVersionsClientListRuntimeVersionsResponse contains the response from method RuntimeVersionsClient.ListRuntimeVersions. type RuntimeVersionsClientListRuntimeVersionsResponse struct { AvailableRuntimeVersions @@ -690,37 +449,7 @@ type ServicesClientRegenerateTestKeyResponse struct { TestKeys } -// ServicesClientStartResponse contains the response from method ServicesClient.BeginStart. -type ServicesClientStartResponse struct { - // placeholder for future response values -} - -// ServicesClientStopResponse contains the response from method ServicesClient.BeginStop. -type ServicesClientStopResponse struct { - // placeholder for future response values -} - // ServicesClientUpdateResponse contains the response from method ServicesClient.BeginUpdate. type ServicesClientUpdateResponse struct { ServiceResource } - -// StoragesClientCreateOrUpdateResponse contains the response from method StoragesClient.BeginCreateOrUpdate. -type StoragesClientCreateOrUpdateResponse struct { - StorageResource -} - -// StoragesClientDeleteResponse contains the response from method StoragesClient.BeginDelete. -type StoragesClientDeleteResponse struct { - // placeholder for future response values -} - -// StoragesClientGetResponse contains the response from method StoragesClient.Get. -type StoragesClientGetResponse struct { - StorageResource -} - -// StoragesClientListResponse contains the response from method StoragesClient.NewListPager. -type StoragesClientListResponse struct { - StorageResourceCollection -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/runtimeversions_client.go b/sdk/resourcemanager/appplatform/armappplatform/runtimeversions_client.go index 9a0f93fa3d5c..09eac661bbf7 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/runtimeversions_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/runtimeversions_client.go @@ -41,7 +41,7 @@ func NewRuntimeVersionsClient(credential azcore.TokenCredential, options *arm.Cl // ListRuntimeVersions - Lists all of the available runtime versions supported by Microsoft.AppPlatform provider. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - options - RuntimeVersionsClientListRuntimeVersionsOptions contains the optional parameters for the RuntimeVersionsClient.ListRuntimeVersions // method. func (client *RuntimeVersionsClient) ListRuntimeVersions(ctx context.Context, options *RuntimeVersionsClientListRuntimeVersionsOptions) (RuntimeVersionsClientListRuntimeVersionsResponse, error) { @@ -67,7 +67,7 @@ func (client *RuntimeVersionsClient) listRuntimeVersionsCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appplatform/armappplatform/runtimeversions_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/runtimeversions_client_example_test.go index 48aef4ab3387..9f16fe175ec8 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/runtimeversions_client_example_test.go +++ b/sdk/resourcemanager/appplatform/armappplatform/runtimeversions_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/RuntimeVersions_ListRuntimeVersions.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/RuntimeVersions_ListRuntimeVersions.json func ExampleRuntimeVersionsClient_ListRuntimeVersions() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appplatform/armappplatform/serviceregistries_client.go b/sdk/resourcemanager/appplatform/armappplatform/serviceregistries_client.go index 403e4c422876..9684434af0a4 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/serviceregistries_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/serviceregistries_client.go @@ -48,7 +48,7 @@ func NewServiceRegistriesClient(subscriptionID string, credential azcore.TokenCr // BeginCreateOrUpdate - Create the default Service Registry or update the existing Service Registry. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -61,7 +61,9 @@ func (client *ServiceRegistriesClient) BeginCreateOrUpdate(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[ServiceRegistriesClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceRegistriesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[ServiceRegistriesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -70,7 +72,7 @@ func (client *ServiceRegistriesClient) BeginCreateOrUpdate(ctx context.Context, // CreateOrUpdate - Create the default Service Registry or update the existing Service Registry. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *ServiceRegistriesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, serviceRegistryName, options) if err != nil { @@ -110,7 +112,7 @@ func (client *ServiceRegistriesClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -119,7 +121,7 @@ func (client *ServiceRegistriesClient) createOrUpdateCreateRequest(ctx context.C // BeginDelete - Disable the default Service Registry. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -132,7 +134,9 @@ func (client *ServiceRegistriesClient) BeginDelete(ctx context.Context, resource if err != nil { return nil, err } - return runtime.NewPoller[ServiceRegistriesClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceRegistriesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[ServiceRegistriesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -141,7 +145,7 @@ func (client *ServiceRegistriesClient) BeginDelete(ctx context.Context, resource // Delete - Disable the default Service Registry. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *ServiceRegistriesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, serviceRegistryName, options) if err != nil { @@ -181,7 +185,7 @@ func (client *ServiceRegistriesClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -190,7 +194,7 @@ func (client *ServiceRegistriesClient) deleteCreateRequest(ctx context.Context, // Get - Get the Service Registry and its properties. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -235,7 +239,7 @@ func (client *ServiceRegistriesClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -252,7 +256,7 @@ func (client *ServiceRegistriesClient) getHandleResponse(resp *http.Response) (S // NewListPager - Handles requests to list all resources in a Service. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -306,7 +310,7 @@ func (client *ServiceRegistriesClient) listCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appplatform/armappplatform/serviceregistries_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/serviceregistries_client_example_test.go index 0b3e386b6bde..74eb6e02c4e4 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/serviceregistries_client_example_test.go +++ b/sdk/resourcemanager/appplatform/armappplatform/serviceregistries_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ServiceRegistries_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ServiceRegistries_Get.json func ExampleServiceRegistriesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -67,7 +67,7 @@ func ExampleServiceRegistriesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ServiceRegistries_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ServiceRegistries_CreateOrUpdate.json func ExampleServiceRegistriesClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -121,7 +121,7 @@ func ExampleServiceRegistriesClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ServiceRegistries_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ServiceRegistries_Delete.json func ExampleServiceRegistriesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -142,7 +142,7 @@ func ExampleServiceRegistriesClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ServiceRegistries_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ServiceRegistries_List.json func ExampleServiceRegistriesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appplatform/armappplatform/services_client.go b/sdk/resourcemanager/appplatform/armappplatform/services_client.go index 967c5709d7d9..f4697a199ae2 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/services_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/services_client.go @@ -48,7 +48,7 @@ func NewServicesClient(subscriptionID string, credential azcore.TokenCredential, // CheckNameAvailability - Checks that the resource name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - location - the region // - availabilityParameters - Parameters supplied to the operation. // - options - ServicesClientCheckNameAvailabilityOptions contains the optional parameters for the ServicesClient.CheckNameAvailability @@ -84,7 +84,7 @@ func (client *ServicesClient) checkNameAvailabilityCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, availabilityParameters) @@ -102,7 +102,7 @@ func (client *ServicesClient) checkNameAvailabilityHandleResponse(resp *http.Res // BeginCreateOrUpdate - Create a new Service or update an exiting Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -115,7 +115,9 @@ func (client *ServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller[ServicesClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServicesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[ServicesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -124,7 +126,7 @@ func (client *ServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceG // CreateOrUpdate - Create a new Service or update an exiting Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *ServicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource, options *ServicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, resource, options) if err != nil { @@ -160,7 +162,7 @@ func (client *ServicesClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, resource) @@ -169,7 +171,7 @@ func (client *ServicesClient) createOrUpdateCreateRequest(ctx context.Context, r // BeginDelete - Operation to delete a Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -180,7 +182,9 @@ func (client *ServicesClient) BeginDelete(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[ServicesClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServicesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[ServicesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -189,7 +193,7 @@ func (client *ServicesClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Operation to delete a Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *ServicesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { @@ -225,7 +229,7 @@ func (client *ServicesClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -234,7 +238,7 @@ func (client *ServicesClient) deleteCreateRequest(ctx context.Context, resourceG // DisableTestEndpoint - Disable test endpoint functionality for a Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -275,7 +279,7 @@ func (client *ServicesClient) disableTestEndpointCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -284,7 +288,7 @@ func (client *ServicesClient) disableTestEndpointCreateRequest(ctx context.Conte // EnableTestEndpoint - Enable test endpoint functionality for a Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -325,7 +329,7 @@ func (client *ServicesClient) enableTestEndpointCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -343,7 +347,7 @@ func (client *ServicesClient) enableTestEndpointHandleResponse(resp *http.Respon // Get - Get a Service and its properties. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -383,7 +387,7 @@ func (client *ServicesClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -400,7 +404,7 @@ func (client *ServicesClient) getHandleResponse(resp *http.Response) (ServicesCl // NewListPager - Handles requests to list all resources in a resource group. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - options - ServicesClientListOptions contains the optional parameters for the ServicesClient.NewListPager method. @@ -448,7 +452,7 @@ func (client *ServicesClient) listCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -465,7 +469,7 @@ func (client *ServicesClient) listHandleResponse(resp *http.Response) (ServicesC // NewListBySubscriptionPager - Handles requests to list all resources in a subscription. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - options - ServicesClientListBySubscriptionOptions contains the optional parameters for the ServicesClient.NewListBySubscriptionPager // method. func (client *ServicesClient) NewListBySubscriptionPager(options *ServicesClientListBySubscriptionOptions) *runtime.Pager[ServicesClientListBySubscriptionResponse] { @@ -508,7 +512,7 @@ func (client *ServicesClient) listBySubscriptionCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -526,7 +530,7 @@ func (client *ServicesClient) listBySubscriptionHandleResponse(resp *http.Respon // ListTestKeys - List test keys for a Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -566,7 +570,7 @@ func (client *ServicesClient) listTestKeysCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -584,7 +588,7 @@ func (client *ServicesClient) listTestKeysHandleResponse(resp *http.Response) (S // RegenerateTestKey - Regenerate a test key for a Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -626,7 +630,7 @@ func (client *ServicesClient) regenerateTestKeyCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, regenerateTestKeyRequest) @@ -641,140 +645,10 @@ func (client *ServicesClient) regenerateTestKeyHandleResponse(resp *http.Respons return result, nil } -// BeginStart - Start a Service. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - options - ServicesClientBeginStartOptions contains the optional parameters for the ServicesClient.BeginStart method. -func (client *ServicesClient) BeginStart(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginStartOptions) (*runtime.Poller[ServicesClientStartResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.start(ctx, resourceGroupName, serviceName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ServicesClientStartResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[ServicesClientStartResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Start - Start a Service. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *ServicesClient) start(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginStartOptions) (*http.Response, error) { - req, err := client.startCreateRequest(ctx, resourceGroupName, serviceName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// startCreateRequest creates the Start request. -func (client *ServicesClient) startCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginStartOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/start" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginStop - Stop a Service. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - options - ServicesClientBeginStopOptions contains the optional parameters for the ServicesClient.BeginStop method. -func (client *ServicesClient) BeginStop(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginStopOptions) (*runtime.Poller[ServicesClientStopResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.stop(ctx, resourceGroupName, serviceName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ServicesClientStopResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[ServicesClientStopResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Stop - Stop a Service. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *ServicesClient) stop(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginStopOptions) (*http.Response, error) { - req, err := client.stopCreateRequest(ctx, resourceGroupName, serviceName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// stopCreateRequest creates the Stop request. -func (client *ServicesClient) stopCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginStopOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/stop" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - // BeginUpdate - Operation to update an exiting Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure // Resource Manager API or the portal. // - serviceName - The name of the Service resource. @@ -786,7 +660,9 @@ func (client *ServicesClient) BeginUpdate(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[ServicesClientUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServicesClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[ServicesClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -795,7 +671,7 @@ func (client *ServicesClient) BeginUpdate(ctx context.Context, resourceGroupName // Update - Operation to update an exiting Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 func (client *ServicesClient) update(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource, options *ServicesClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, resource, options) if err != nil { @@ -831,7 +707,7 @@ func (client *ServicesClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, resource) diff --git a/sdk/resourcemanager/appplatform/armappplatform/services_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/services_client_example_test.go index 204c9fe35f0f..f06f623bbe46 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/services_client_example_test.go +++ b/sdk/resourcemanager/appplatform/armappplatform/services_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Services_Get.json func ExampleServicesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -54,9 +54,6 @@ func ExampleServicesClient_Get() { // }, // Properties: &armappplatform.ClusterResourceProperties{ // NetworkProfile: &armappplatform.NetworkProfile{ - // IngressConfig: &armappplatform.IngressConfig{ - // ReadTimeoutInSeconds: to.Ptr[int32](300), - // }, // OutboundIPs: &armappplatform.NetworkProfileOutboundIPs{ // PublicIPs: []*string{ // to.Ptr("20.39.3.173"), @@ -98,7 +95,7 @@ func ExampleServicesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Services_CreateOrUpdate.json func ExampleServicesClient_BeginCreateOrUpdate_servicesCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -189,109 +186,7 @@ func ExampleServicesClient_BeginCreateOrUpdate_servicesCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_CreateOrUpdate_Enterprise.json -func ExampleServicesClient_BeginCreateOrUpdate_servicesCreateOrUpdateEnterprise() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServicesClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", armappplatform.ServiceResource{ - Location: to.Ptr("eastus"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armappplatform.ClusterResourceProperties{ - MarketplaceResource: &armappplatform.MarketplaceResource{ - Plan: to.Ptr("tanzu-asc-ent-mtr"), - Product: to.Ptr("azure-spring-cloud-vmware-tanzu-2"), - Publisher: to.Ptr("vmware-inc"), - }, - }, - SKU: &armappplatform.SKU{ - Name: to.Ptr("E0"), - Tier: to.Ptr("Enterprise"), - }, - }, 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.ServiceResource = armappplatform.ServiceResource{ - // Name: to.Ptr("myservice"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // }, - // Properties: &armappplatform.ClusterResourceProperties{ - // MarketplaceResource: &armappplatform.MarketplaceResource{ - // Plan: to.Ptr("tanzu-asc-ent-mtr"), - // Product: to.Ptr("azure-spring-cloud-vmware-tanzu-2"), - // Publisher: to.Ptr("vmware-inc"), - // }, - // NetworkProfile: &armappplatform.NetworkProfile{ - // OutboundIPs: &armappplatform.NetworkProfileOutboundIPs{ - // PublicIPs: []*string{ - // to.Ptr("20.39.3.173"), - // to.Ptr("40.64.67.13")}, - // }, - // RequiredTraffics: []*armappplatform.RequiredTraffic{ - // { - // Direction: to.Ptr(armappplatform.TrafficDirectionOutbound), - // IPs: []*string{ - // to.Ptr("20.62.211.25"), - // to.Ptr("52.188.47.226")}, - // Port: to.Ptr[int32](443), - // Protocol: to.Ptr("TCP"), - // }, - // { - // Direction: to.Ptr(armappplatform.TrafficDirectionOutbound), - // IPs: []*string{ - // to.Ptr("20.62.211.25"), - // to.Ptr("52.188.47.226")}, - // Port: to.Ptr[int32](1194), - // Protocol: to.Ptr("UDP"), - // }, - // { - // Direction: to.Ptr(armappplatform.TrafficDirectionOutbound), - // IPs: []*string{ - // to.Ptr("20.62.211.25"), - // to.Ptr("52.188.47.226")}, - // Port: to.Ptr[int32](9000), - // Protocol: to.Ptr("TCP"), - // }}, - // }, - // ProvisioningState: to.Ptr(armappplatform.ProvisioningStateSucceeded), - // ServiceID: to.Ptr("12345678abcd1234abcd12345678abcd"), - // }, - // SKU: &armappplatform.SKU{ - // Name: to.Ptr("E0"), - // Tier: to.Ptr("Enterprise"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_CreateOrUpdate_VNetInjection.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Services_CreateOrUpdate_VNetInjection.json func ExampleServicesClient_BeginCreateOrUpdate_servicesCreateOrUpdateVNetInjection() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -309,18 +204,12 @@ func ExampleServicesClient_BeginCreateOrUpdate_servicesCreateOrUpdateVNetInjecti }, Properties: &armappplatform.ClusterResourceProperties{ NetworkProfile: &armappplatform.NetworkProfile{ - AppNetworkResourceGroup: to.Ptr("my-app-network-rg"), - AppSubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/apps"), - IngressConfig: &armappplatform.IngressConfig{ - ReadTimeoutInSeconds: to.Ptr[int32](300), - }, + AppNetworkResourceGroup: to.Ptr("my-app-network-rg"), + AppSubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/apps"), ServiceCidr: to.Ptr("10.8.0.0/16,10.244.0.0/16,10.245.0.1/16"), ServiceRuntimeNetworkResourceGroup: to.Ptr("my-service-runtime-network-rg"), ServiceRuntimeSubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/serviceRuntime"), }, - VnetAddons: &armappplatform.ServiceVNetAddons{ - LogStreamPublicEndpoint: to.Ptr(true), - }, }, SKU: &armappplatform.SKU{ Name: to.Ptr("S0"), @@ -392,9 +281,6 @@ func ExampleServicesClient_BeginCreateOrUpdate_servicesCreateOrUpdateVNetInjecti // }, // ProvisioningState: to.Ptr(armappplatform.ProvisioningStateSucceeded), // ServiceID: to.Ptr("12345678abcd1234abcd12345678abcd"), - // VnetAddons: &armappplatform.ServiceVNetAddons{ - // LogStreamPublicEndpoint: to.Ptr(true), - // }, // }, // SKU: &armappplatform.SKU{ // Name: to.Ptr("S0"), @@ -403,7 +289,7 @@ func ExampleServicesClient_BeginCreateOrUpdate_servicesCreateOrUpdateVNetInjecti // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Services_Delete.json func ExampleServicesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -424,7 +310,7 @@ func ExampleServicesClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Services_Update.json func ExampleServicesClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -515,7 +401,7 @@ func ExampleServicesClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_ListTestKeys.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Services_ListTestKeys.json func ExampleServicesClient_ListTestKeys() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -542,7 +428,7 @@ func ExampleServicesClient_ListTestKeys() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_RegenerateTestKey.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Services_RegenerateTestKey.json func ExampleServicesClient_RegenerateTestKey() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -571,7 +457,7 @@ func ExampleServicesClient_RegenerateTestKey() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_DisableTestEndpoint.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Services_DisableTestEndpoint.json func ExampleServicesClient_DisableTestEndpoint() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -588,7 +474,7 @@ func ExampleServicesClient_DisableTestEndpoint() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_EnableTestEndpoint.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Services_EnableTestEndpoint.json func ExampleServicesClient_EnableTestEndpoint() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -615,49 +501,7 @@ func ExampleServicesClient_EnableTestEndpoint() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_Stop.json -func ExampleServicesClient_BeginStop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServicesClient().BeginStop(ctx, "myResourceGroup", "myservice", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_Start.json -func ExampleServicesClient_BeginStart() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServicesClient().BeginStart(ctx, "myResourceGroup", "myservice", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_CheckNameAvailability.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Services_CheckNameAvailability.json func ExampleServicesClient_CheckNameAvailability() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -685,7 +529,7 @@ func ExampleServicesClient_CheckNameAvailability() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Services_ListBySubscription.json func ExampleServicesClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -727,9 +571,6 @@ func ExampleServicesClient_NewListBySubscriptionPager() { // }, // Properties: &armappplatform.ClusterResourceProperties{ // NetworkProfile: &armappplatform.NetworkProfile{ - // IngressConfig: &armappplatform.IngressConfig{ - // ReadTimeoutInSeconds: to.Ptr[int32](300), - // }, // OutboundIPs: &armappplatform.NetworkProfileOutboundIPs{ // PublicIPs: []*string{ // to.Ptr("20.39.3.173"), @@ -773,7 +614,7 @@ func ExampleServicesClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Services_List.json func ExampleServicesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -815,9 +656,6 @@ func ExampleServicesClient_NewListPager() { // }, // Properties: &armappplatform.ClusterResourceProperties{ // NetworkProfile: &armappplatform.NetworkProfile{ - // IngressConfig: &armappplatform.IngressConfig{ - // ReadTimeoutInSeconds: to.Ptr[int32](300), - // }, // OutboundIPs: &armappplatform.NetworkProfileOutboundIPs{ // PublicIPs: []*string{ // to.Ptr("20.39.3.173"), diff --git a/sdk/resourcemanager/appplatform/armappplatform/skus_client.go b/sdk/resourcemanager/appplatform/armappplatform/skus_client.go index 533af90020de..ecf44416e30e 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/skus_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/skus_client.go @@ -47,7 +47,7 @@ func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, opt // NewListPager - Lists all of the available skus of the Microsoft.AppPlatform provider. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-04-01 // - options - SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. func (client *SKUsClient) NewListPager(options *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SKUsClientListResponse]{ @@ -89,7 +89,7 @@ func (client *SKUsClient) listCreateRequest(ctx context.Context, options *SKUsCl return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appplatform/armappplatform/skus_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/skus_client_example_test.go index 537b6655456d..89bf042f7aa8 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/skus_client_example_test.go +++ b/sdk/resourcemanager/appplatform/armappplatform/skus_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Skus_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Skus_List.json func ExampleSKUsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appplatform/armappplatform/storages_client.go b/sdk/resourcemanager/appplatform/armappplatform/storages_client.go deleted file mode 100644 index d64b86198a5a..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/storages_client.go +++ /dev/null @@ -1,321 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappplatform - -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" -) - -// StoragesClient contains the methods for the Storages group. -// Don't use this type directly, use NewStoragesClient() instead. -type StoragesClient struct { - internal *arm.Client - subscriptionID string -} - -// NewStoragesClient creates a new instance of StoragesClient with the specified values. -// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewStoragesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StoragesClient, error) { - cl, err := arm.NewClient(moduleName+".StoragesClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &StoragesClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create or update storage resource. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - storageName - The name of the storage resource. -// - storageResource - Parameters for the create or update operation -// - options - StoragesClientBeginCreateOrUpdateOptions contains the optional parameters for the StoragesClient.BeginCreateOrUpdate -// method. -func (client *StoragesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, storageName string, storageResource StorageResource, options *StoragesClientBeginCreateOrUpdateOptions) (*runtime.Poller[StoragesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, storageName, storageResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[StoragesClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[StoragesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// CreateOrUpdate - Create or update storage resource. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *StoragesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, storageName string, storageResource StorageResource, options *StoragesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, storageName, storageResource, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *StoragesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, storageName string, storageResource StorageResource, options *StoragesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if storageName == "" { - return nil, errors.New("parameter storageName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageName}", url.PathEscape(storageName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, storageResource) -} - -// BeginDelete - Delete the storage resource. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - storageName - The name of the storage resource. -// - options - StoragesClientBeginDeleteOptions contains the optional parameters for the StoragesClient.BeginDelete method. -func (client *StoragesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, storageName string, options *StoragesClientBeginDeleteOptions) (*runtime.Poller[StoragesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, storageName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[StoragesClientDeleteResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[StoragesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Delete - Delete the storage resource. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -func (client *StoragesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, storageName string, options *StoragesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, storageName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *StoragesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, storageName string, options *StoragesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if storageName == "" { - return nil, errors.New("parameter storageName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageName}", url.PathEscape(storageName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the storage resource. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - storageName - The name of the storage resource. -// - options - StoragesClientGetOptions contains the optional parameters for the StoragesClient.Get method. -func (client *StoragesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, storageName string, options *StoragesClientGetOptions) (StoragesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, storageName, options) - if err != nil { - return StoragesClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return StoragesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StoragesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *StoragesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, storageName string, options *StoragesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName}" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if storageName == "" { - return nil, errors.New("parameter storageName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageName}", url.PathEscape(storageName)) - 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", "2022-11-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 *StoragesClient) getHandleResponse(resp *http.Response) (StoragesClientGetResponse, error) { - result := StoragesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StorageResource); err != nil { - return StoragesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List all the storages of one Azure Spring Apps resource. -// -// Generated from API version 2022-11-01-preview -// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// - serviceName - The name of the Service resource. -// - options - StoragesClientListOptions contains the optional parameters for the StoragesClient.NewListPager method. -func (client *StoragesClient) NewListPager(resourceGroupName string, serviceName string, options *StoragesClientListOptions) *runtime.Pager[StoragesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[StoragesClientListResponse]{ - More: func(page StoragesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *StoragesClientListResponse) (StoragesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StoragesClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return StoragesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StoragesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *StoragesClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *StoragesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages" - 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 serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - 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", "2022-11-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *StoragesClient) listHandleResponse(resp *http.Response) (StoragesClientListResponse, error) { - result := StoragesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StorageResourceCollection); err != nil { - return StoragesClientListResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/storages_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/storages_client_example_test.go deleted file mode 100644 index 3e5c7dfc4122..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/storages_client_example_test.go +++ /dev/null @@ -1,169 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Storages_Get.json -func ExampleStoragesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStoragesClient().Get(ctx, "myResourceGroup", "myservice", "mystorage", 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.StorageResource = armappplatform.StorageResource{ - // Name: to.Ptr("mystorage"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/storages"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/storages/mystorage"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.StorageAccount{ - // StorageType: to.Ptr(armappplatform.StorageTypeStorageAccount), - // AccountName: to.Ptr("storage-account-name"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Storages_CreateOrUpdate.json -func ExampleStoragesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewStoragesClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "mystorage", armappplatform.StorageResource{ - Properties: &armappplatform.StorageAccount{ - StorageType: to.Ptr(armappplatform.StorageTypeStorageAccount), - AccountKey: to.Ptr("account-key-of-storage-account"), - AccountName: to.Ptr("storage-account-name"), - }, - }, 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.StorageResource = armappplatform.StorageResource{ - // Name: to.Ptr("mystorage"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/storages"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/storages/mystorage"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.StorageAccount{ - // StorageType: to.Ptr(armappplatform.StorageTypeStorageAccount), - // AccountName: to.Ptr("storage-account-name"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Storages_Delete.json -func ExampleStoragesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewStoragesClient().BeginDelete(ctx, "myResourceGroup", "myservice", "mystorage", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Storages_List.json -func ExampleStoragesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappplatform.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewStoragesClient().NewListPager("myResourceGroup", "myService", 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.StorageResourceCollection = armappplatform.StorageResourceCollection{ - // Value: []*armappplatform.StorageResource{ - // { - // Name: to.Ptr("mystorage"), - // Type: to.Ptr("Microsoft.AppPlatform/Spring/storages"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/storages/mystorage"), - // SystemData: &armappplatform.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()), - // CreatedBy: to.Ptr("sample-user"), - // CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()), - // LastModifiedBy: to.Ptr("sample-user"), - // LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser), - // }, - // Properties: &armappplatform.StorageAccount{ - // StorageType: to.Ptr(armappplatform.StorageTypeStorageAccount), - // AccountName: to.Ptr("storage-account-name"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/containerinstance/armcontainerinstance/CHANGELOG.md b/sdk/resourcemanager/containerinstance/armcontainerinstance/CHANGELOG.md index e8f70bea34fb..b402ca6d7bf8 100644 --- a/sdk/resourcemanager/containerinstance/armcontainerinstance/CHANGELOG.md +++ b/sdk/resourcemanager/containerinstance/armcontainerinstance/CHANGELOG.md @@ -1,21 +1,11 @@ # Release History -## 2.2.0-beta.2 (2023-03-28) +## 2.2.0 (2023-04-07) ### Features Added - New struct `ClientFactory` which is a client factory used to create any client in this module -## 2.2.0-beta.1 (2023-01-27) -### Features Added - -- New value `ContainerGroupSKUConfidential` added to type alias `ContainerGroupSKU` -- New type alias `ContainerGroupPriority` with values `ContainerGroupPriorityRegular`, `ContainerGroupPrioritySpot` -- New struct `ConfidentialComputeProperties` -- New field `ConfidentialComputeProperties` in struct `ContainerGroupPropertiesProperties` -- New field `Priority` in struct `ContainerGroupPropertiesProperties` - - ## 2.1.0 (2022-11-08) ### Features Added diff --git a/sdk/resourcemanager/containerinstance/armcontainerinstance/autorest.md b/sdk/resourcemanager/containerinstance/armcontainerinstance/autorest.md index 95b0f06327cb..2c70a60b2c54 100644 --- a/sdk/resourcemanager/containerinstance/armcontainerinstance/autorest.md +++ b/sdk/resourcemanager/containerinstance/armcontainerinstance/autorest.md @@ -5,8 +5,8 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/8c9845c7190792cb95c0deda1cb787512c4c7ca1/specification/containerinstance/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/8c9845c7190792cb95c0deda1cb787512c4c7ca1/specification/containerinstance/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 2.2.0-beta.2 +module-version: 2.2.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/containerinstance/armcontainerinstance/constants.go b/sdk/resourcemanager/containerinstance/armcontainerinstance/constants.go index 5bc8669f98d4..c6e54999a67d 100644 --- a/sdk/resourcemanager/containerinstance/armcontainerinstance/constants.go +++ b/sdk/resourcemanager/containerinstance/armcontainerinstance/constants.go @@ -11,7 +11,7 @@ package armcontainerinstance const ( moduleName = "armcontainerinstance" - moduleVersion = "v2.2.0-beta.2" + moduleVersion = "v2.2.0" ) // ContainerGroupIPAddressType - Specifies if the IP is exposed to the public internet or private VNET. @@ -46,22 +46,6 @@ func PossibleContainerGroupNetworkProtocolValues() []ContainerGroupNetworkProtoc } } -// ContainerGroupPriority - The priority of the container group. -type ContainerGroupPriority string - -const ( - ContainerGroupPriorityRegular ContainerGroupPriority = "Regular" - ContainerGroupPrioritySpot ContainerGroupPriority = "Spot" -) - -// PossibleContainerGroupPriorityValues returns the possible values for the ContainerGroupPriority const type. -func PossibleContainerGroupPriorityValues() []ContainerGroupPriority { - return []ContainerGroupPriority{ - ContainerGroupPriorityRegular, - ContainerGroupPrioritySpot, - } -} - // ContainerGroupRestartPolicy - Restart policy for all containers within the container group. // * Always Always restart // * OnFailure Restart on failure @@ -87,15 +71,13 @@ func PossibleContainerGroupRestartPolicyValues() []ContainerGroupRestartPolicy { type ContainerGroupSKU string const ( - ContainerGroupSKUConfidential ContainerGroupSKU = "Confidential" - ContainerGroupSKUDedicated ContainerGroupSKU = "Dedicated" - ContainerGroupSKUStandard ContainerGroupSKU = "Standard" + ContainerGroupSKUDedicated ContainerGroupSKU = "Dedicated" + ContainerGroupSKUStandard ContainerGroupSKU = "Standard" ) // PossibleContainerGroupSKUValues returns the possible values for the ContainerGroupSKU const type. func PossibleContainerGroupSKUValues() []ContainerGroupSKU { return []ContainerGroupSKU{ - ContainerGroupSKUConfidential, ContainerGroupSKUDedicated, ContainerGroupSKUStandard, } diff --git a/sdk/resourcemanager/containerinstance/armcontainerinstance/containergroups_client.go b/sdk/resourcemanager/containerinstance/armcontainerinstance/containergroups_client.go index 0b781828fb52..97b474784d6d 100644 --- a/sdk/resourcemanager/containerinstance/armcontainerinstance/containergroups_client.go +++ b/sdk/resourcemanager/containerinstance/armcontainerinstance/containergroups_client.go @@ -48,7 +48,7 @@ func NewContainerGroupsClient(subscriptionID string, credential azcore.TokenCred // BeginCreateOrUpdate - Create or update container groups with specified configurations. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01-preview +// Generated from API version 2022-09-01 // - resourceGroupName - The name of the resource group. // - containerGroupName - The name of the container group. // - containerGroup - The properties of the container group to be created or updated. @@ -69,7 +69,7 @@ func (client *ContainerGroupsClient) BeginCreateOrUpdate(ctx context.Context, re // CreateOrUpdate - Create or update container groups with specified configurations. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01-preview +// Generated from API version 2022-09-01 func (client *ContainerGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, containerGroupName string, containerGroup ContainerGroup, options *ContainerGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, containerGroupName, containerGroup, options) if err != nil { @@ -105,7 +105,7 @@ func (client *ContainerGroupsClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01-preview") + reqQP.Set("api-version", "2022-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, containerGroup) @@ -115,7 +115,7 @@ func (client *ContainerGroupsClient) createOrUpdateCreateRequest(ctx context.Con // not delete other resources provided by the user, such as volumes. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01-preview +// Generated from API version 2022-09-01 // - resourceGroupName - The name of the resource group. // - containerGroupName - The name of the container group. // - options - ContainerGroupsClientBeginDeleteOptions contains the optional parameters for the ContainerGroupsClient.BeginDelete @@ -136,7 +136,7 @@ func (client *ContainerGroupsClient) BeginDelete(ctx context.Context, resourceGr // delete other resources provided by the user, such as volumes. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01-preview +// Generated from API version 2022-09-01 func (client *ContainerGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, containerGroupName string, options *ContainerGroupsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, containerGroupName, options) if err != nil { @@ -172,7 +172,7 @@ func (client *ContainerGroupsClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01-preview") + reqQP.Set("api-version", "2022-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -183,7 +183,7 @@ func (client *ContainerGroupsClient) deleteCreateRequest(ctx context.Context, re // credentials, restart policy, IP address type, OS type, state, and volumes. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01-preview +// Generated from API version 2022-09-01 // - resourceGroupName - The name of the resource group. // - containerGroupName - The name of the container group. // - options - ContainerGroupsClientGetOptions contains the optional parameters for the ContainerGroupsClient.Get method. @@ -222,7 +222,7 @@ func (client *ContainerGroupsClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01-preview") + reqQP.Set("api-version", "2022-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -241,7 +241,7 @@ func (client *ContainerGroupsClient) getHandleResponse(resp *http.Response) (Con // control of network setting and configuration. For container groups, this will always be an empty list. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01-preview +// Generated from API version 2022-09-01 // - resourceGroupName - The name of the resource group. // - containerGroupName - The name of the container group. // - options - ContainerGroupsClientGetOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the @@ -281,7 +281,7 @@ func (client *ContainerGroupsClient) getOutboundNetworkDependenciesEndpointsCrea return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01-preview") + reqQP.Set("api-version", "2022-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -300,7 +300,7 @@ func (client *ContainerGroupsClient) getOutboundNetworkDependenciesEndpointsHand // container group including containers, image registry credentials, restart policy, IP address // type, OS type, state, and volumes. // -// Generated from API version 2022-10-01-preview +// Generated from API version 2022-09-01 // - options - ContainerGroupsClientListOptions contains the optional parameters for the ContainerGroupsClient.NewListPager // method. func (client *ContainerGroupsClient) NewListPager(options *ContainerGroupsClientListOptions) *runtime.Pager[ContainerGroupsClientListResponse] { @@ -343,7 +343,7 @@ func (client *ContainerGroupsClient) listCreateRequest(ctx context.Context, opti return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01-preview") + reqQP.Set("api-version", "2022-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -362,7 +362,7 @@ func (client *ContainerGroupsClient) listHandleResponse(resp *http.Response) (Co // returns properties of each container group including containers, image registry credentials, restart // policy, IP address type, OS type, state, and volumes. // -// Generated from API version 2022-10-01-preview +// Generated from API version 2022-09-01 // - resourceGroupName - The name of the resource group. // - options - ContainerGroupsClientListByResourceGroupOptions contains the optional parameters for the ContainerGroupsClient.NewListByResourceGroupPager // method. @@ -410,7 +410,7 @@ func (client *ContainerGroupsClient) listByResourceGroupCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01-preview") + reqQP.Set("api-version", "2022-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -429,7 +429,7 @@ func (client *ContainerGroupsClient) listByResourceGroupHandleResponse(resp *htt // downloaded. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01-preview +// Generated from API version 2022-09-01 // - resourceGroupName - The name of the resource group. // - containerGroupName - The name of the container group. // - options - ContainerGroupsClientBeginRestartOptions contains the optional parameters for the ContainerGroupsClient.BeginRestart @@ -449,7 +449,7 @@ func (client *ContainerGroupsClient) BeginRestart(ctx context.Context, resourceG // Restart - Restarts all containers in a container group in place. If container image has updates, new image will be downloaded. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01-preview +// Generated from API version 2022-09-01 func (client *ContainerGroupsClient) restart(ctx context.Context, resourceGroupName string, containerGroupName string, options *ContainerGroupsClientBeginRestartOptions) (*http.Response, error) { req, err := client.restartCreateRequest(ctx, resourceGroupName, containerGroupName, options) if err != nil { @@ -485,7 +485,7 @@ func (client *ContainerGroupsClient) restartCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01-preview") + reqQP.Set("api-version", "2022-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -494,7 +494,7 @@ func (client *ContainerGroupsClient) restartCreateRequest(ctx context.Context, r // BeginStart - Starts all containers in a container group. Compute resources will be allocated and billing will start. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01-preview +// Generated from API version 2022-09-01 // - resourceGroupName - The name of the resource group. // - containerGroupName - The name of the container group. // - options - ContainerGroupsClientBeginStartOptions contains the optional parameters for the ContainerGroupsClient.BeginStart @@ -514,7 +514,7 @@ func (client *ContainerGroupsClient) BeginStart(ctx context.Context, resourceGro // Start - Starts all containers in a container group. Compute resources will be allocated and billing will start. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01-preview +// Generated from API version 2022-09-01 func (client *ContainerGroupsClient) start(ctx context.Context, resourceGroupName string, containerGroupName string, options *ContainerGroupsClientBeginStartOptions) (*http.Response, error) { req, err := client.startCreateRequest(ctx, resourceGroupName, containerGroupName, options) if err != nil { @@ -550,7 +550,7 @@ func (client *ContainerGroupsClient) startCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01-preview") + reqQP.Set("api-version", "2022-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -559,7 +559,7 @@ func (client *ContainerGroupsClient) startCreateRequest(ctx context.Context, res // Stop - Stops all containers in a container group. Compute resources will be deallocated and billing will stop. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01-preview +// Generated from API version 2022-09-01 // - resourceGroupName - The name of the resource group. // - containerGroupName - The name of the container group. // - options - ContainerGroupsClientStopOptions contains the optional parameters for the ContainerGroupsClient.Stop method. @@ -598,7 +598,7 @@ func (client *ContainerGroupsClient) stopCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01-preview") + reqQP.Set("api-version", "2022-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -607,7 +607,7 @@ func (client *ContainerGroupsClient) stopCreateRequest(ctx context.Context, reso // Update - Updates container group tags with specified values. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01-preview +// Generated from API version 2022-09-01 // - resourceGroupName - The name of the resource group. // - containerGroupName - The name of the container group. // - resource - The container group resource with just the tags to be updated. @@ -647,7 +647,7 @@ func (client *ContainerGroupsClient) updateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01-preview") + reqQP.Set("api-version", "2022-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, resource) diff --git a/sdk/resourcemanager/containerinstance/armcontainerinstance/containergroups_client_example_test.go b/sdk/resourcemanager/containerinstance/armcontainerinstance/containergroups_client_example_test.go index 9d34bba72574..6fe8eafd5222 100644 --- a/sdk/resourcemanager/containerinstance/armcontainerinstance/containergroups_client_example_test.go +++ b/sdk/resourcemanager/containerinstance/armcontainerinstance/containergroups_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8c9845c7190792cb95c0deda1cb787512c4c7ca1/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2022-09-01/examples/ContainerGroupsList.json func ExampleContainerGroupsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -118,7 +118,7 @@ func ExampleContainerGroupsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupsListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8c9845c7190792cb95c0deda1cb787512c4c7ca1/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2022-09-01/examples/ContainerGroupsListByResourceGroup.json func ExampleContainerGroupsClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -208,103 +208,7 @@ func ExampleContainerGroupsClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupsGetPriority.json -func ExampleContainerGroupsClient_Get_containerGroupsGetWithPriority() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerinstance.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewContainerGroupsClient().Get(ctx, "demo", "demo1", 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.ContainerGroup = armcontainerinstance.ContainerGroup{ - // Properties: &armcontainerinstance.ContainerGroupPropertiesProperties{ - // Containers: []*armcontainerinstance.Container{ - // { - // Name: to.Ptr("test-container-001"), - // Properties: &armcontainerinstance.ContainerProperties{ - // Command: []*string{ - // to.Ptr("/bin/sh"), - // to.Ptr("-c"), - // to.Ptr("sleep 10")}, - // EnvironmentVariables: []*armcontainerinstance.EnvironmentVariable{ - // }, - // Image: to.Ptr("alpine:latest"), - // InstanceView: &armcontainerinstance.ContainerPropertiesInstanceView{ - // CurrentState: &armcontainerinstance.ContainerState{ - // DetailStatus: to.Ptr("Completed"), - // ExitCode: to.Ptr[int32](0), - // FinishTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-11T19:33:55.565Z"); return t}()), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-11T19:33:44.217Z"); return t}()), - // State: to.Ptr("Terminated"), - // }, - // Events: []*armcontainerinstance.Event{ - // { - // Name: to.Ptr("Pulling"), - // Type: to.Ptr("Normal"), - // Count: to.Ptr[int32](2), - // FirstTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-11T19:28:22Z"); return t}()), - // LastTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-11T19:32:09Z"); return t}()), - // Message: to.Ptr("pulling image \"alpine@sha256:1304f174557314a7ed9eddb4eab12fed12cb0cd9809e4c28f29af86979a3c870\""), - // }, - // { - // Name: to.Ptr("Pulled"), - // Type: to.Ptr("Normal"), - // Count: to.Ptr[int32](2), - // FirstTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-11T19:32:08Z"); return t}()), - // LastTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-11T19:32:38Z"); return t}()), - // Message: to.Ptr("Successfully pulled image \"alpine@sha256:1304f174557314a7ed9eddb4eab12fed12cb0cd9809e4c28f29af86979a3c870\""), - // }, - // { - // Name: to.Ptr("Started"), - // Type: to.Ptr("Normal"), - // Count: to.Ptr[int32](1), - // FirstTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-11T19:33:44Z"); return t}()), - // LastTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-11T19:33:44Z"); return t}()), - // Message: to.Ptr("Started container"), - // }}, - // RestartCount: to.Ptr[int32](0), - // }, - // Ports: []*armcontainerinstance.ContainerPort{ - // }, - // Resources: &armcontainerinstance.ResourceRequirements{ - // Requests: &armcontainerinstance.ResourceRequests{ - // CPU: to.Ptr[float64](1), - // MemoryInGB: to.Ptr[float64](1), - // }, - // }, - // }, - // }}, - // InitContainers: []*armcontainerinstance.InitContainerDefinition{ - // }, - // InstanceView: &armcontainerinstance.ContainerGroupPropertiesInstanceView{ - // Events: []*armcontainerinstance.Event{ - // }, - // State: to.Ptr("Succeeded"), - // }, - // OSType: to.Ptr(armcontainerinstance.OperatingSystemTypesLinux), - // Priority: to.Ptr(armcontainerinstance.ContainerGroupPrioritySpot), - // ProvisioningState: to.Ptr("Succeeded"), - // RestartPolicy: to.Ptr(armcontainerinstance.ContainerGroupRestartPolicyNever), - // SKU: to.Ptr(armcontainerinstance.ContainerGroupSKUStandard), - // }, - // Name: to.Ptr("demo1"), - // Type: to.Ptr("Microsoft.ContainerInstance/containerGroups"), - // ID: to.Ptr("/subscriptions/subId/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1"), - // Location: to.Ptr("eastus"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupsGet_Failed.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8c9845c7190792cb95c0deda1cb787512c4c7ca1/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2022-09-01/examples/ContainerGroupsGet_Failed.json func ExampleContainerGroupsClient_Get_containerGroupsGetFailed() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -421,7 +325,7 @@ func ExampleContainerGroupsClient_Get_containerGroupsGetFailed() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupsGet_Succeeded.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8c9845c7190792cb95c0deda1cb787512c4c7ca1/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2022-09-01/examples/ContainerGroupsGet_Succeeded.json func ExampleContainerGroupsClient_Get_containerGroupsGetSucceeded() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -503,120 +407,7 @@ func ExampleContainerGroupsClient_Get_containerGroupsGetSucceeded() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupCreateConfidential.json -func ExampleContainerGroupsClient_BeginCreateOrUpdate_confidentialContainerGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerinstance.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewContainerGroupsClient().BeginCreateOrUpdate(ctx, "demo", "demo1", armcontainerinstance.ContainerGroup{ - Properties: &armcontainerinstance.ContainerGroupPropertiesProperties{ - ConfidentialComputeProperties: &armcontainerinstance.ConfidentialComputeProperties{ - CcePolicy: to.Ptr("eyJhbGxvd19hbGwiOiB0cnVlLCAiY29udGFpbmVycyI6IHsibGVuZ3RoIjogMCwgImVsZW1lbnRzIjogbnVsbH19"), - }, - Containers: []*armcontainerinstance.Container{ - { - Name: to.Ptr("accdemo"), - Properties: &armcontainerinstance.ContainerProperties{ - Command: []*string{}, - EnvironmentVariables: []*armcontainerinstance.EnvironmentVariable{}, - Image: to.Ptr("confiimage"), - Ports: []*armcontainerinstance.ContainerPort{ - { - Port: to.Ptr[int32](8000), - }}, - Resources: &armcontainerinstance.ResourceRequirements{ - Requests: &armcontainerinstance.ResourceRequests{ - CPU: to.Ptr[float64](1), - MemoryInGB: to.Ptr[float64](1.5), - }, - }, - }, - }}, - ImageRegistryCredentials: []*armcontainerinstance.ImageRegistryCredential{}, - IPAddress: &armcontainerinstance.IPAddress{ - Type: to.Ptr(armcontainerinstance.ContainerGroupIPAddressTypePublic), - Ports: []*armcontainerinstance.Port{ - { - Port: to.Ptr[int32](8000), - Protocol: to.Ptr(armcontainerinstance.ContainerGroupNetworkProtocolTCP), - }}, - }, - OSType: to.Ptr(armcontainerinstance.OperatingSystemTypesLinux), - SKU: to.Ptr(armcontainerinstance.ContainerGroupSKUConfidential), - }, - Location: to.Ptr("westeurope"), - }, 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.ContainerGroup = armcontainerinstance.ContainerGroup{ - // Properties: &armcontainerinstance.ContainerGroupPropertiesProperties{ - // ConfidentialComputeProperties: &armcontainerinstance.ConfidentialComputeProperties{ - // CcePolicy: to.Ptr("eyJhbGxvd19hbGwiOiB0cnVlLCAiY29udGFpbmVycyI6IHsibGVuZ3RoIjogMCwgImVsZW1lbnRzIjogbnVsbH19"), - // }, - // Containers: []*armcontainerinstance.Container{ - // { - // Name: to.Ptr("accdemo"), - // Properties: &armcontainerinstance.ContainerProperties{ - // Command: []*string{ - // }, - // EnvironmentVariables: []*armcontainerinstance.EnvironmentVariable{ - // }, - // Image: to.Ptr("confiimage"), - // Ports: []*armcontainerinstance.ContainerPort{ - // { - // Port: to.Ptr[int32](8000), - // }}, - // Resources: &armcontainerinstance.ResourceRequirements{ - // Requests: &armcontainerinstance.ResourceRequests{ - // CPU: to.Ptr[float64](1), - // MemoryInGB: to.Ptr[float64](1.5), - // }, - // }, - // }, - // }}, - // ImageRegistryCredentials: []*armcontainerinstance.ImageRegistryCredential{ - // }, - // InitContainers: []*armcontainerinstance.InitContainerDefinition{ - // }, - // InstanceView: &armcontainerinstance.ContainerGroupPropertiesInstanceView{ - // Events: []*armcontainerinstance.Event{ - // }, - // State: to.Ptr("Running"), - // }, - // IPAddress: &armcontainerinstance.IPAddress{ - // Type: to.Ptr(armcontainerinstance.ContainerGroupIPAddressTypePublic), - // Ports: []*armcontainerinstance.Port{ - // { - // Port: to.Ptr[int32](8000), - // Protocol: to.Ptr(armcontainerinstance.ContainerGroupNetworkProtocolTCP), - // }}, - // }, - // OSType: to.Ptr(armcontainerinstance.OperatingSystemTypesLinux), - // ProvisioningState: to.Ptr("Succeeded"), - // SKU: to.Ptr(armcontainerinstance.ContainerGroupSKUConfidential), - // }, - // Name: to.Ptr("demo1"), - // Type: to.Ptr("Microsoft.ContainerInstance/containerGroups"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroups/demo1"), - // Location: to.Ptr("westeurope"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupExtensions.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8c9845c7190792cb95c0deda1cb787512c4c7ca1/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2022-09-01/examples/ContainerGroupExtensions.json func ExampleContainerGroupsClient_BeginCreateOrUpdate_containerGroupCreateWithExtensions() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -756,14 +547,14 @@ func ExampleContainerGroupsClient_BeginCreateOrUpdate_containerGroupCreateWithEx // }, // }}, // }, - // Name: to.Ptr("demo1"), + // Name: to.Ptr("arnav-test-container-ext"), // Type: to.Ptr("Microsoft.ContainerInstance/containerGroups"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroups/demo1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroups/test-container-ext"), // Location: to.Ptr("eastus2"), // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupEncryptionProperties.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8c9845c7190792cb95c0deda1cb787512c4c7ca1/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2022-09-01/examples/ContainerGroupEncryptionProperties.json func ExampleContainerGroupsClient_BeginCreateOrUpdate_containerGroupWithEncryptionProperties() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -890,14 +681,14 @@ func ExampleContainerGroupsClient_BeginCreateOrUpdate_containerGroupWithEncrypti // ProvisioningState: to.Ptr("Succeeded"), // SKU: to.Ptr(armcontainerinstance.ContainerGroupSKUStandard), // }, - // Name: to.Ptr("demo1"), + // Name: to.Ptr("test-container-encryption"), // Type: to.Ptr("Microsoft.ContainerInstance/containerGroups"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ContainerInstance/containerGroups/demo1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ContainerInstance/containerGroups/test-container-encryption"), // Location: to.Ptr("eastus2"), // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupsCreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8c9845c7190792cb95c0deda1cb787512c4c7ca1/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2022-09-01/examples/ContainerGroupsCreateOrUpdate.json func ExampleContainerGroupsClient_BeginCreateOrUpdate_containerGroupsCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1119,97 +910,7 @@ func ExampleContainerGroupsClient_BeginCreateOrUpdate_containerGroupsCreateOrUpd // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupsCreatePriority.json -func ExampleContainerGroupsClient_BeginCreateOrUpdate_containerGroupsCreateWithPriority() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerinstance.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewContainerGroupsClient().BeginCreateOrUpdate(ctx, "demo", "demo1", armcontainerinstance.ContainerGroup{ - Properties: &armcontainerinstance.ContainerGroupPropertiesProperties{ - Containers: []*armcontainerinstance.Container{ - { - Name: to.Ptr("test-container-001"), - Properties: &armcontainerinstance.ContainerProperties{ - Command: []*string{ - to.Ptr("/bin/sh"), - to.Ptr("-c"), - to.Ptr("sleep 10")}, - Image: to.Ptr("alpine:latest"), - Resources: &armcontainerinstance.ResourceRequirements{ - Requests: &armcontainerinstance.ResourceRequests{ - CPU: to.Ptr[float64](1), - MemoryInGB: to.Ptr[float64](1), - }, - }, - }, - }}, - OSType: to.Ptr(armcontainerinstance.OperatingSystemTypesLinux), - Priority: to.Ptr(armcontainerinstance.ContainerGroupPrioritySpot), - RestartPolicy: to.Ptr(armcontainerinstance.ContainerGroupRestartPolicyNever), - SKU: to.Ptr(armcontainerinstance.ContainerGroupSKUStandard), - }, - Location: to.Ptr("eastus"), - }, 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.ContainerGroup = armcontainerinstance.ContainerGroup{ - // Properties: &armcontainerinstance.ContainerGroupPropertiesProperties{ - // Containers: []*armcontainerinstance.Container{ - // { - // Name: to.Ptr("test-container-001"), - // Properties: &armcontainerinstance.ContainerProperties{ - // Command: []*string{ - // to.Ptr("/bin/sh"), - // to.Ptr("-c"), - // to.Ptr("sleep 10")}, - // EnvironmentVariables: []*armcontainerinstance.EnvironmentVariable{ - // }, - // Image: to.Ptr("alpine:latest"), - // Ports: []*armcontainerinstance.ContainerPort{ - // }, - // Resources: &armcontainerinstance.ResourceRequirements{ - // Requests: &armcontainerinstance.ResourceRequests{ - // CPU: to.Ptr[float64](1), - // MemoryInGB: to.Ptr[float64](1), - // }, - // }, - // }, - // }}, - // InitContainers: []*armcontainerinstance.InitContainerDefinition{ - // }, - // InstanceView: &armcontainerinstance.ContainerGroupPropertiesInstanceView{ - // Events: []*armcontainerinstance.Event{ - // }, - // State: to.Ptr("Succeeded"), - // }, - // OSType: to.Ptr(armcontainerinstance.OperatingSystemTypesLinux), - // Priority: to.Ptr(armcontainerinstance.ContainerGroupPrioritySpot), - // ProvisioningState: to.Ptr("Succeeded"), - // RestartPolicy: to.Ptr(armcontainerinstance.ContainerGroupRestartPolicyNever), - // SKU: to.Ptr(armcontainerinstance.ContainerGroupSKUStandard), - // }, - // Name: to.Ptr("demo1"), - // Type: to.Ptr("Microsoft.ContainerInstance/containerGroups"), - // ID: to.Ptr("/subscriptions/subId/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1"), - // Location: to.Ptr("eastus"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupsUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8c9845c7190792cb95c0deda1cb787512c4c7ca1/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2022-09-01/examples/ContainerGroupsUpdate.json func ExampleContainerGroupsClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1316,7 +1017,7 @@ func ExampleContainerGroupsClient_Update() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupsDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8c9845c7190792cb95c0deda1cb787512c4c7ca1/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2022-09-01/examples/ContainerGroupsDelete.json func ExampleContainerGroupsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1402,7 +1103,7 @@ func ExampleContainerGroupsClient_BeginDelete() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupsRestart.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8c9845c7190792cb95c0deda1cb787512c4c7ca1/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2022-09-01/examples/ContainerGroupsRestart.json func ExampleContainerGroupsClient_BeginRestart() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1423,7 +1124,7 @@ func ExampleContainerGroupsClient_BeginRestart() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupsStop.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8c9845c7190792cb95c0deda1cb787512c4c7ca1/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2022-09-01/examples/ContainerGroupsStop.json func ExampleContainerGroupsClient_Stop() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1440,7 +1141,7 @@ func ExampleContainerGroupsClient_Stop() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupsStart.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8c9845c7190792cb95c0deda1cb787512c4c7ca1/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2022-09-01/examples/ContainerGroupsStart.json func ExampleContainerGroupsClient_BeginStart() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/containerinstance/armcontainerinstance/containers_client.go b/sdk/resourcemanager/containerinstance/armcontainerinstance/containers_client.go index 2c9525654199..4bd52cf9cb55 100644 --- a/sdk/resourcemanager/containerinstance/armcontainerinstance/containers_client.go +++ b/sdk/resourcemanager/containerinstance/armcontainerinstance/containers_client.go @@ -49,7 +49,7 @@ func NewContainersClient(subscriptionID string, credential azcore.TokenCredentia // Attach - Attach to the output stream of a specific container instance in a specified resource group and container group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01-preview +// Generated from API version 2022-09-01 // - resourceGroupName - The name of the resource group. // - containerGroupName - The name of the container group. // - containerName - The name of the container instance. @@ -93,7 +93,7 @@ func (client *ContainersClient) attachCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01-preview") + reqQP.Set("api-version", "2022-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -111,7 +111,7 @@ func (client *ContainersClient) attachHandleResponse(resp *http.Response) (Conta // ExecuteCommand - Executes a command for a specific container instance in a specified resource group and container group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01-preview +// Generated from API version 2022-09-01 // - resourceGroupName - The name of the resource group. // - containerGroupName - The name of the container group. // - containerName - The name of the container instance. @@ -157,7 +157,7 @@ func (client *ContainersClient) executeCommandCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01-preview") + reqQP.Set("api-version", "2022-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, containerExecRequest) @@ -175,7 +175,7 @@ func (client *ContainersClient) executeCommandHandleResponse(resp *http.Response // ListLogs - Get the logs for a specified container instance in a specified resource group and container group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01-preview +// Generated from API version 2022-09-01 // - resourceGroupName - The name of the resource group. // - containerGroupName - The name of the container group. // - containerName - The name of the container instance. @@ -219,7 +219,7 @@ func (client *ContainersClient) listLogsCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01-preview") + reqQP.Set("api-version", "2022-09-01") if options != nil && options.Tail != nil { reqQP.Set("tail", strconv.FormatInt(int64(*options.Tail), 10)) } diff --git a/sdk/resourcemanager/containerinstance/armcontainerinstance/containers_client_example_test.go b/sdk/resourcemanager/containerinstance/armcontainerinstance/containers_client_example_test.go index 81547fd0eb18..3511a5d4cb71 100644 --- a/sdk/resourcemanager/containerinstance/armcontainerinstance/containers_client_example_test.go +++ b/sdk/resourcemanager/containerinstance/armcontainerinstance/containers_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerListLogs.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8c9845c7190792cb95c0deda1cb787512c4c7ca1/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2022-09-01/examples/ContainerListLogs.json func ExampleContainersClient_ListLogs() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -43,7 +43,7 @@ func ExampleContainersClient_ListLogs() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerExec.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8c9845c7190792cb95c0deda1cb787512c4c7ca1/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2022-09-01/examples/ContainerExec.json func ExampleContainersClient_ExecuteCommand() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -73,7 +73,7 @@ func ExampleContainersClient_ExecuteCommand() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerAttach.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8c9845c7190792cb95c0deda1cb787512c4c7ca1/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2022-09-01/examples/ContainerAttach.json func ExampleContainersClient_Attach() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/containerinstance/armcontainerinstance/location_client.go b/sdk/resourcemanager/containerinstance/armcontainerinstance/location_client.go index e861431fe8c7..ba698650a66a 100644 --- a/sdk/resourcemanager/containerinstance/armcontainerinstance/location_client.go +++ b/sdk/resourcemanager/containerinstance/armcontainerinstance/location_client.go @@ -47,7 +47,7 @@ func NewLocationClient(subscriptionID string, credential azcore.TokenCredential, // NewListCachedImagesPager - Get the list of cached images on specific OS type for a subscription in a region. // -// Generated from API version 2022-10-01-preview +// Generated from API version 2022-09-01 // - location - The identifier for the physical azure location. // - options - LocationClientListCachedImagesOptions contains the optional parameters for the LocationClient.NewListCachedImagesPager // method. @@ -95,7 +95,7 @@ func (client *LocationClient) listCachedImagesCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01-preview") + reqQP.Set("api-version", "2022-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -112,7 +112,7 @@ func (client *LocationClient) listCachedImagesHandleResponse(resp *http.Response // NewListCapabilitiesPager - Get the list of CPU/memory/GPU capabilities of a region. // -// Generated from API version 2022-10-01-preview +// Generated from API version 2022-09-01 // - location - The identifier for the physical azure location. // - options - LocationClientListCapabilitiesOptions contains the optional parameters for the LocationClient.NewListCapabilitiesPager // method. @@ -160,7 +160,7 @@ func (client *LocationClient) listCapabilitiesCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01-preview") + reqQP.Set("api-version", "2022-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -177,7 +177,7 @@ func (client *LocationClient) listCapabilitiesHandleResponse(resp *http.Response // NewListUsagePager - Get the usage for a subscription // -// Generated from API version 2022-10-01-preview +// Generated from API version 2022-09-01 // - location - The identifier for the physical azure location. // - options - LocationClientListUsageOptions contains the optional parameters for the LocationClient.NewListUsagePager method. func (client *LocationClient) NewListUsagePager(location string, options *LocationClientListUsageOptions) *runtime.Pager[LocationClientListUsageResponse] { @@ -218,7 +218,7 @@ func (client *LocationClient) listUsageCreateRequest(ctx context.Context, locati return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01-preview") + reqQP.Set("api-version", "2022-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/containerinstance/armcontainerinstance/location_client_example_test.go b/sdk/resourcemanager/containerinstance/armcontainerinstance/location_client_example_test.go index 5a3a97d9cdad..2c7834e9a04a 100644 --- a/sdk/resourcemanager/containerinstance/armcontainerinstance/location_client_example_test.go +++ b/sdk/resourcemanager/containerinstance/armcontainerinstance/location_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupUsage.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8c9845c7190792cb95c0deda1cb787512c4c7ca1/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2022-09-01/examples/ContainerGroupUsage.json func ExampleLocationClient_NewListUsagePager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -54,7 +54,7 @@ func ExampleLocationClient_NewListUsagePager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/CachedImagesList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8c9845c7190792cb95c0deda1cb787512c4c7ca1/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2022-09-01/examples/CachedImagesList.json func ExampleLocationClient_NewListCachedImagesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -94,7 +94,7 @@ func ExampleLocationClient_NewListCachedImagesPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/CapabilitiesList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8c9845c7190792cb95c0deda1cb787512c4c7ca1/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2022-09-01/examples/CapabilitiesList.json func ExampleLocationClient_NewListCapabilitiesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/containerinstance/armcontainerinstance/models.go b/sdk/resourcemanager/containerinstance/armcontainerinstance/models.go index 1296359385e0..cad617815d29 100644 --- a/sdk/resourcemanager/containerinstance/armcontainerinstance/models.go +++ b/sdk/resourcemanager/containerinstance/armcontainerinstance/models.go @@ -86,12 +86,6 @@ type CapabilitiesListResult struct { Value []*Capabilities `json:"value,omitempty"` } -// ConfidentialComputeProperties - The properties for confidential container group -type ConfidentialComputeProperties struct { - // The base64 encoded confidential compute enforcement policy - CcePolicy *string `json:"ccePolicy,omitempty"` -} - // Container - A container instance. type Container struct { // REQUIRED; The user-provided name of the container instance. @@ -230,9 +224,6 @@ type ContainerGroupPropertiesProperties struct { // REQUIRED; The operating system type required by the containers in the container group. OSType *OperatingSystemTypes `json:"osType,omitempty"` - // The properties for confidential container group - ConfidentialComputeProperties *ConfidentialComputeProperties `json:"confidentialComputeProperties,omitempty"` - // The DNS config information for a container group. DNSConfig *DNSConfiguration `json:"dnsConfig,omitempty"` @@ -254,9 +245,6 @@ type ContainerGroupPropertiesProperties struct { // The init containers for a container group. InitContainers []*InitContainerDefinition `json:"initContainers,omitempty"` - // The priority of the container group. - Priority *ContainerGroupPriority `json:"priority,omitempty"` - // Restart policy for all containers within the container group. // * Always Always restart // * OnFailure Restart on failure diff --git a/sdk/resourcemanager/containerinstance/armcontainerinstance/models_serde.go b/sdk/resourcemanager/containerinstance/armcontainerinstance/models_serde.go index 6c2593337890..11fd2fa910e1 100644 --- a/sdk/resourcemanager/containerinstance/armcontainerinstance/models_serde.go +++ b/sdk/resourcemanager/containerinstance/armcontainerinstance/models_serde.go @@ -230,33 +230,6 @@ func (c *CapabilitiesListResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ConfidentialComputeProperties. -func (c ConfidentialComputeProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "ccePolicy", c.CcePolicy) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfidentialComputeProperties. -func (c *ConfidentialComputeProperties) 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 "ccePolicy": - err = unpopulate(val, "CcePolicy", &c.CcePolicy) - 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 Container. func (c Container) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -656,7 +629,6 @@ func (c *ContainerGroupPropertiesInstanceView) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ContainerGroupPropertiesProperties. func (c ContainerGroupPropertiesProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "confidentialComputeProperties", c.ConfidentialComputeProperties) populate(objectMap, "containers", c.Containers) populate(objectMap, "dnsConfig", c.DNSConfig) populate(objectMap, "diagnostics", c.Diagnostics) @@ -667,7 +639,6 @@ func (c ContainerGroupPropertiesProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "initContainers", c.InitContainers) populate(objectMap, "instanceView", c.InstanceView) populate(objectMap, "osType", c.OSType) - populate(objectMap, "priority", c.Priority) populate(objectMap, "provisioningState", c.ProvisioningState) populate(objectMap, "restartPolicy", c.RestartPolicy) populate(objectMap, "sku", c.SKU) @@ -685,9 +656,6 @@ func (c *ContainerGroupPropertiesProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "confidentialComputeProperties": - err = unpopulate(val, "ConfidentialComputeProperties", &c.ConfidentialComputeProperties) - delete(rawMsg, key) case "containers": err = unpopulate(val, "Containers", &c.Containers) delete(rawMsg, key) @@ -718,9 +686,6 @@ func (c *ContainerGroupPropertiesProperties) UnmarshalJSON(data []byte) error { case "osType": err = unpopulate(val, "OSType", &c.OSType) delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &c.Priority) - delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) delete(rawMsg, key) diff --git a/sdk/resourcemanager/containerinstance/armcontainerinstance/operations_client.go b/sdk/resourcemanager/containerinstance/armcontainerinstance/operations_client.go index 7febd6b1f7fe..ccc128186dca 100644 --- a/sdk/resourcemanager/containerinstance/armcontainerinstance/operations_client.go +++ b/sdk/resourcemanager/containerinstance/armcontainerinstance/operations_client.go @@ -40,7 +40,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - List the operations for Azure Container Instance service. // -// Generated from API version 2022-10-01-preview +// Generated from API version 2022-09-01 // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -78,7 +78,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01-preview") + reqQP.Set("api-version", "2022-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/containerinstance/armcontainerinstance/operations_client_example_test.go b/sdk/resourcemanager/containerinstance/armcontainerinstance/operations_client_example_test.go index 9e367a535d80..bcb4169023aa 100644 --- a/sdk/resourcemanager/containerinstance/armcontainerinstance/operations_client_example_test.go +++ b/sdk/resourcemanager/containerinstance/armcontainerinstance/operations_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/OperationsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8c9845c7190792cb95c0deda1cb787512c4c7ca1/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2022-09-01/examples/OperationsList.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/containerinstance/armcontainerinstance/subnetserviceassociationlink_client.go b/sdk/resourcemanager/containerinstance/armcontainerinstance/subnetserviceassociationlink_client.go index cfaaf3a228d6..8ada4bc28e7c 100644 --- a/sdk/resourcemanager/containerinstance/armcontainerinstance/subnetserviceassociationlink_client.go +++ b/sdk/resourcemanager/containerinstance/armcontainerinstance/subnetserviceassociationlink_client.go @@ -49,7 +49,7 @@ func NewSubnetServiceAssociationLinkClient(subscriptionID string, credential azc // by the user. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01-preview +// Generated from API version 2022-09-01 // - resourceGroupName - The name of the resource group. // - virtualNetworkName - The name of the virtual network. // - subnetName - The name of the subnet. @@ -71,7 +71,7 @@ func (client *SubnetServiceAssociationLinkClient) BeginDelete(ctx context.Contex // by the user. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01-preview +// Generated from API version 2022-09-01 func (client *SubnetServiceAssociationLinkClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *SubnetServiceAssociationLinkClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualNetworkName, subnetName, options) if err != nil { @@ -111,7 +111,7 @@ func (client *SubnetServiceAssociationLinkClient) deleteCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01-preview") + reqQP.Set("api-version", "2022-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/containerinstance/armcontainerinstance/subnetserviceassociationlink_client_example_test.go b/sdk/resourcemanager/containerinstance/armcontainerinstance/subnetserviceassociationlink_client_example_test.go index 0bff12b38d77..0e96651dcc12 100644 --- a/sdk/resourcemanager/containerinstance/armcontainerinstance/subnetserviceassociationlink_client_example_test.go +++ b/sdk/resourcemanager/containerinstance/armcontainerinstance/subnetserviceassociationlink_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71121282e39bccae590462648e77bca283df6d2b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/SubnetServiceAssociationLinkDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8c9845c7190792cb95c0deda1cb787512c4c7ca1/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2022-09-01/examples/SubnetServiceAssociationLinkDelete.json func ExampleSubnetServiceAssociationLinkClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/CHANGELOG.md b/sdk/resourcemanager/cosmos/armcosmos/CHANGELOG.md index 3ec61252d287..f0e823898da3 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/CHANGELOG.md +++ b/sdk/resourcemanager/cosmos/armcosmos/CHANGELOG.md @@ -1,171 +1,9 @@ # Release History -## 2.3.0-beta.1 (2023-03-24) +## 2.3.0 (2023-04-07) ### Features Added - New struct `ClientFactory` which is a client factory used to create any client in this module -- New value `AuthenticationMethodLdap` added to enum type `AuthenticationMethod` -- New value `OperationTypeRecreate` added to enum type `OperationType` -- New enum type `ContinuousTier` with values `ContinuousTierContinuous30Days`, `ContinuousTierContinuous7Days` -- New enum type `DataTransferComponent` with values `DataTransferComponentAzureBlobStorage`, `DataTransferComponentCosmosDBCassandra`, `DataTransferComponentCosmosDBSQL` -- New enum type `EnableFullTextQuery` with values `EnableFullTextQueryFalse`, `EnableFullTextQueryNone`, `EnableFullTextQueryTrue` -- New enum type `ThroughputPolicyType` with values `ThroughputPolicyTypeCustom`, `ThroughputPolicyTypeEqual`, `ThroughputPolicyTypeNone` -- New function `*AzureBlobDataTransferDataSourceSink.GetDataTransferDataSourceSink() *DataTransferDataSourceSink` -- New function `*CassandraClustersClient.GetBackup(context.Context, string, string, string, *CassandraClustersClientGetBackupOptions) (CassandraClustersClientGetBackupResponse, error)` -- New function `*CassandraClustersClient.NewListBackupsPager(string, string, *CassandraClustersClientListBackupsOptions) *runtime.Pager[CassandraClustersClientListBackupsResponse]` -- New function `*CassandraDataTransferDataSourceSink.GetDataTransferDataSourceSink() *DataTransferDataSourceSink` -- New function `*CassandraResourcesClient.BeginCreateUpdateCassandraView(context.Context, string, string, string, string, CassandraViewCreateUpdateParameters, *CassandraResourcesClientBeginCreateUpdateCassandraViewOptions) (*runtime.Poller[CassandraResourcesClientCreateUpdateCassandraViewResponse], error)` -- New function `*CassandraResourcesClient.BeginDeleteCassandraView(context.Context, string, string, string, string, *CassandraResourcesClientBeginDeleteCassandraViewOptions) (*runtime.Poller[CassandraResourcesClientDeleteCassandraViewResponse], error)` -- New function `*CassandraResourcesClient.GetCassandraView(context.Context, string, string, string, string, *CassandraResourcesClientGetCassandraViewOptions) (CassandraResourcesClientGetCassandraViewResponse, error)` -- New function `*CassandraResourcesClient.GetCassandraViewThroughput(context.Context, string, string, string, string, *CassandraResourcesClientGetCassandraViewThroughputOptions) (CassandraResourcesClientGetCassandraViewThroughputResponse, error)` -- New function `*CassandraResourcesClient.NewListCassandraViewsPager(string, string, string, *CassandraResourcesClientListCassandraViewsOptions) *runtime.Pager[CassandraResourcesClientListCassandraViewsResponse]` -- New function `*CassandraResourcesClient.BeginMigrateCassandraViewToAutoscale(context.Context, string, string, string, string, *CassandraResourcesClientBeginMigrateCassandraViewToAutoscaleOptions) (*runtime.Poller[CassandraResourcesClientMigrateCassandraViewToAutoscaleResponse], error)` -- New function `*CassandraResourcesClient.BeginMigrateCassandraViewToManualThroughput(context.Context, string, string, string, string, *CassandraResourcesClientBeginMigrateCassandraViewToManualThroughputOptions) (*runtime.Poller[CassandraResourcesClientMigrateCassandraViewToManualThroughputResponse], error)` -- New function `*CassandraResourcesClient.BeginUpdateCassandraViewThroughput(context.Context, string, string, string, string, ThroughputSettingsUpdateParameters, *CassandraResourcesClientBeginUpdateCassandraViewThroughputOptions) (*runtime.Poller[CassandraResourcesClientUpdateCassandraViewThroughputResponse], error)` -- New function `*DataTransferDataSourceSink.GetDataTransferDataSourceSink() *DataTransferDataSourceSink` -- New function `NewDataTransferJobsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DataTransferJobsClient, error)` -- New function `*DataTransferJobsClient.Cancel(context.Context, string, string, string, *DataTransferJobsClientCancelOptions) (DataTransferJobsClientCancelResponse, error)` -- New function `*DataTransferJobsClient.Create(context.Context, string, string, string, CreateJobRequest, *DataTransferJobsClientCreateOptions) (DataTransferJobsClientCreateResponse, error)` -- New function `*DataTransferJobsClient.Get(context.Context, string, string, string, *DataTransferJobsClientGetOptions) (DataTransferJobsClientGetResponse, error)` -- New function `*DataTransferJobsClient.NewListByDatabaseAccountPager(string, string, *DataTransferJobsClientListByDatabaseAccountOptions) *runtime.Pager[DataTransferJobsClientListByDatabaseAccountResponse]` -- New function `*DataTransferJobsClient.Pause(context.Context, string, string, string, *DataTransferJobsClientPauseOptions) (DataTransferJobsClientPauseResponse, error)` -- New function `*DataTransferJobsClient.Resume(context.Context, string, string, string, *DataTransferJobsClientResumeOptions) (DataTransferJobsClientResumeResponse, error)` -- New function `NewGraphResourcesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*GraphResourcesClient, error)` -- New function `*GraphResourcesClient.BeginCreateUpdateGraph(context.Context, string, string, string, GraphResourceCreateUpdateParameters, *GraphResourcesClientBeginCreateUpdateGraphOptions) (*runtime.Poller[GraphResourcesClientCreateUpdateGraphResponse], error)` -- New function `*GraphResourcesClient.BeginDeleteGraphResource(context.Context, string, string, string, *GraphResourcesClientBeginDeleteGraphResourceOptions) (*runtime.Poller[GraphResourcesClientDeleteGraphResourceResponse], error)` -- New function `*GraphResourcesClient.GetGraph(context.Context, string, string, string, *GraphResourcesClientGetGraphOptions) (GraphResourcesClientGetGraphResponse, error)` -- New function `*GraphResourcesClient.NewListGraphsPager(string, string, *GraphResourcesClientListGraphsOptions) *runtime.Pager[GraphResourcesClientListGraphsResponse]` -- New function `*MongoDBResourcesClient.BeginListMongoDBCollectionPartitionMerge(context.Context, string, string, string, string, MergeParameters, *MongoDBResourcesClientBeginListMongoDBCollectionPartitionMergeOptions) (*runtime.Poller[MongoDBResourcesClientListMongoDBCollectionPartitionMergeResponse], error)` -- New function `*MongoDBResourcesClient.BeginMongoDBContainerRedistributeThroughput(context.Context, string, string, string, string, RedistributeThroughputParameters, *MongoDBResourcesClientBeginMongoDBContainerRedistributeThroughputOptions) (*runtime.Poller[MongoDBResourcesClientMongoDBContainerRedistributeThroughputResponse], error)` -- New function `*MongoDBResourcesClient.BeginMongoDBContainerRetrieveThroughputDistribution(context.Context, string, string, string, string, RetrieveThroughputParameters, *MongoDBResourcesClientBeginMongoDBContainerRetrieveThroughputDistributionOptions) (*runtime.Poller[MongoDBResourcesClientMongoDBContainerRetrieveThroughputDistributionResponse], error)` -- New function `*MongoDBResourcesClient.BeginMongoDBDatabaseRedistributeThroughput(context.Context, string, string, string, RedistributeThroughputParameters, *MongoDBResourcesClientBeginMongoDBDatabaseRedistributeThroughputOptions) (*runtime.Poller[MongoDBResourcesClientMongoDBDatabaseRedistributeThroughputResponse], error)` -- New function `*MongoDBResourcesClient.BeginMongoDBDatabaseRetrieveThroughputDistribution(context.Context, string, string, string, RetrieveThroughputParameters, *MongoDBResourcesClientBeginMongoDBDatabaseRetrieveThroughputDistributionOptions) (*runtime.Poller[MongoDBResourcesClientMongoDBDatabaseRetrieveThroughputDistributionResponse], error)` -- New function `*SQLDataTransferDataSourceSink.GetDataTransferDataSourceSink() *DataTransferDataSourceSink` -- New function `*SQLResourcesClient.BeginListSQLContainerPartitionMerge(context.Context, string, string, string, string, MergeParameters, *SQLResourcesClientBeginListSQLContainerPartitionMergeOptions) (*runtime.Poller[SQLResourcesClientListSQLContainerPartitionMergeResponse], error)` -- New function `*SQLResourcesClient.BeginSQLContainerRedistributeThroughput(context.Context, string, string, string, string, RedistributeThroughputParameters, *SQLResourcesClientBeginSQLContainerRedistributeThroughputOptions) (*runtime.Poller[SQLResourcesClientSQLContainerRedistributeThroughputResponse], error)` -- New function `*SQLResourcesClient.BeginSQLContainerRetrieveThroughputDistribution(context.Context, string, string, string, string, RetrieveThroughputParameters, *SQLResourcesClientBeginSQLContainerRetrieveThroughputDistributionOptions) (*runtime.Poller[SQLResourcesClientSQLContainerRetrieveThroughputDistributionResponse], error)` -- New function `*SQLResourcesClient.BeginSQLDatabaseRedistributeThroughput(context.Context, string, string, string, RedistributeThroughputParameters, *SQLResourcesClientBeginSQLDatabaseRedistributeThroughputOptions) (*runtime.Poller[SQLResourcesClientSQLDatabaseRedistributeThroughputResponse], error)` -- New function `*SQLResourcesClient.BeginSQLDatabaseRetrieveThroughputDistribution(context.Context, string, string, string, RetrieveThroughputParameters, *SQLResourcesClientBeginSQLDatabaseRetrieveThroughputDistributionOptions) (*runtime.Poller[SQLResourcesClientSQLDatabaseRetrieveThroughputDistributionResponse], error)` -- New struct `AuthenticationMethodLdapProperties` -- New struct `AzureBlobDataTransferDataSourceSink` -- New struct `BackupResource` -- New struct `BackupResourceProperties` -- New struct `CassandraDataTransferDataSourceSink` -- New struct `CassandraViewCreateUpdateParameters` -- New struct `CassandraViewCreateUpdateProperties` -- New struct `CassandraViewGetProperties` -- New struct `CassandraViewGetPropertiesOptions` -- New struct `CassandraViewGetPropertiesResource` -- New struct `CassandraViewGetResults` -- New struct `CassandraViewListResult` -- New struct `CassandraViewResource` -- New struct `ContinuousModeProperties` -- New struct `CreateJobRequest` -- New struct `DataTransferJobFeedResults` -- New struct `DataTransferJobGetResults` -- New struct `DataTransferJobProperties` -- New struct `DiagnosticLogSettings` -- New struct `GraphResource` -- New struct `GraphResourceCreateUpdateParameters` -- New struct `GraphResourceCreateUpdateProperties` -- New struct `GraphResourceGetProperties` -- New struct `GraphResourceGetPropertiesOptions` -- New struct `GraphResourceGetPropertiesResource` -- New struct `GraphResourceGetResults` -- New struct `GraphResourcesListResult` -- New struct `ListBackups` -- New struct `MergeParameters` -- New struct `PhysicalPartitionID` -- New struct `PhysicalPartitionStorageInfo` -- New struct `PhysicalPartitionStorageInfoCollection` -- New struct `PhysicalPartitionThroughputInfoProperties` -- New struct `PhysicalPartitionThroughputInfoResource` -- New struct `PhysicalPartitionThroughputInfoResult` -- New struct `PhysicalPartitionThroughputInfoResultProperties` -- New struct `PhysicalPartitionThroughputInfoResultPropertiesResource` -- New struct `RedistributeThroughputParameters` -- New struct `RedistributeThroughputProperties` -- New struct `RedistributeThroughputPropertiesResource` -- New struct `ResourceRestoreParameters` -- New struct `RestoreParametersBase` -- New struct `RetrieveThroughputParameters` -- New struct `RetrieveThroughputProperties` -- New struct `RetrieveThroughputPropertiesResource` -- New struct `SQLDataTransferDataSourceSink` -- New field `Identity` in struct `ARMResourceProperties` -- New field `Identity` in struct `CassandraKeyspaceCreateUpdateParameters` -- New field `Identity` in struct `CassandraKeyspaceGetResults` -- New field `Identity` in struct `CassandraTableCreateUpdateParameters` -- New field `Identity` in struct `CassandraTableGetResults` -- New field `ContinuousModeProperties` in struct `ContinuousModeBackupPolicy` -- New field `AuthenticationMethodLdapProperties` in struct `DataCenterResourceProperties` -- New field `DiagnosticLogSettings` in struct `DatabaseAccountCreateUpdateProperties` -- New field `EnableBurstCapacity` in struct `DatabaseAccountCreateUpdateProperties` -- New field `EnableMaterializedViews` in struct `DatabaseAccountCreateUpdateProperties` -- New field `DiagnosticLogSettings` in struct `DatabaseAccountGetProperties` -- New field `EnableBurstCapacity` in struct `DatabaseAccountGetProperties` -- New field `EnableMaterializedViews` in struct `DatabaseAccountGetProperties` -- New field `DiagnosticLogSettings` in struct `DatabaseAccountUpdateProperties` -- New field `EnableBurstCapacity` in struct `DatabaseAccountUpdateProperties` -- New field `EnableMaterializedViews` in struct `DatabaseAccountUpdateProperties` -- New field `Identity` in struct `GremlinDatabaseCreateUpdateParameters` -- New field `CreateMode` in struct `GremlinDatabaseGetPropertiesResource` -- New field `RestoreParameters` in struct `GremlinDatabaseGetPropertiesResource` -- New field `Identity` in struct `GremlinDatabaseGetResults` -- New field `CreateMode` in struct `GremlinDatabaseResource` -- New field `RestoreParameters` in struct `GremlinDatabaseResource` -- New field `Identity` in struct `GremlinGraphCreateUpdateParameters` -- New field `CreateMode` in struct `GremlinGraphGetPropertiesResource` -- New field `RestoreParameters` in struct `GremlinGraphGetPropertiesResource` -- New field `Identity` in struct `GremlinGraphGetResults` -- New field `CreateMode` in struct `GremlinGraphResource` -- New field `RestoreParameters` in struct `GremlinGraphResource` -- New field `Status` in struct `LocationProperties` -- New field `Identity` in struct `MongoDBCollectionCreateUpdateParameters` -- New field `CreateMode` in struct `MongoDBCollectionGetPropertiesResource` -- New field `RestoreParameters` in struct `MongoDBCollectionGetPropertiesResource` -- New field `Identity` in struct `MongoDBCollectionGetResults` -- New field `CreateMode` in struct `MongoDBCollectionResource` -- New field `RestoreParameters` in struct `MongoDBCollectionResource` -- New field `Identity` in struct `MongoDBDatabaseCreateUpdateParameters` -- New field `CreateMode` in struct `MongoDBDatabaseGetPropertiesResource` -- New field `RestoreParameters` in struct `MongoDBDatabaseGetPropertiesResource` -- New field `Identity` in struct `MongoDBDatabaseGetResults` -- New field `CreateMode` in struct `MongoDBDatabaseResource` -- New field `RestoreParameters` in struct `MongoDBDatabaseResource` -- New field `OldestRestorableTime` in struct `RestorableDatabaseAccountProperties` -- New field `CreateMode` in struct `RestorableSQLContainerPropertiesResourceContainer` -- New field `RestoreParameters` in struct `RestorableSQLContainerPropertiesResourceContainer` -- New field `CreateMode` in struct `RestorableSQLDatabasePropertiesResourceDatabase` -- New field `RestoreParameters` in struct `RestorableSQLDatabasePropertiesResourceDatabase` -- New field `SourceBackupLocation` in struct `RestoreParameters` -- New field `Identity` in struct `SQLContainerCreateUpdateParameters` -- New field `CreateMode` in struct `SQLContainerGetPropertiesResource` -- New field `RestoreParameters` in struct `SQLContainerGetPropertiesResource` -- New field `Identity` in struct `SQLContainerGetResults` -- New field `CreateMode` in struct `SQLContainerResource` -- New field `RestoreParameters` in struct `SQLContainerResource` -- New field `Identity` in struct `SQLDatabaseCreateUpdateParameters` -- New field `CreateMode` in struct `SQLDatabaseGetPropertiesResource` -- New field `RestoreParameters` in struct `SQLDatabaseGetPropertiesResource` -- New field `Identity` in struct `SQLDatabaseGetResults` -- New field `CreateMode` in struct `SQLDatabaseResource` -- New field `RestoreParameters` in struct `SQLDatabaseResource` -- New field `Identity` in struct `SQLStoredProcedureCreateUpdateParameters` -- New field `Identity` in struct `SQLStoredProcedureGetResults` -- New field `Identity` in struct `SQLTriggerCreateUpdateParameters` -- New field `Identity` in struct `SQLTriggerGetResults` -- New field `Identity` in struct `SQLUserDefinedFunctionCreateUpdateParameters` -- New field `Identity` in struct `SQLUserDefinedFunctionGetResults` -- New field `Identity` in struct `TableCreateUpdateParameters` -- New field `CreateMode` in struct `TableGetPropertiesResource` -- New field `RestoreParameters` in struct `TableGetPropertiesResource` -- New field `Identity` in struct `TableGetResults` -- New field `CreateMode` in struct `TableResource` -- New field `RestoreParameters` in struct `TableResource` -- New field `Identity` in struct `ThroughputSettingsGetResults` -- New field `Identity` in struct `ThroughputSettingsUpdateParameters` - ## 2.2.0 (2023-02-24) ### Features Added diff --git a/sdk/resourcemanager/cosmos/armcosmos/autorest.md b/sdk/resourcemanager/cosmos/armcosmos/autorest.md index 391425c4222b..1da017271b5a 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/autorest.md +++ b/sdk/resourcemanager/cosmos/armcosmos/autorest.md @@ -5,8 +5,8 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 2.3.0-beta.1 +module-version: 2.3.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/cosmos/armcosmos/cassandraclusters_client.go b/sdk/resourcemanager/cosmos/armcosmos/cassandraclusters_client.go index d07b4dbd5471..7b61ce62e044 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/cassandraclusters_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/cassandraclusters_client.go @@ -48,7 +48,7 @@ func NewCassandraClustersClient(subscriptionID string, credential azcore.TokenCr // To update only some properties, use PATCH. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - body - The properties specifying the desired state of the managed Cassandra cluster. @@ -70,7 +70,7 @@ func (client *CassandraClustersClient) BeginCreateUpdate(ctx context.Context, re // update only some properties, use PATCH. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *CassandraClustersClient) createUpdate(ctx context.Context, resourceGroupName string, clusterName string, body ClusterResource, options *CassandraClustersClientBeginCreateUpdateOptions) (*http.Response, error) { req, err := client.createUpdateCreateRequest(ctx, resourceGroupName, clusterName, body, options) if err != nil { @@ -106,7 +106,7 @@ func (client *CassandraClustersClient) createUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -117,7 +117,7 @@ func (client *CassandraClustersClient) createUpdateCreateRequest(ctx context.Con // already deallocated cluster. Use Start to restart the cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - options - CassandraClustersClientBeginDeallocateOptions contains the optional parameters for the CassandraClustersClient.BeginDeallocate @@ -139,7 +139,7 @@ func (client *CassandraClustersClient) BeginDeallocate(ctx context.Context, reso // already deallocated cluster. Use Start to restart the cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *CassandraClustersClient) deallocate(ctx context.Context, resourceGroupName string, clusterName string, options *CassandraClustersClientBeginDeallocateOptions) (*http.Response, error) { req, err := client.deallocateCreateRequest(ctx, resourceGroupName, clusterName, options) if err != nil { @@ -175,7 +175,7 @@ func (client *CassandraClustersClient) deallocateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -184,7 +184,7 @@ func (client *CassandraClustersClient) deallocateCreateRequest(ctx context.Conte // BeginDelete - Deletes a managed Cassandra cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - options - CassandraClustersClientBeginDeleteOptions contains the optional parameters for the CassandraClustersClient.BeginDelete @@ -204,7 +204,7 @@ func (client *CassandraClustersClient) BeginDelete(ctx context.Context, resource // Delete - Deletes a managed Cassandra cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *CassandraClustersClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, options *CassandraClustersClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, options) if err != nil { @@ -240,7 +240,7 @@ func (client *CassandraClustersClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +249,7 @@ func (client *CassandraClustersClient) deleteCreateRequest(ctx context.Context, // Get - Get the properties of a managed Cassandra cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - options - CassandraClustersClientGetOptions contains the optional parameters for the CassandraClustersClient.Get method. @@ -288,7 +288,7 @@ func (client *CassandraClustersClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -303,73 +303,10 @@ func (client *CassandraClustersClient) getHandleResponse(resp *http.Response) (C return result, nil } -// GetBackup - Get the properties of an individual backup of this cluster that is available to restore. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - clusterName - Managed Cassandra cluster name. -// - backupID - Id of a restorable backup of a Cassandra cluster. -// - options - CassandraClustersClientGetBackupOptions contains the optional parameters for the CassandraClustersClient.GetBackup -// method. -func (client *CassandraClustersClient) GetBackup(ctx context.Context, resourceGroupName string, clusterName string, backupID string, options *CassandraClustersClientGetBackupOptions) (CassandraClustersClientGetBackupResponse, error) { - req, err := client.getBackupCreateRequest(ctx, resourceGroupName, clusterName, backupID, options) - if err != nil { - return CassandraClustersClientGetBackupResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return CassandraClustersClientGetBackupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CassandraClustersClientGetBackupResponse{}, runtime.NewResponseError(resp) - } - return client.getBackupHandleResponse(resp) -} - -// getBackupCreateRequest creates the GetBackup request. -func (client *CassandraClustersClient) getBackupCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, backupID string, options *CassandraClustersClientGetBackupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups/{backupId}" - 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 clusterName == "" { - return nil, errors.New("parameter clusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) - if backupID == "" { - return nil, errors.New("parameter backupID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupId}", url.PathEscape(backupID)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getBackupHandleResponse handles the GetBackup response. -func (client *CassandraClustersClient) getBackupHandleResponse(resp *http.Response) (CassandraClustersClientGetBackupResponse, error) { - result := CassandraClustersClientGetBackupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupResource); err != nil { - return CassandraClustersClientGetBackupResponse{}, err - } - return result, nil -} - // BeginInvokeCommand - Invoke a command like nodetool for cassandra maintenance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - body - Specification which command to run where @@ -390,7 +327,7 @@ func (client *CassandraClustersClient) BeginInvokeCommand(ctx context.Context, r // InvokeCommand - Invoke a command like nodetool for cassandra maintenance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *CassandraClustersClient) invokeCommand(ctx context.Context, resourceGroupName string, clusterName string, body CommandPostBody, options *CassandraClustersClientBeginInvokeCommandOptions) (*http.Response, error) { req, err := client.invokeCommandCreateRequest(ctx, resourceGroupName, clusterName, body, options) if err != nil { @@ -426,79 +363,15 @@ func (client *CassandraClustersClient) invokeCommandCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) } -// NewListBackupsPager - List the backups of this cluster that are available to restore. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - clusterName - Managed Cassandra cluster name. -// - options - CassandraClustersClientListBackupsOptions contains the optional parameters for the CassandraClustersClient.NewListBackupsPager -// method. -func (client *CassandraClustersClient) NewListBackupsPager(resourceGroupName string, clusterName string, options *CassandraClustersClientListBackupsOptions) *runtime.Pager[CassandraClustersClientListBackupsResponse] { - return runtime.NewPager(runtime.PagingHandler[CassandraClustersClientListBackupsResponse]{ - More: func(page CassandraClustersClientListBackupsResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *CassandraClustersClientListBackupsResponse) (CassandraClustersClientListBackupsResponse, error) { - req, err := client.listBackupsCreateRequest(ctx, resourceGroupName, clusterName, options) - if err != nil { - return CassandraClustersClientListBackupsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return CassandraClustersClientListBackupsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CassandraClustersClientListBackupsResponse{}, runtime.NewResponseError(resp) - } - return client.listBackupsHandleResponse(resp) - }, - }) -} - -// listBackupsCreateRequest creates the ListBackups request. -func (client *CassandraClustersClient) listBackupsCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *CassandraClustersClientListBackupsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups" - 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 clusterName == "" { - return nil, errors.New("parameter clusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBackupsHandleResponse handles the ListBackups response. -func (client *CassandraClustersClient) listBackupsHandleResponse(resp *http.Response) (CassandraClustersClientListBackupsResponse, error) { - result := CassandraClustersClientListBackupsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListBackups); err != nil { - return CassandraClustersClientListBackupsResponse{}, err - } - return result, nil -} - // NewListByResourceGroupPager - List all managed Cassandra clusters in this resource group. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - CassandraClustersClientListByResourceGroupOptions contains the optional parameters for the CassandraClustersClient.NewListByResourceGroupPager // method. @@ -540,7 +413,7 @@ func (client *CassandraClustersClient) listByResourceGroupCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -557,7 +430,7 @@ func (client *CassandraClustersClient) listByResourceGroupHandleResponse(resp *h // NewListBySubscriptionPager - List all managed Cassandra clusters in this subscription. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - options - CassandraClustersClientListBySubscriptionOptions contains the optional parameters for the CassandraClustersClient.NewListBySubscriptionPager // method. func (client *CassandraClustersClient) NewListBySubscriptionPager(options *CassandraClustersClientListBySubscriptionOptions) *runtime.Pager[CassandraClustersClientListBySubscriptionResponse] { @@ -594,7 +467,7 @@ func (client *CassandraClustersClient) listBySubscriptionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -614,7 +487,7 @@ func (client *CassandraClustersClient) listBySubscriptionHandleResponse(resp *ht // cluster. Use Deallocate to deallocate the cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - options - CassandraClustersClientBeginStartOptions contains the optional parameters for the CassandraClustersClient.BeginStart @@ -636,7 +509,7 @@ func (client *CassandraClustersClient) BeginStart(ctx context.Context, resourceG // cluster. Use Deallocate to deallocate the cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *CassandraClustersClient) start(ctx context.Context, resourceGroupName string, clusterName string, options *CassandraClustersClientBeginStartOptions) (*http.Response, error) { req, err := client.startCreateRequest(ctx, resourceGroupName, clusterName, options) if err != nil { @@ -672,7 +545,7 @@ func (client *CassandraClustersClient) startCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -681,7 +554,7 @@ func (client *CassandraClustersClient) startCreateRequest(ctx context.Context, r // Status - Gets the CPU, memory, and disk usage statistics for each Cassandra node in a cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - options - CassandraClustersClientStatusOptions contains the optional parameters for the CassandraClustersClient.Status @@ -721,7 +594,7 @@ func (client *CassandraClustersClient) statusCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -739,7 +612,7 @@ func (client *CassandraClustersClient) statusHandleResponse(resp *http.Response) // BeginUpdate - Updates some of the properties of a managed Cassandra cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - body - Parameters to provide for specifying the managed Cassandra cluster. @@ -760,7 +633,7 @@ func (client *CassandraClustersClient) BeginUpdate(ctx context.Context, resource // Update - Updates some of the properties of a managed Cassandra cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *CassandraClustersClient) update(ctx context.Context, resourceGroupName string, clusterName string, body ClusterResource, options *CassandraClustersClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, clusterName, body, options) if err != nil { @@ -796,7 +669,7 @@ func (client *CassandraClustersClient) updateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) diff --git a/sdk/resourcemanager/cosmos/armcosmos/cassandraclusters_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/cassandraclusters_client_example_test.go index e51fccd24073..77987b264568 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/cassandraclusters_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/cassandraclusters_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBManagedCassandraClusterListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBManagedCassandraClusterListBySubscription.json func ExampleCassandraClustersClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -45,7 +45,7 @@ func ExampleCassandraClustersClient_NewListBySubscriptionPager() { // { // Name: to.Ptr("cassandra-prod"), // Type: to.Ptr("Microsoft.DocumentDB/cassandraClusters"), - // ID: to.Ptr("/subscriptions/subid/providers/Microsoft.DocumentDB/cassandraClusters"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/cassandraClusters"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, @@ -103,7 +103,7 @@ func ExampleCassandraClustersClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBManagedCassandraClusterListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBManagedCassandraClusterListByResourceGroup.json func ExampleCassandraClustersClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -130,7 +130,7 @@ func ExampleCassandraClustersClient_NewListByResourceGroupPager() { // { // Name: to.Ptr("cassandra-prod"), // Type: to.Ptr("Microsoft.DocumentDB/cassandraClusters"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/cassandra-prod-rg/providers/Microsoft.DocumentDB/cassandraClusters"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cassandra-prod-rg/providers/Microsoft.DocumentDB/cassandraClusters"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, @@ -188,7 +188,7 @@ func ExampleCassandraClustersClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBManagedCassandraClusterGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBManagedCassandraClusterGet.json func ExampleCassandraClustersClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -209,7 +209,7 @@ func ExampleCassandraClustersClient_Get() { // res.ClusterResource = armcosmos.ClusterResource{ // Name: to.Ptr("cassandra-prod"), // Type: to.Ptr("Microsoft.DocumentDB/cassandraClusters"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/cassandra-prod-rg/providers/Microsoft.DocumentDB/cassandraClusters/cassandra-prod"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cassandra-prod-rg/providers/Microsoft.DocumentDB/cassandraClusters/cassandra-prod"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, @@ -265,7 +265,7 @@ func ExampleCassandraClustersClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBManagedCassandraClusterDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBManagedCassandraClusterDelete.json func ExampleCassandraClustersClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -286,7 +286,7 @@ func ExampleCassandraClustersClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBManagedCassandraClusterCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBManagedCassandraClusterCreate.json func ExampleCassandraClustersClient_BeginCreateUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -396,7 +396,7 @@ func ExampleCassandraClustersClient_BeginCreateUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBManagedCassandraClusterPatch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBManagedCassandraClusterPatch.json func ExampleCassandraClustersClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -455,7 +455,7 @@ func ExampleCassandraClustersClient_BeginUpdate() { // Pem: to.Ptr("-----BEGIN CERTIFICATE-----\n...Base64 encoded certificate...\n-----END CERTIFICATE-----"), // }}, // ClusterNameOverride: to.Ptr("ClusterNameIllegalForAzureResource"), - // DelegatedManagementSubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/customer-vnet-rg/providers/Microsoft.Network/virtualNetworks/customer-vnet/subnets/management"), + // DelegatedManagementSubnetID: to.Ptr("/subscriptions/536e130b-d7d6-4ac7-98a5-de20d69588d2/resourceGroups/customer-vnet-rg/providers/Microsoft.Network/virtualNetworks/customer-vnet/subnets/management"), // ExternalGossipCertificates: []*armcosmos.Certificate{ // { // Pem: to.Ptr("-----BEGIN CERTIFICATE-----\n...Base64 encoded certificate...\n-----END CERTIFICATE-----"), @@ -499,7 +499,7 @@ func ExampleCassandraClustersClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBManagedCassandraCommand.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBManagedCassandraCommand.json func ExampleCassandraClustersClient_BeginInvokeCommand() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -511,10 +511,7 @@ func ExampleCassandraClustersClient_BeginInvokeCommand() { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCassandraClustersClient().BeginInvokeCommand(ctx, "cassandra-prod-rg", "cassandra-prod", armcosmos.CommandPostBody{ - Arguments: map[string]*string{ - "status": to.Ptr(""), - }, - Command: to.Ptr("nodetool"), + Command: to.Ptr("nodetool status"), Host: to.Ptr("10.0.1.12"), }, nil) if err != nil { @@ -526,79 +523,7 @@ func ExampleCassandraClustersClient_BeginInvokeCommand() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBManagedCassandraBackupsList.json -func ExampleCassandraClustersClient_NewListBackupsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewCassandraClustersClient().NewListBackupsPager("cassandra-prod-rg", "cassandra-prod", 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.ListBackups = armcosmos.ListBackups{ - // Value: []*armcosmos.BackupResource{ - // { - // Name: to.Ptr("1611250348"), - // Type: to.Ptr("Microsoft.DocumentDB/cassandraClusters/backups"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/cassandra-prod-rg/providers/Microsoft.DocumentDB/cassandraClusters/cassandra-prod/backups/1611250348"), - // Properties: &armcosmos.BackupResourceProperties{ - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-21T17:32:28Z"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("1611214220"), - // Type: to.Ptr("Microsoft.DocumentDB/cassandraClusters/backups"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/cassandra-prod-rg/providers/Microsoft.DocumentDB/cassandraClusters/cassandra-prod/backups/1611214220"), - // Properties: &armcosmos.BackupResourceProperties{ - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-21T07:30:20Z"); return t}()), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBManagedCassandraBackup.json -func ExampleCassandraClustersClient_GetBackup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCassandraClustersClient().GetBackup(ctx, "cassandra-prod-rg", "cassandra-prod", "1611250348", 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.BackupResource = armcosmos.BackupResource{ - // Name: to.Ptr("1611250348"), - // Type: to.Ptr("Microsoft.DocumentDB/cassandraClusters/backups"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/cassandra-prod-rg/providers/Microsoft.DocumentDB/cassandraClusters/cassandra-prod/backups/1611250348"), - // Properties: &armcosmos.BackupResourceProperties{ - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-21T17:32:28Z"); return t}()), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBManagedCassandraClusterDeallocate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBManagedCassandraClusterDeallocate.json func ExampleCassandraClustersClient_BeginDeallocate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -619,7 +544,7 @@ func ExampleCassandraClustersClient_BeginDeallocate() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBManagedCassandraClusterStart.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBManagedCassandraClusterStart.json func ExampleCassandraClustersClient_BeginStart() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -640,7 +565,7 @@ func ExampleCassandraClustersClient_BeginStart() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBManagedCassandraStatus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBManagedCassandraStatus.json func ExampleCassandraClustersClient_Status() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/cassandradatacenters_client.go b/sdk/resourcemanager/cosmos/armcosmos/cassandradatacenters_client.go index c6eb5cda9b0a..9e7b54638d08 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/cassandradatacenters_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/cassandradatacenters_client.go @@ -48,7 +48,7 @@ func NewCassandraDataCentersClient(subscriptionID string, credential azcore.Toke // only some properties, use PATCH. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - dataCenterName - Data center name in a managed Cassandra cluster. @@ -71,7 +71,7 @@ func (client *CassandraDataCentersClient) BeginCreateUpdate(ctx context.Context, // some properties, use PATCH. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *CassandraDataCentersClient) createUpdate(ctx context.Context, resourceGroupName string, clusterName string, dataCenterName string, body DataCenterResource, options *CassandraDataCentersClientBeginCreateUpdateOptions) (*http.Response, error) { req, err := client.createUpdateCreateRequest(ctx, resourceGroupName, clusterName, dataCenterName, body, options) if err != nil { @@ -111,7 +111,7 @@ func (client *CassandraDataCentersClient) createUpdateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -120,7 +120,7 @@ func (client *CassandraDataCentersClient) createUpdateCreateRequest(ctx context. // BeginDelete - Delete a managed Cassandra data center. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - dataCenterName - Data center name in a managed Cassandra cluster. @@ -141,7 +141,7 @@ func (client *CassandraDataCentersClient) BeginDelete(ctx context.Context, resou // Delete - Delete a managed Cassandra data center. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *CassandraDataCentersClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, dataCenterName string, options *CassandraDataCentersClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, dataCenterName, options) if err != nil { @@ -181,7 +181,7 @@ func (client *CassandraDataCentersClient) deleteCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -190,7 +190,7 @@ func (client *CassandraDataCentersClient) deleteCreateRequest(ctx context.Contex // Get - Get the properties of a managed Cassandra data center. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - dataCenterName - Data center name in a managed Cassandra cluster. @@ -235,7 +235,7 @@ func (client *CassandraDataCentersClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -252,7 +252,7 @@ func (client *CassandraDataCentersClient) getHandleResponse(resp *http.Response) // NewListPager - List all data centers in a particular managed Cassandra cluster. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - options - CassandraDataCentersClientListOptions contains the optional parameters for the CassandraDataCentersClient.NewListPager @@ -299,7 +299,7 @@ func (client *CassandraDataCentersClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -317,7 +317,7 @@ func (client *CassandraDataCentersClient) listHandleResponse(resp *http.Response // BeginUpdate - Update some of the properties of a managed Cassandra data center. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - dataCenterName - Data center name in a managed Cassandra cluster. @@ -339,7 +339,7 @@ func (client *CassandraDataCentersClient) BeginUpdate(ctx context.Context, resou // Update - Update some of the properties of a managed Cassandra data center. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *CassandraDataCentersClient) update(ctx context.Context, resourceGroupName string, clusterName string, dataCenterName string, body DataCenterResource, options *CassandraDataCentersClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, clusterName, dataCenterName, body, options) if err != nil { @@ -379,7 +379,7 @@ func (client *CassandraDataCentersClient) updateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) diff --git a/sdk/resourcemanager/cosmos/armcosmos/cassandradatacenters_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/cassandradatacenters_client_example_test.go index 1921f54c578c..afd0c8c7069a 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/cassandradatacenters_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/cassandradatacenters_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBManagedCassandraDataCenterList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBManagedCassandraDataCenterList.json func ExampleCassandraDataCentersClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -45,7 +45,7 @@ func ExampleCassandraDataCentersClient_NewListPager() { // { // Name: to.Ptr("dc1"), // Type: to.Ptr("Microsoft.DocumentDB/cassandraClusters/dataCenters"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/cassandra-prod-rg/providers/Microsoft.DocumentDB/cassandraClusters/cassandra-prod/dataCenters"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cassandra-prod-rg/providers/Microsoft.DocumentDB/cassandraClusters/cassandra-prod/dataCenters"), // Properties: &armcosmos.DataCenterResourceProperties{ // Base64EncodedCassandraYamlFragment: to.Ptr("Y29tcGFjdGlvbl90aHJvdWdocHV0X21iX3Blcl9zZWM6IDMyCmNvbXBhY3Rpb25fbGFyZ2VfcGFydGl0aW9uX3dhcm5pbmdfdGhyZXNob2xkX21iOiAxMDA="), // DataCenterLocation: to.Ptr("West US 2"), @@ -68,7 +68,7 @@ func ExampleCassandraDataCentersClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBManagedCassandraDataCenterGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBManagedCassandraDataCenterGet.json func ExampleCassandraDataCentersClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -89,7 +89,7 @@ func ExampleCassandraDataCentersClient_Get() { // res.DataCenterResource = armcosmos.DataCenterResource{ // Name: to.Ptr("dc1"), // Type: to.Ptr("Microsoft.DocumentDB/cassandraClusters/dataCenters"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/cassandra-prod-rg/providers/Microsoft.DocumentDB/cassandraClusters/cassandra-prod/dataCenters/dc1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cassandra-prod-rg/providers/Microsoft.DocumentDB/cassandraClusters/cassandra-prod/dataCenters/dc1"), // Properties: &armcosmos.DataCenterResourceProperties{ // Base64EncodedCassandraYamlFragment: to.Ptr("Y29tcGFjdGlvbl90aHJvdWdocHV0X21iX3Blcl9zZWM6IDMyCmNvbXBhY3Rpb25fbGFyZ2VfcGFydGl0aW9uX3dhcm5pbmdfdGhyZXNob2xkX21iOiAxMDA="), // DataCenterLocation: to.Ptr("West US 2"), @@ -110,7 +110,7 @@ func ExampleCassandraDataCentersClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBManagedCassandraDataCenterDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBManagedCassandraDataCenterDelete.json func ExampleCassandraDataCentersClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -131,7 +131,7 @@ func ExampleCassandraDataCentersClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBManagedCassandraDataCenterCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBManagedCassandraDataCenterCreate.json func ExampleCassandraDataCentersClient_BeginCreateUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -163,7 +163,7 @@ func ExampleCassandraDataCentersClient_BeginCreateUpdate() { // res.DataCenterResource = armcosmos.DataCenterResource{ // Name: to.Ptr("dc1"), // Type: to.Ptr("Microsoft.DocumentDB/cassandraClusters/dataCenters"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/cassandra-prod-rg/providers/Microsoft.DocumentDB/cassandraClusters/cassandra-prod/dataCenters/dc1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cassandra-prod-rg/providers/Microsoft.DocumentDB/cassandraClusters/cassandra-prod/dataCenters/dc1"), // Properties: &armcosmos.DataCenterResourceProperties{ // DataCenterLocation: to.Ptr("West US 2"), // DelegatedSubnetID: to.Ptr("/subscriptions/536e130b-d7d6-4ac7-98a5-de20d69588d2/resourceGroups/customer-vnet-rg/providers/Microsoft.Network/virtualNetworks/customer-vnet/subnets/dc1"), @@ -183,7 +183,7 @@ func ExampleCassandraDataCentersClient_BeginCreateUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBManagedCassandraDataCenterPatch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBManagedCassandraDataCenterPatch.json func ExampleCassandraDataCentersClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -219,7 +219,7 @@ func ExampleCassandraDataCentersClient_BeginUpdate() { // Properties: &armcosmos.DataCenterResourceProperties{ // Base64EncodedCassandraYamlFragment: to.Ptr("Y29tcGFjdGlvbl90aHJvdWdocHV0X21iX3Blcl9zZWM6IDMyCmNvbXBhY3Rpb25fbGFyZ2VfcGFydGl0aW9uX3dhcm5pbmdfdGhyZXNob2xkX21iOiAxMDA="), // DataCenterLocation: to.Ptr("West US 2"), - // DelegatedSubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/customer-vnet-rg/providers/Microsoft.Network/virtualNetworks/customer-vnet/subnets/dc1"), + // DelegatedSubnetID: to.Ptr("/subscriptions/536e130b-d7d6-4ac7-98a5-de20d69588d2/resourceGroups/customer-vnet-rg/providers/Microsoft.Network/virtualNetworks/customer-vnet/subnets/dc1"), // NodeCount: to.Ptr[int32](9), // ProvisioningState: to.Ptr(armcosmos.ManagedCassandraProvisioningStateSucceeded), // SeedNodes: []*armcosmos.SeedNode{ diff --git a/sdk/resourcemanager/cosmos/armcosmos/cassandraresources_client.go b/sdk/resourcemanager/cosmos/armcosmos/cassandraresources_client.go index 5f95f3d922bf..0742427db8d8 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/cassandraresources_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/cassandraresources_client.go @@ -47,7 +47,7 @@ func NewCassandraResourcesClient(subscriptionID string, credential azcore.TokenC // BeginCreateUpdateCassandraKeyspace - Create or update an Azure Cosmos DB Cassandra keyspace // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -69,7 +69,7 @@ func (client *CassandraResourcesClient) BeginCreateUpdateCassandraKeyspace(ctx c // CreateUpdateCassandraKeyspace - Create or update an Azure Cosmos DB Cassandra keyspace // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *CassandraResourcesClient) createUpdateCassandraKeyspace(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, createUpdateCassandraKeyspaceParameters CassandraKeyspaceCreateUpdateParameters, options *CassandraResourcesClientBeginCreateUpdateCassandraKeyspaceOptions) (*http.Response, error) { req, err := client.createUpdateCassandraKeyspaceCreateRequest(ctx, resourceGroupName, accountName, keyspaceName, createUpdateCassandraKeyspaceParameters, options) if err != nil { @@ -109,7 +109,7 @@ func (client *CassandraResourcesClient) createUpdateCassandraKeyspaceCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, createUpdateCassandraKeyspaceParameters) @@ -118,7 +118,7 @@ func (client *CassandraResourcesClient) createUpdateCassandraKeyspaceCreateReque // BeginCreateUpdateCassandraTable - Create or update an Azure Cosmos DB Cassandra Table // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -141,7 +141,7 @@ func (client *CassandraResourcesClient) BeginCreateUpdateCassandraTable(ctx cont // CreateUpdateCassandraTable - Create or update an Azure Cosmos DB Cassandra Table // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *CassandraResourcesClient) createUpdateCassandraTable(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string, createUpdateCassandraTableParameters CassandraTableCreateUpdateParameters, options *CassandraResourcesClientBeginCreateUpdateCassandraTableOptions) (*http.Response, error) { req, err := client.createUpdateCassandraTableCreateRequest(ctx, resourceGroupName, accountName, keyspaceName, tableName, createUpdateCassandraTableParameters, options) if err != nil { @@ -185,92 +185,16 @@ func (client *CassandraResourcesClient) createUpdateCassandraTableCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, createUpdateCassandraTableParameters) } -// BeginCreateUpdateCassandraView - Create or update an Azure Cosmos DB Cassandra View -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - keyspaceName - Cosmos DB keyspace name. -// - viewName - Cosmos DB view name. -// - createUpdateCassandraViewParameters - The parameters to provide for the current Cassandra View. -// - options - CassandraResourcesClientBeginCreateUpdateCassandraViewOptions contains the optional parameters for the CassandraResourcesClient.BeginCreateUpdateCassandraView -// method. -func (client *CassandraResourcesClient) BeginCreateUpdateCassandraView(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, createUpdateCassandraViewParameters CassandraViewCreateUpdateParameters, options *CassandraResourcesClientBeginCreateUpdateCassandraViewOptions) (*runtime.Poller[CassandraResourcesClientCreateUpdateCassandraViewResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createUpdateCassandraView(ctx, resourceGroupName, accountName, keyspaceName, viewName, createUpdateCassandraViewParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[CassandraResourcesClientCreateUpdateCassandraViewResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[CassandraResourcesClientCreateUpdateCassandraViewResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// CreateUpdateCassandraView - Create or update an Azure Cosmos DB Cassandra View -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -func (client *CassandraResourcesClient) createUpdateCassandraView(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, createUpdateCassandraViewParameters CassandraViewCreateUpdateParameters, options *CassandraResourcesClientBeginCreateUpdateCassandraViewOptions) (*http.Response, error) { - req, err := client.createUpdateCassandraViewCreateRequest(ctx, resourceGroupName, accountName, keyspaceName, viewName, createUpdateCassandraViewParameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createUpdateCassandraViewCreateRequest creates the CreateUpdateCassandraView request. -func (client *CassandraResourcesClient) createUpdateCassandraViewCreateRequest(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, createUpdateCassandraViewParameters CassandraViewCreateUpdateParameters, options *CassandraResourcesClientBeginCreateUpdateCassandraViewOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if keyspaceName == "" { - return nil, errors.New("parameter keyspaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{keyspaceName}", url.PathEscape(keyspaceName)) - if viewName == "" { - return nil, errors.New("parameter viewName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{viewName}", url.PathEscape(viewName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, createUpdateCassandraViewParameters) -} - // BeginDeleteCassandraKeyspace - Deletes an existing Azure Cosmos DB Cassandra keyspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -291,7 +215,7 @@ func (client *CassandraResourcesClient) BeginDeleteCassandraKeyspace(ctx context // DeleteCassandraKeyspace - Deletes an existing Azure Cosmos DB Cassandra keyspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *CassandraResourcesClient) deleteCassandraKeyspace(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, options *CassandraResourcesClientBeginDeleteCassandraKeyspaceOptions) (*http.Response, error) { req, err := client.deleteCassandraKeyspaceCreateRequest(ctx, resourceGroupName, accountName, keyspaceName, options) if err != nil { @@ -331,7 +255,7 @@ func (client *CassandraResourcesClient) deleteCassandraKeyspaceCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -339,7 +263,7 @@ func (client *CassandraResourcesClient) deleteCassandraKeyspaceCreateRequest(ctx // BeginDeleteCassandraTable - Deletes an existing Azure Cosmos DB Cassandra table. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -361,7 +285,7 @@ func (client *CassandraResourcesClient) BeginDeleteCassandraTable(ctx context.Co // DeleteCassandraTable - Deletes an existing Azure Cosmos DB Cassandra table. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *CassandraResourcesClient) deleteCassandraTable(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string, options *CassandraResourcesClientBeginDeleteCassandraTableOptions) (*http.Response, error) { req, err := client.deleteCassandraTableCreateRequest(ctx, resourceGroupName, accountName, keyspaceName, tableName, options) if err != nil { @@ -405,81 +329,7 @@ func (client *CassandraResourcesClient) deleteCassandraTableCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// BeginDeleteCassandraView - Deletes an existing Azure Cosmos DB Cassandra view. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - keyspaceName - Cosmos DB keyspace name. -// - viewName - Cosmos DB view name. -// - options - CassandraResourcesClientBeginDeleteCassandraViewOptions contains the optional parameters for the CassandraResourcesClient.BeginDeleteCassandraView -// method. -func (client *CassandraResourcesClient) BeginDeleteCassandraView(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, options *CassandraResourcesClientBeginDeleteCassandraViewOptions) (*runtime.Poller[CassandraResourcesClientDeleteCassandraViewResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteCassandraView(ctx, resourceGroupName, accountName, keyspaceName, viewName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[CassandraResourcesClientDeleteCassandraViewResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[CassandraResourcesClientDeleteCassandraViewResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// DeleteCassandraView - Deletes an existing Azure Cosmos DB Cassandra view. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -func (client *CassandraResourcesClient) deleteCassandraView(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, options *CassandraResourcesClientBeginDeleteCassandraViewOptions) (*http.Response, error) { - req, err := client.deleteCassandraViewCreateRequest(ctx, resourceGroupName, accountName, keyspaceName, viewName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCassandraViewCreateRequest creates the DeleteCassandraView request. -func (client *CassandraResourcesClient) deleteCassandraViewCreateRequest(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, options *CassandraResourcesClientBeginDeleteCassandraViewOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if keyspaceName == "" { - return nil, errors.New("parameter keyspaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{keyspaceName}", url.PathEscape(keyspaceName)) - if viewName == "" { - return nil, errors.New("parameter viewName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{viewName}", url.PathEscape(viewName)) - 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", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -488,7 +338,7 @@ func (client *CassandraResourcesClient) deleteCassandraViewCreateRequest(ctx con // name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -533,7 +383,7 @@ func (client *CassandraResourcesClient) getCassandraKeyspaceCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -552,7 +402,7 @@ func (client *CassandraResourcesClient) getCassandraKeyspaceHandleResponse(resp // account with the provided name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -597,7 +447,7 @@ func (client *CassandraResourcesClient) getCassandraKeyspaceThroughputCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -615,7 +465,7 @@ func (client *CassandraResourcesClient) getCassandraKeyspaceThroughputHandleResp // GetCassandraTable - Gets the Cassandra table under an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -665,7 +515,7 @@ func (client *CassandraResourcesClient) getCassandraTableCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -684,7 +534,7 @@ func (client *CassandraResourcesClient) getCassandraTableHandleResponse(resp *ht // account with the provided name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -734,7 +584,7 @@ func (client *CassandraResourcesClient) getCassandraTableThroughputCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -749,146 +599,9 @@ func (client *CassandraResourcesClient) getCassandraTableThroughputHandleRespons return result, nil } -// GetCassandraView - Gets the Cassandra view under an existing Azure Cosmos DB database account. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - keyspaceName - Cosmos DB keyspace name. -// - viewName - Cosmos DB view name. -// - options - CassandraResourcesClientGetCassandraViewOptions contains the optional parameters for the CassandraResourcesClient.GetCassandraView -// method. -func (client *CassandraResourcesClient) GetCassandraView(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, options *CassandraResourcesClientGetCassandraViewOptions) (CassandraResourcesClientGetCassandraViewResponse, error) { - req, err := client.getCassandraViewCreateRequest(ctx, resourceGroupName, accountName, keyspaceName, viewName, options) - if err != nil { - return CassandraResourcesClientGetCassandraViewResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return CassandraResourcesClientGetCassandraViewResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CassandraResourcesClientGetCassandraViewResponse{}, runtime.NewResponseError(resp) - } - return client.getCassandraViewHandleResponse(resp) -} - -// getCassandraViewCreateRequest creates the GetCassandraView request. -func (client *CassandraResourcesClient) getCassandraViewCreateRequest(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, options *CassandraResourcesClientGetCassandraViewOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if keyspaceName == "" { - return nil, errors.New("parameter keyspaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{keyspaceName}", url.PathEscape(keyspaceName)) - if viewName == "" { - return nil, errors.New("parameter viewName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{viewName}", url.PathEscape(viewName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getCassandraViewHandleResponse handles the GetCassandraView response. -func (client *CassandraResourcesClient) getCassandraViewHandleResponse(resp *http.Response) (CassandraResourcesClientGetCassandraViewResponse, error) { - result := CassandraResourcesClientGetCassandraViewResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CassandraViewGetResults); err != nil { - return CassandraResourcesClientGetCassandraViewResponse{}, err - } - return result, nil -} - -// GetCassandraViewThroughput - Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database account -// with the provided name. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - keyspaceName - Cosmos DB keyspace name. -// - viewName - Cosmos DB view name. -// - options - CassandraResourcesClientGetCassandraViewThroughputOptions contains the optional parameters for the CassandraResourcesClient.GetCassandraViewThroughput -// method. -func (client *CassandraResourcesClient) GetCassandraViewThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, options *CassandraResourcesClientGetCassandraViewThroughputOptions) (CassandraResourcesClientGetCassandraViewThroughputResponse, error) { - req, err := client.getCassandraViewThroughputCreateRequest(ctx, resourceGroupName, accountName, keyspaceName, viewName, options) - if err != nil { - return CassandraResourcesClientGetCassandraViewThroughputResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return CassandraResourcesClientGetCassandraViewThroughputResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CassandraResourcesClientGetCassandraViewThroughputResponse{}, runtime.NewResponseError(resp) - } - return client.getCassandraViewThroughputHandleResponse(resp) -} - -// getCassandraViewThroughputCreateRequest creates the GetCassandraViewThroughput request. -func (client *CassandraResourcesClient) getCassandraViewThroughputCreateRequest(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, options *CassandraResourcesClientGetCassandraViewThroughputOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if keyspaceName == "" { - return nil, errors.New("parameter keyspaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{keyspaceName}", url.PathEscape(keyspaceName)) - if viewName == "" { - return nil, errors.New("parameter viewName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{viewName}", url.PathEscape(viewName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getCassandraViewThroughputHandleResponse handles the GetCassandraViewThroughput response. -func (client *CassandraResourcesClient) getCassandraViewThroughputHandleResponse(resp *http.Response) (CassandraResourcesClientGetCassandraViewThroughputResponse, error) { - result := CassandraResourcesClientGetCassandraViewThroughputResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ThroughputSettingsGetResults); err != nil { - return CassandraResourcesClientGetCassandraViewThroughputResponse{}, err - } - return result, nil -} - // NewListCassandraKeyspacesPager - Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - CassandraResourcesClientListCassandraKeyspacesOptions contains the optional parameters for the CassandraResourcesClient.NewListCassandraKeyspacesPager @@ -935,7 +648,7 @@ func (client *CassandraResourcesClient) listCassandraKeyspacesCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -952,7 +665,7 @@ func (client *CassandraResourcesClient) listCassandraKeyspacesHandleResponse(res // NewListCassandraTablesPager - Lists the Cassandra table under an existing Azure Cosmos DB database account. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -1004,7 +717,7 @@ func (client *CassandraResourcesClient) listCassandraTablesCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1019,79 +732,10 @@ func (client *CassandraResourcesClient) listCassandraTablesHandleResponse(resp * return result, nil } -// NewListCassandraViewsPager - Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - keyspaceName - Cosmos DB keyspace name. -// - options - CassandraResourcesClientListCassandraViewsOptions contains the optional parameters for the CassandraResourcesClient.NewListCassandraViewsPager -// method. -func (client *CassandraResourcesClient) NewListCassandraViewsPager(resourceGroupName string, accountName string, keyspaceName string, options *CassandraResourcesClientListCassandraViewsOptions) *runtime.Pager[CassandraResourcesClientListCassandraViewsResponse] { - return runtime.NewPager(runtime.PagingHandler[CassandraResourcesClientListCassandraViewsResponse]{ - More: func(page CassandraResourcesClientListCassandraViewsResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *CassandraResourcesClientListCassandraViewsResponse) (CassandraResourcesClientListCassandraViewsResponse, error) { - req, err := client.listCassandraViewsCreateRequest(ctx, resourceGroupName, accountName, keyspaceName, options) - if err != nil { - return CassandraResourcesClientListCassandraViewsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return CassandraResourcesClientListCassandraViewsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CassandraResourcesClientListCassandraViewsResponse{}, runtime.NewResponseError(resp) - } - return client.listCassandraViewsHandleResponse(resp) - }, - }) -} - -// listCassandraViewsCreateRequest creates the ListCassandraViews request. -func (client *CassandraResourcesClient) listCassandraViewsCreateRequest(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, options *CassandraResourcesClientListCassandraViewsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if keyspaceName == "" { - return nil, errors.New("parameter keyspaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{keyspaceName}", url.PathEscape(keyspaceName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listCassandraViewsHandleResponse handles the ListCassandraViews response. -func (client *CassandraResourcesClient) listCassandraViewsHandleResponse(resp *http.Response) (CassandraResourcesClientListCassandraViewsResponse, error) { - result := CassandraResourcesClientListCassandraViewsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CassandraViewListResult); err != nil { - return CassandraResourcesClientListCassandraViewsResponse{}, err - } - return result, nil -} - // BeginMigrateCassandraKeyspaceToAutoscale - Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -1112,7 +756,7 @@ func (client *CassandraResourcesClient) BeginMigrateCassandraKeyspaceToAutoscale // MigrateCassandraKeyspaceToAutoscale - Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *CassandraResourcesClient) migrateCassandraKeyspaceToAutoscale(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, options *CassandraResourcesClientBeginMigrateCassandraKeyspaceToAutoscaleOptions) (*http.Response, error) { req, err := client.migrateCassandraKeyspaceToAutoscaleCreateRequest(ctx, resourceGroupName, accountName, keyspaceName, options) if err != nil { @@ -1152,7 +796,7 @@ func (client *CassandraResourcesClient) migrateCassandraKeyspaceToAutoscaleCreat return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1162,7 +806,7 @@ func (client *CassandraResourcesClient) migrateCassandraKeyspaceToAutoscaleCreat // throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -1183,7 +827,7 @@ func (client *CassandraResourcesClient) BeginMigrateCassandraKeyspaceToManualThr // MigrateCassandraKeyspaceToManualThroughput - Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *CassandraResourcesClient) migrateCassandraKeyspaceToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, options *CassandraResourcesClientBeginMigrateCassandraKeyspaceToManualThroughputOptions) (*http.Response, error) { req, err := client.migrateCassandraKeyspaceToManualThroughputCreateRequest(ctx, resourceGroupName, accountName, keyspaceName, options) if err != nil { @@ -1223,7 +867,7 @@ func (client *CassandraResourcesClient) migrateCassandraKeyspaceToManualThroughp return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1232,7 +876,7 @@ func (client *CassandraResourcesClient) migrateCassandraKeyspaceToManualThroughp // BeginMigrateCassandraTableToAutoscale - Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -1254,7 +898,7 @@ func (client *CassandraResourcesClient) BeginMigrateCassandraTableToAutoscale(ct // MigrateCassandraTableToAutoscale - Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *CassandraResourcesClient) migrateCassandraTableToAutoscale(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string, options *CassandraResourcesClientBeginMigrateCassandraTableToAutoscaleOptions) (*http.Response, error) { req, err := client.migrateCassandraTableToAutoscaleCreateRequest(ctx, resourceGroupName, accountName, keyspaceName, tableName, options) if err != nil { @@ -1298,7 +942,7 @@ func (client *CassandraResourcesClient) migrateCassandraTableToAutoscaleCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1307,7 +951,7 @@ func (client *CassandraResourcesClient) migrateCassandraTableToAutoscaleCreateRe // BeginMigrateCassandraTableToManualThroughput - Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -1329,7 +973,7 @@ func (client *CassandraResourcesClient) BeginMigrateCassandraTableToManualThroug // MigrateCassandraTableToManualThroughput - Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *CassandraResourcesClient) migrateCassandraTableToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string, options *CassandraResourcesClientBeginMigrateCassandraTableToManualThroughputOptions) (*http.Response, error) { req, err := client.migrateCassandraTableToManualThroughputCreateRequest(ctx, resourceGroupName, accountName, keyspaceName, tableName, options) if err != nil { @@ -1373,157 +1017,7 @@ func (client *CassandraResourcesClient) migrateCassandraTableToManualThroughputC return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginMigrateCassandraViewToAutoscale - Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - keyspaceName - Cosmos DB keyspace name. -// - viewName - Cosmos DB view name. -// - options - CassandraResourcesClientBeginMigrateCassandraViewToAutoscaleOptions contains the optional parameters for the -// CassandraResourcesClient.BeginMigrateCassandraViewToAutoscale method. -func (client *CassandraResourcesClient) BeginMigrateCassandraViewToAutoscale(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, options *CassandraResourcesClientBeginMigrateCassandraViewToAutoscaleOptions) (*runtime.Poller[CassandraResourcesClientMigrateCassandraViewToAutoscaleResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.migrateCassandraViewToAutoscale(ctx, resourceGroupName, accountName, keyspaceName, viewName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[CassandraResourcesClientMigrateCassandraViewToAutoscaleResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[CassandraResourcesClientMigrateCassandraViewToAutoscaleResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// MigrateCassandraViewToAutoscale - Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -func (client *CassandraResourcesClient) migrateCassandraViewToAutoscale(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, options *CassandraResourcesClientBeginMigrateCassandraViewToAutoscaleOptions) (*http.Response, error) { - req, err := client.migrateCassandraViewToAutoscaleCreateRequest(ctx, resourceGroupName, accountName, keyspaceName, viewName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// migrateCassandraViewToAutoscaleCreateRequest creates the MigrateCassandraViewToAutoscale request. -func (client *CassandraResourcesClient) migrateCassandraViewToAutoscaleCreateRequest(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, options *CassandraResourcesClientBeginMigrateCassandraViewToAutoscaleOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToAutoscale" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if keyspaceName == "" { - return nil, errors.New("parameter keyspaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{keyspaceName}", url.PathEscape(keyspaceName)) - if viewName == "" { - return nil, errors.New("parameter viewName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{viewName}", url.PathEscape(viewName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginMigrateCassandraViewToManualThroughput - Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - keyspaceName - Cosmos DB keyspace name. -// - viewName - Cosmos DB view name. -// - options - CassandraResourcesClientBeginMigrateCassandraViewToManualThroughputOptions contains the optional parameters for -// the CassandraResourcesClient.BeginMigrateCassandraViewToManualThroughput method. -func (client *CassandraResourcesClient) BeginMigrateCassandraViewToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, options *CassandraResourcesClientBeginMigrateCassandraViewToManualThroughputOptions) (*runtime.Poller[CassandraResourcesClientMigrateCassandraViewToManualThroughputResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.migrateCassandraViewToManualThroughput(ctx, resourceGroupName, accountName, keyspaceName, viewName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[CassandraResourcesClientMigrateCassandraViewToManualThroughputResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[CassandraResourcesClientMigrateCassandraViewToManualThroughputResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// MigrateCassandraViewToManualThroughput - Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -func (client *CassandraResourcesClient) migrateCassandraViewToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, options *CassandraResourcesClientBeginMigrateCassandraViewToManualThroughputOptions) (*http.Response, error) { - req, err := client.migrateCassandraViewToManualThroughputCreateRequest(ctx, resourceGroupName, accountName, keyspaceName, viewName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// migrateCassandraViewToManualThroughputCreateRequest creates the MigrateCassandraViewToManualThroughput request. -func (client *CassandraResourcesClient) migrateCassandraViewToManualThroughputCreateRequest(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, options *CassandraResourcesClientBeginMigrateCassandraViewToManualThroughputOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToManualThroughput" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if keyspaceName == "" { - return nil, errors.New("parameter keyspaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{keyspaceName}", url.PathEscape(keyspaceName)) - if viewName == "" { - return nil, errors.New("parameter viewName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{viewName}", url.PathEscape(viewName)) - 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", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1532,7 +1026,7 @@ func (client *CassandraResourcesClient) migrateCassandraViewToManualThroughputCr // BeginUpdateCassandraKeyspaceThroughput - Update RUs per second of an Azure Cosmos DB Cassandra Keyspace // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -1554,7 +1048,7 @@ func (client *CassandraResourcesClient) BeginUpdateCassandraKeyspaceThroughput(c // UpdateCassandraKeyspaceThroughput - Update RUs per second of an Azure Cosmos DB Cassandra Keyspace // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *CassandraResourcesClient) updateCassandraKeyspaceThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *CassandraResourcesClientBeginUpdateCassandraKeyspaceThroughputOptions) (*http.Response, error) { req, err := client.updateCassandraKeyspaceThroughputCreateRequest(ctx, resourceGroupName, accountName, keyspaceName, updateThroughputParameters, options) if err != nil { @@ -1594,7 +1088,7 @@ func (client *CassandraResourcesClient) updateCassandraKeyspaceThroughputCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, updateThroughputParameters) @@ -1603,7 +1097,7 @@ func (client *CassandraResourcesClient) updateCassandraKeyspaceThroughputCreateR // BeginUpdateCassandraTableThroughput - Update RUs per second of an Azure Cosmos DB Cassandra table // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -1626,7 +1120,7 @@ func (client *CassandraResourcesClient) BeginUpdateCassandraTableThroughput(ctx // UpdateCassandraTableThroughput - Update RUs per second of an Azure Cosmos DB Cassandra table // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *CassandraResourcesClient) updateCassandraTableThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *CassandraResourcesClientBeginUpdateCassandraTableThroughputOptions) (*http.Response, error) { req, err := client.updateCassandraTableThroughputCreateRequest(ctx, resourceGroupName, accountName, keyspaceName, tableName, updateThroughputParameters, options) if err != nil { @@ -1670,83 +1164,7 @@ func (client *CassandraResourcesClient) updateCassandraTableThroughputCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, updateThroughputParameters) -} - -// BeginUpdateCassandraViewThroughput - Update RUs per second of an Azure Cosmos DB Cassandra view -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - keyspaceName - Cosmos DB keyspace name. -// - viewName - Cosmos DB view name. -// - updateThroughputParameters - The RUs per second of the parameters to provide for the current Cassandra view. -// - options - CassandraResourcesClientBeginUpdateCassandraViewThroughputOptions contains the optional parameters for the CassandraResourcesClient.BeginUpdateCassandraViewThroughput -// method. -func (client *CassandraResourcesClient) BeginUpdateCassandraViewThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *CassandraResourcesClientBeginUpdateCassandraViewThroughputOptions) (*runtime.Poller[CassandraResourcesClientUpdateCassandraViewThroughputResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.updateCassandraViewThroughput(ctx, resourceGroupName, accountName, keyspaceName, viewName, updateThroughputParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[CassandraResourcesClientUpdateCassandraViewThroughputResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[CassandraResourcesClientUpdateCassandraViewThroughputResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// UpdateCassandraViewThroughput - Update RUs per second of an Azure Cosmos DB Cassandra view -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -func (client *CassandraResourcesClient) updateCassandraViewThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *CassandraResourcesClientBeginUpdateCassandraViewThroughputOptions) (*http.Response, error) { - req, err := client.updateCassandraViewThroughputCreateRequest(ctx, resourceGroupName, accountName, keyspaceName, viewName, updateThroughputParameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCassandraViewThroughputCreateRequest creates the UpdateCassandraViewThroughput request. -func (client *CassandraResourcesClient) updateCassandraViewThroughputCreateRequest(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *CassandraResourcesClientBeginUpdateCassandraViewThroughputOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if keyspaceName == "" { - return nil, errors.New("parameter keyspaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{keyspaceName}", url.PathEscape(keyspaceName)) - if viewName == "" { - return nil, errors.New("parameter viewName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{viewName}", url.PathEscape(viewName)) - 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", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, updateThroughputParameters) diff --git a/sdk/resourcemanager/cosmos/armcosmos/cassandraresources_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/cassandraresources_client_example_test.go index eba7d4d329bf..3daabcb1a131 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/cassandraresources_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/cassandraresources_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCassandraKeyspaceList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBCassandraKeyspaceList.json func ExampleCassandraResourcesClient_NewListCassandraKeyspacesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -59,7 +59,7 @@ func ExampleCassandraResourcesClient_NewListCassandraKeyspacesPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCassandraKeyspaceGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBCassandraKeyspaceGet.json func ExampleCassandraResourcesClient_GetCassandraKeyspace() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -95,7 +95,7 @@ func ExampleCassandraResourcesClient_GetCassandraKeyspace() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCassandraKeyspaceCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBCassandraKeyspaceCreateUpdate.json func ExampleCassandraResourcesClient_BeginCreateUpdateCassandraKeyspace() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -141,7 +141,7 @@ func ExampleCassandraResourcesClient_BeginCreateUpdateCassandraKeyspace() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCassandraKeyspaceDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBCassandraKeyspaceDelete.json func ExampleCassandraResourcesClient_BeginDeleteCassandraKeyspace() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -162,7 +162,7 @@ func ExampleCassandraResourcesClient_BeginDeleteCassandraKeyspace() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCassandraKeyspaceThroughputGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBCassandraKeyspaceThroughputGet.json func ExampleCassandraResourcesClient_GetCassandraKeyspaceThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -200,7 +200,7 @@ func ExampleCassandraResourcesClient_GetCassandraKeyspaceThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCassandraKeyspaceThroughputUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBCassandraKeyspaceThroughputUpdate.json func ExampleCassandraResourcesClient_BeginUpdateCassandraKeyspaceThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -250,7 +250,7 @@ func ExampleCassandraResourcesClient_BeginUpdateCassandraKeyspaceThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCassandraKeyspaceMigrateToAutoscale.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBCassandraKeyspaceMigrateToAutoscale.json func ExampleCassandraResourcesClient_BeginMigrateCassandraKeyspaceToAutoscale() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -289,7 +289,7 @@ func ExampleCassandraResourcesClient_BeginMigrateCassandraKeyspaceToAutoscale() // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCassandraKeyspaceMigrateToManualThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBCassandraKeyspaceMigrateToManualThroughput.json func ExampleCassandraResourcesClient_BeginMigrateCassandraKeyspaceToManualThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -325,7 +325,7 @@ func ExampleCassandraResourcesClient_BeginMigrateCassandraKeyspaceToManualThroug // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCassandraTableList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBCassandraTableList.json func ExampleCassandraResourcesClient_NewListCassandraTablesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -374,7 +374,6 @@ func ExampleCassandraResourcesClient_NewListCassandraTablesPager() { // Name: to.Ptr("columnA"), // }}, // }, - // AnalyticalStorageTTL: to.Ptr[int32](500), // DefaultTTL: to.Ptr[int32](100), // ID: to.Ptr("tableName"), // }, @@ -384,7 +383,7 @@ func ExampleCassandraResourcesClient_NewListCassandraTablesPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCassandraTableGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBCassandraTableGet.json func ExampleCassandraResourcesClient_GetCassandraTable() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -427,7 +426,6 @@ func ExampleCassandraResourcesClient_GetCassandraTable() { // Name: to.Ptr("columnA"), // }}, // }, - // AnalyticalStorageTTL: to.Ptr[int32](500), // DefaultTTL: to.Ptr[int32](100), // ID: to.Ptr("tableName"), // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), @@ -438,7 +436,7 @@ func ExampleCassandraResourcesClient_GetCassandraTable() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCassandraTableCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBCassandraTableCreateUpdate.json func ExampleCassandraResourcesClient_BeginCreateUpdateCassandraTable() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -471,9 +469,8 @@ func ExampleCassandraResourcesClient_BeginCreateUpdateCassandraTable() { Name: to.Ptr("columnA"), }}, }, - AnalyticalStorageTTL: to.Ptr[int32](500), - DefaultTTL: to.Ptr[int32](100), - ID: to.Ptr("tableName"), + DefaultTTL: to.Ptr[int32](100), + ID: to.Ptr("tableName"), }, }, }, nil) @@ -512,7 +509,6 @@ func ExampleCassandraResourcesClient_BeginCreateUpdateCassandraTable() { // Name: to.Ptr("columnA"), // }}, // }, - // AnalyticalStorageTTL: to.Ptr[int32](500), // DefaultTTL: to.Ptr[int32](100), // ID: to.Ptr("tableName"), // }, @@ -520,7 +516,7 @@ func ExampleCassandraResourcesClient_BeginCreateUpdateCassandraTable() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCassandraTableDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBCassandraTableDelete.json func ExampleCassandraResourcesClient_BeginDeleteCassandraTable() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -541,7 +537,7 @@ func ExampleCassandraResourcesClient_BeginDeleteCassandraTable() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCassandraTableThroughputGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBCassandraTableThroughputGet.json func ExampleCassandraResourcesClient_GetCassandraTableThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -579,7 +575,7 @@ func ExampleCassandraResourcesClient_GetCassandraTableThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCassandraTableThroughputUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBCassandraTableThroughputUpdate.json func ExampleCassandraResourcesClient_BeginUpdateCassandraTableThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -626,7 +622,7 @@ func ExampleCassandraResourcesClient_BeginUpdateCassandraTableThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCassandraTableMigrateToAutoscale.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBCassandraTableMigrateToAutoscale.json func ExampleCassandraResourcesClient_BeginMigrateCassandraTableToAutoscale() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -665,7 +661,7 @@ func ExampleCassandraResourcesClient_BeginMigrateCassandraTableToAutoscale() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCassandraTableMigrateToManualThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBCassandraTableMigrateToManualThroughput.json func ExampleCassandraResourcesClient_BeginMigrateCassandraTableToManualThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -700,290 +696,3 @@ func ExampleCassandraResourcesClient_BeginMigrateCassandraTableToManualThroughpu // }, // } } - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCassandraViewList.json -func ExampleCassandraResourcesClient_NewListCassandraViewsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewCassandraResourcesClient().NewListCassandraViewsPager("rgName", "ddb1", "keyspacename", 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.CassandraViewListResult = armcosmos.CassandraViewListResult{ - // Value: []*armcosmos.CassandraViewGetResults{ - // { - // Name: to.Ptr("viewname"), - // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/views"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/cassandraKeyspaces/keyspacename/views/viewname"), - // Tags: map[string]*string{ - // }, - // Properties: &armcosmos.CassandraViewGetProperties{ - // Resource: &armcosmos.CassandraViewGetPropertiesResource{ - // ID: to.Ptr("viewname"), - // ViewDefinition: to.Ptr("SELECT columna, columnb, columnc FROM keyspacename.srctablename WHERE columna IS NOT NULL AND columnc IS NOT NULL PRIMARY KEY (columnc, columna)"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCassandraViewGet.json -func ExampleCassandraResourcesClient_GetCassandraView() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCassandraResourcesClient().GetCassandraView(ctx, "rg1", "ddb1", "keyspacename", "viewname", 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.CassandraViewGetResults = armcosmos.CassandraViewGetResults{ - // Name: to.Ptr("viewname"), - // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/views"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/cassandraKeyspaces/keyspacename/views/viewname"), - // Tags: map[string]*string{ - // }, - // Properties: &armcosmos.CassandraViewGetProperties{ - // Resource: &armcosmos.CassandraViewGetPropertiesResource{ - // ID: to.Ptr("viewname"), - // ViewDefinition: to.Ptr("SELECT columna, columnb, columnc FROM keyspacename.srctablename WHERE columna IS NOT NULL AND columnc IS NOT NULL PRIMARY KEY (columnc, columna)"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCassandraViewCreateUpdate.json -func ExampleCassandraResourcesClient_BeginCreateUpdateCassandraView() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewCassandraResourcesClient().BeginCreateUpdateCassandraView(ctx, "rg1", "ddb1", "keyspacename", "viewname", armcosmos.CassandraViewCreateUpdateParameters{ - Tags: map[string]*string{}, - Properties: &armcosmos.CassandraViewCreateUpdateProperties{ - Options: &armcosmos.CreateUpdateOptions{}, - Resource: &armcosmos.CassandraViewResource{ - ID: to.Ptr("viewname"), - ViewDefinition: to.Ptr("SELECT columna, columnb, columnc FROM keyspacename.srctablename WHERE columna IS NOT NULL AND columnc IS NOT NULL PRIMARY (columnc, columna)"), - }, - }, - }, 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.CassandraViewGetResults = armcosmos.CassandraViewGetResults{ - // Name: to.Ptr("viewname"), - // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/views"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/cassandraKeyspaces/keyspacename/views/viewname"), - // Tags: map[string]*string{ - // }, - // Properties: &armcosmos.CassandraViewGetProperties{ - // Resource: &armcosmos.CassandraViewGetPropertiesResource{ - // ID: to.Ptr("viewname"), - // ViewDefinition: to.Ptr("SELECT columna, columnb, columnc FROM keyspacename.srctablename WHERE columna IS NOT NULL AND columnc IS NOT NULL PRIMARY KEY (columnc, columna)"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCassandraViewDelete.json -func ExampleCassandraResourcesClient_BeginDeleteCassandraView() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewCassandraResourcesClient().BeginDeleteCassandraView(ctx, "rg1", "ddb1", "keyspacename", "viewname", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCassandraViewThroughputGet.json -func ExampleCassandraResourcesClient_GetCassandraViewThroughput() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCassandraResourcesClient().GetCassandraViewThroughput(ctx, "rg1", "ddb1", "keyspacename", "viewname", 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.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/views/throughputSettings"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/cassandraKeyspaces/keyspaceName/views/viewName/throughputSettings/default"), - // Tags: map[string]*string{ - // }, - // Properties: &armcosmos.ThroughputSettingsGetProperties{ - // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ - // MinimumThroughput: to.Ptr("400"), - // OfferReplacePending: to.Ptr("true"), - // Throughput: to.Ptr[int32](400), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCassandraViewThroughputUpdate.json -func ExampleCassandraResourcesClient_BeginUpdateCassandraViewThroughput() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewCassandraResourcesClient().BeginUpdateCassandraViewThroughput(ctx, "rg1", "ddb1", "keyspacename", "viewname", armcosmos.ThroughputSettingsUpdateParameters{ - Tags: map[string]*string{}, - Properties: &armcosmos.ThroughputSettingsUpdateProperties{ - Resource: &armcosmos.ThroughputSettingsResource{ - Throughput: to.Ptr[int32](400), - }, - }, - }, 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.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/views/throughputSettings"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/cassandraKeyspaces/keyspaceName/views/viewName/throughputSettings/default"), - // Properties: &armcosmos.ThroughputSettingsGetProperties{ - // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ - // MinimumThroughput: to.Ptr("400"), - // OfferReplacePending: to.Ptr("true"), - // Throughput: to.Ptr[int32](400), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCassandraViewMigrateToAutoscale.json -func ExampleCassandraResourcesClient_BeginMigrateCassandraViewToAutoscale() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewCassandraResourcesClient().BeginMigrateCassandraViewToAutoscale(ctx, "rg1", "ddb1", "keyspacename", "viewname", 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.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ - // Properties: &armcosmos.ThroughputSettingsGetProperties{ - // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ - // AutoscaleSettings: &armcosmos.AutoscaleSettingsResource{ - // MaxThroughput: to.Ptr[int32](4000), - // }, - // MinimumThroughput: to.Ptr("4000"), - // OfferReplacePending: to.Ptr("false"), - // Throughput: to.Ptr[int32](400), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCassandraViewMigrateToManualThroughput.json -func ExampleCassandraResourcesClient_BeginMigrateCassandraViewToManualThroughput() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewCassandraResourcesClient().BeginMigrateCassandraViewToManualThroughput(ctx, "rg1", "ddb1", "keyspacename", "viewname", 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.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ - // Properties: &armcosmos.ThroughputSettingsGetProperties{ - // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ - // MinimumThroughput: to.Ptr("400"), - // OfferReplacePending: to.Ptr("false"), - // Throughput: to.Ptr[int32](400), - // }, - // }, - // } -} diff --git a/sdk/resourcemanager/cosmos/armcosmos/client_factory.go b/sdk/resourcemanager/cosmos/armcosmos/client_factory.go index e4d5546b1c31..9917d3822670 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/client_factory.go +++ b/sdk/resourcemanager/cosmos/armcosmos/client_factory.go @@ -103,11 +103,6 @@ func (c *ClientFactory) NewPartitionKeyRangeIDRegionClient() *PartitionKeyRangeI return subClient } -func (c *ClientFactory) NewGraphResourcesClient() *GraphResourcesClient { - subClient, _ := NewGraphResourcesClient(c.subscriptionID, c.credential, c.options) - return subClient -} - func (c *ClientFactory) NewSQLResourcesClient() *SQLResourcesClient { subClient, _ := NewSQLResourcesClient(c.subscriptionID, c.credential, c.options) return subClient @@ -138,11 +133,6 @@ func (c *ClientFactory) NewLocationsClient() *LocationsClient { return subClient } -func (c *ClientFactory) NewDataTransferJobsClient() *DataTransferJobsClient { - subClient, _ := NewDataTransferJobsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - func (c *ClientFactory) NewCassandraClustersClient() *CassandraClustersClient { subClient, _ := NewCassandraClustersClient(c.subscriptionID, c.credential, c.options) return subClient diff --git a/sdk/resourcemanager/cosmos/armcosmos/collection_client.go b/sdk/resourcemanager/cosmos/armcosmos/collection_client.go index 7b7a887f7445..bc17cd4dcfd8 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/collection_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/collection_client.go @@ -46,7 +46,7 @@ func NewCollectionClient(subscriptionID string, credential azcore.TokenCredentia // NewListMetricDefinitionsPager - Retrieves metric definitions for the given collection. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseRid - Cosmos DB database rid. @@ -103,7 +103,7 @@ func (client *CollectionClient) listMetricDefinitionsCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -120,7 +120,7 @@ func (client *CollectionClient) listMetricDefinitionsHandleResponse(resp *http.R // NewListMetricsPager - Retrieves the metrics determined by the given filter for the given database account and collection. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseRid - Cosmos DB database rid. @@ -180,7 +180,7 @@ func (client *CollectionClient) listMetricsCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") reqQP.Set("$filter", filter) req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} @@ -198,7 +198,7 @@ func (client *CollectionClient) listMetricsHandleResponse(resp *http.Response) ( // NewListUsagesPager - Retrieves the usages (most recent storage data) for the given collection. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseRid - Cosmos DB database rid. @@ -255,7 +255,7 @@ func (client *CollectionClient) listUsagesCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/cosmos/armcosmos/collection_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/collection_client_example_test.go index 52ef4f56398a..ec3bdc78c1d9 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/collection_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/collection_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCollectionGetMetrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBCollectionGetMetrics.json func ExampleCollectionClient_NewListMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -81,7 +81,7 @@ func ExampleCollectionClient_NewListMetricsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCollectionGetUsages.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBCollectionGetUsages.json func ExampleCollectionClient_NewListUsagesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -119,7 +119,7 @@ func ExampleCollectionClient_NewListUsagesPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCollectionGetMetricDefinitions.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBCollectionGetMetricDefinitions.json func ExampleCollectionClient_NewListMetricDefinitionsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/collectionpartition_client.go b/sdk/resourcemanager/cosmos/armcosmos/collectionpartition_client.go index 8c2366a12d44..286a0dfd4fc4 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/collectionpartition_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/collectionpartition_client.go @@ -46,7 +46,7 @@ func NewCollectionPartitionClient(subscriptionID string, credential azcore.Token // NewListMetricsPager - Retrieves the metrics determined by the given filter for the given collection, split by partition. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseRid - Cosmos DB database rid. @@ -106,7 +106,7 @@ func (client *CollectionPartitionClient) listMetricsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") reqQP.Set("$filter", filter) req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} @@ -124,7 +124,7 @@ func (client *CollectionPartitionClient) listMetricsHandleResponse(resp *http.Re // NewListUsagesPager - Retrieves the usages (most recent storage data) for the given collection, split by partition. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseRid - Cosmos DB database rid. @@ -181,7 +181,7 @@ func (client *CollectionPartitionClient) listUsagesCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/cosmos/armcosmos/collectionpartition_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/collectionpartition_client_example_test.go index 91455356c428..6a6dc0a6e045 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/collectionpartition_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/collectionpartition_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCollectionPartitionGetMetrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBCollectionPartitionGetMetrics.json func ExampleCollectionPartitionClient_NewListMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -83,7 +83,7 @@ func ExampleCollectionPartitionClient_NewListMetricsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCollectionPartitionGetUsages.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBCollectionPartitionGetUsages.json func ExampleCollectionPartitionClient_NewListUsagesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/collectionpartitionregion_client.go b/sdk/resourcemanager/cosmos/armcosmos/collectionpartitionregion_client.go index 728eef7c5d63..887169e1a0e8 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/collectionpartitionregion_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/collectionpartitionregion_client.go @@ -47,7 +47,7 @@ func NewCollectionPartitionRegionClient(subscriptionID string, credential azcore // NewListMetricsPager - Retrieves the metrics determined by the given filter for the given collection and region, split by // partition. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - region - Cosmos DB region, with spaces between words and each word capitalized. @@ -112,7 +112,7 @@ func (client *CollectionPartitionRegionClient) listMetricsCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") reqQP.Set("$filter", filter) req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} diff --git a/sdk/resourcemanager/cosmos/armcosmos/collectionpartitionregion_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/collectionpartitionregion_client_example_test.go index 356321689736..c6fa5d8c8b00 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/collectionpartitionregion_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/collectionpartitionregion_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBCollectionPartitionRegionGetMetrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBCollectionPartitionRegionGetMetrics.json func ExampleCollectionPartitionRegionClient_NewListMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/collectionregion_client.go b/sdk/resourcemanager/cosmos/armcosmos/collectionregion_client.go index 0202ca9af252..cdc681d727d7 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/collectionregion_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/collectionregion_client.go @@ -47,7 +47,7 @@ func NewCollectionRegionClient(subscriptionID string, credential azcore.TokenCre // NewListMetricsPager - Retrieves the metrics determined by the given filter for the given database account, collection and // region. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - region - Cosmos DB region, with spaces between words and each word capitalized. @@ -112,7 +112,7 @@ func (client *CollectionRegionClient) listMetricsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") reqQP.Set("$filter", filter) req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} diff --git a/sdk/resourcemanager/cosmos/armcosmos/collectionregion_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/collectionregion_client_example_test.go index c8ce9a7c7f55..3f91bfcd7932 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/collectionregion_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/collectionregion_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBRegionCollectionGetMetrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBRegionCollectionGetMetrics.json func ExampleCollectionRegionClient_NewListMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/constants.go b/sdk/resourcemanager/cosmos/armcosmos/constants.go index 6abb97a47671..a2bea4095927 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/constants.go +++ b/sdk/resourcemanager/cosmos/armcosmos/constants.go @@ -11,7 +11,7 @@ package armcosmos const ( moduleName = "armcosmos" - moduleVersion = "v2.3.0-beta.1" + moduleVersion = "v2.3.0" ) // APIType - Enum to indicate the API type of the restorable database account. @@ -56,12 +56,11 @@ func PossibleAnalyticalStorageSchemaTypeValues() []AnalyticalStorageSchemaType { // AuthenticationMethod - Which authentication method Cassandra should use to authenticate clients. 'None' turns off authentication, // so should not be used except in emergencies. 'Cassandra' is the default password based -// authentication. The default is 'Cassandra'. 'Ldap' is in preview. +// authentication. The default is 'Cassandra'. type AuthenticationMethod string const ( AuthenticationMethodCassandra AuthenticationMethod = "Cassandra" - AuthenticationMethodLdap AuthenticationMethod = "Ldap" AuthenticationMethodNone AuthenticationMethod = "None" ) @@ -69,7 +68,6 @@ const ( func PossibleAuthenticationMethodValues() []AuthenticationMethod { return []AuthenticationMethod{ AuthenticationMethodCassandra, - AuthenticationMethodLdap, AuthenticationMethodNone, } } @@ -198,22 +196,6 @@ func PossibleConnectorOfferValues() []ConnectorOffer { } } -// ContinuousTier - Enum to indicate type of Continuous backup tier. -type ContinuousTier string - -const ( - ContinuousTierContinuous30Days ContinuousTier = "Continuous30Days" - ContinuousTierContinuous7Days ContinuousTier = "Continuous7Days" -) - -// PossibleContinuousTierValues returns the possible values for the ContinuousTier const type. -func PossibleContinuousTierValues() []ContinuousTier { - return []ContinuousTier{ - ContinuousTierContinuous30Days, - ContinuousTierContinuous7Days, - } -} - // CreateMode - Enum to indicate the mode of account creation. type CreateMode string @@ -250,23 +232,6 @@ func PossibleCreatedByTypeValues() []CreatedByType { } } -type DataTransferComponent string - -const ( - DataTransferComponentAzureBlobStorage DataTransferComponent = "AzureBlobStorage" - DataTransferComponentCosmosDBCassandra DataTransferComponent = "CosmosDBCassandra" - DataTransferComponentCosmosDBSQL DataTransferComponent = "CosmosDBSql" -) - -// PossibleDataTransferComponentValues returns the possible values for the DataTransferComponent const type. -func PossibleDataTransferComponentValues() []DataTransferComponent { - return []DataTransferComponent{ - DataTransferComponentAzureBlobStorage, - DataTransferComponentCosmosDBCassandra, - DataTransferComponentCosmosDBSQL, - } -} - // DataType - The datatype for which the indexing behavior is applied to. type DataType string @@ -331,24 +296,6 @@ func PossibleDefaultConsistencyLevelValues() []DefaultConsistencyLevel { } } -// EnableFullTextQuery - Describe the level of detail with which queries are to be logged. -type EnableFullTextQuery string - -const ( - EnableFullTextQueryNone EnableFullTextQuery = "None" - EnableFullTextQueryTrue EnableFullTextQuery = "True" - EnableFullTextQueryFalse EnableFullTextQuery = "False" -) - -// PossibleEnableFullTextQueryValues returns the possible values for the EnableFullTextQuery const type. -func PossibleEnableFullTextQueryValues() []EnableFullTextQuery { - return []EnableFullTextQuery{ - EnableFullTextQueryNone, - EnableFullTextQueryTrue, - EnableFullTextQueryFalse, - } -} - // IndexKind - Indicates the type of index. type IndexKind string @@ -553,7 +500,6 @@ type OperationType string const ( OperationTypeCreate OperationType = "Create" OperationTypeDelete OperationType = "Delete" - OperationTypeRecreate OperationType = "Recreate" OperationTypeReplace OperationType = "Replace" OperationTypeSystemOperation OperationType = "SystemOperation" ) @@ -563,7 +509,6 @@ func PossibleOperationTypeValues() []OperationType { return []OperationType{ OperationTypeCreate, OperationTypeDelete, - OperationTypeRecreate, OperationTypeReplace, OperationTypeSystemOperation, } @@ -782,24 +727,6 @@ func PossibleSpatialTypeValues() []SpatialType { } } -// ThroughputPolicyType - ThroughputPolicy to apply for throughput redistribution -type ThroughputPolicyType string - -const ( - ThroughputPolicyTypeCustom ThroughputPolicyType = "custom" - ThroughputPolicyTypeEqual ThroughputPolicyType = "equal" - ThroughputPolicyTypeNone ThroughputPolicyType = "none" -) - -// PossibleThroughputPolicyTypeValues returns the possible values for the ThroughputPolicyType const type. -func PossibleThroughputPolicyTypeValues() []ThroughputPolicyType { - return []ThroughputPolicyType{ - ThroughputPolicyTypeCustom, - ThroughputPolicyTypeEqual, - ThroughputPolicyTypeNone, - } -} - // TriggerOperation - The operation the trigger is associated with type TriggerOperation string diff --git a/sdk/resourcemanager/cosmos/armcosmos/database_client.go b/sdk/resourcemanager/cosmos/armcosmos/database_client.go index 48bd85edf449..930f114b2a5e 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/database_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/database_client.go @@ -46,7 +46,7 @@ func NewDatabaseClient(subscriptionID string, credential azcore.TokenCredential, // NewListMetricDefinitionsPager - Retrieves metric definitions for the given database. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseRid - Cosmos DB database rid. @@ -98,7 +98,7 @@ func (client *DatabaseClient) listMetricDefinitionsCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -115,7 +115,7 @@ func (client *DatabaseClient) listMetricDefinitionsHandleResponse(resp *http.Res // NewListMetricsPager - Retrieves the metrics determined by the given filter for the given database account and database. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseRid - Cosmos DB database rid. @@ -170,7 +170,7 @@ func (client *DatabaseClient) listMetricsCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") reqQP.Set("$filter", filter) req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} @@ -188,7 +188,7 @@ func (client *DatabaseClient) listMetricsHandleResponse(resp *http.Response) (Da // NewListUsagesPager - Retrieves the usages (most recent data) for the given database. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseRid - Cosmos DB database rid. @@ -239,7 +239,7 @@ func (client *DatabaseClient) listUsagesCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/cosmos/armcosmos/database_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/database_client_example_test.go index 1c8b5d93b2b5..85efb34af8d9 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/database_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/database_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDatabaseGetMetrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDatabaseGetMetrics.json func ExampleDatabaseClient_NewListMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -81,7 +81,7 @@ func ExampleDatabaseClient_NewListMetricsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDatabaseGetUsages.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDatabaseGetUsages.json func ExampleDatabaseClient_NewListUsagesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -119,7 +119,7 @@ func ExampleDatabaseClient_NewListUsagesPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDatabaseGetMetricDefinitions.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDatabaseGetMetricDefinitions.json func ExampleDatabaseClient_NewListMetricDefinitionsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/databaseaccountregion_client.go b/sdk/resourcemanager/cosmos/armcosmos/databaseaccountregion_client.go index c261816fe7bb..5bd726c94306 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/databaseaccountregion_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/databaseaccountregion_client.go @@ -46,7 +46,7 @@ func NewDatabaseAccountRegionClient(subscriptionID string, credential azcore.Tok // NewListMetricsPager - Retrieves the metrics determined by the given filter for the given database account and region. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - region - Cosmos DB region, with spaces between words and each word capitalized. @@ -101,7 +101,7 @@ func (client *DatabaseAccountRegionClient) listMetricsCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") reqQP.Set("$filter", filter) req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} diff --git a/sdk/resourcemanager/cosmos/armcosmos/databaseaccountregion_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/databaseaccountregion_client_example_test.go index 79c653077b95..857ce652dd43 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/databaseaccountregion_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/databaseaccountregion_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDatabaseAccountRegionGetMetrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDatabaseAccountRegionGetMetrics.json func ExampleDatabaseAccountRegionClient_NewListMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/databaseaccounts_client.go b/sdk/resourcemanager/cosmos/armcosmos/databaseaccounts_client.go index 9e3cca9a4861..4a2a91c481ff 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/databaseaccounts_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/databaseaccounts_client.go @@ -47,7 +47,7 @@ func NewDatabaseAccountsClient(subscriptionID string, credential azcore.TokenCre // CheckNameExists - Checks that the Azure Cosmos DB account name already exists. A valid account name may contain only lowercase // letters, numbers, and the '-' character, and must be between 3 and 50 characters. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - accountName - Cosmos DB database account name. // - options - DatabaseAccountsClientCheckNameExistsOptions contains the optional parameters for the DatabaseAccountsClient.CheckNameExists // method. @@ -78,7 +78,7 @@ func (client *DatabaseAccountsClient) checkNameExistsCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -87,7 +87,7 @@ func (client *DatabaseAccountsClient) checkNameExistsCreateRequest(ctx context.C // updates on an account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - createUpdateParameters - The parameters to provide for the current database account. @@ -109,7 +109,7 @@ func (client *DatabaseAccountsClient) BeginCreateOrUpdate(ctx context.Context, r // updates on an account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *DatabaseAccountsClient) createOrUpdate(ctx context.Context, resourceGroupName string, accountName string, createUpdateParameters DatabaseAccountCreateUpdateParameters, options *DatabaseAccountsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, accountName, createUpdateParameters, options) if err != nil { @@ -145,7 +145,7 @@ func (client *DatabaseAccountsClient) createOrUpdateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, createUpdateParameters) @@ -154,7 +154,7 @@ func (client *DatabaseAccountsClient) createOrUpdateCreateRequest(ctx context.Co // BeginDelete - Deletes an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - DatabaseAccountsClientBeginDeleteOptions contains the optional parameters for the DatabaseAccountsClient.BeginDelete @@ -174,7 +174,7 @@ func (client *DatabaseAccountsClient) BeginDelete(ctx context.Context, resourceG // Delete - Deletes an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *DatabaseAccountsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, options *DatabaseAccountsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, options) if err != nil { @@ -210,7 +210,7 @@ func (client *DatabaseAccountsClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -220,7 +220,7 @@ func (client *DatabaseAccountsClient) deleteCreateRequest(ctx context.Context, r // Failover priority values must be unique for each of the regions in which the database account exists. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - failoverParameters - The new failover policies for the database account. @@ -243,7 +243,7 @@ func (client *DatabaseAccountsClient) BeginFailoverPriorityChange(ctx context.Co // Failover priority values must be unique for each of the regions in which the database account exists. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *DatabaseAccountsClient) failoverPriorityChange(ctx context.Context, resourceGroupName string, accountName string, failoverParameters FailoverPolicies, options *DatabaseAccountsClientBeginFailoverPriorityChangeOptions) (*http.Response, error) { req, err := client.failoverPriorityChangeCreateRequest(ctx, resourceGroupName, accountName, failoverParameters, options) if err != nil { @@ -279,7 +279,7 @@ func (client *DatabaseAccountsClient) failoverPriorityChangeCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() return req, runtime.MarshalAsJSON(req, failoverParameters) } @@ -287,7 +287,7 @@ func (client *DatabaseAccountsClient) failoverPriorityChangeCreateRequest(ctx co // Get - Retrieves the properties of an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - DatabaseAccountsClientGetOptions contains the optional parameters for the DatabaseAccountsClient.Get method. @@ -326,7 +326,7 @@ func (client *DatabaseAccountsClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -344,7 +344,7 @@ func (client *DatabaseAccountsClient) getHandleResponse(resp *http.Response) (Da // GetReadOnlyKeys - Lists the read-only access keys for the specified Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - DatabaseAccountsClientGetReadOnlyKeysOptions contains the optional parameters for the DatabaseAccountsClient.GetReadOnlyKeys @@ -384,7 +384,7 @@ func (client *DatabaseAccountsClient) getReadOnlyKeysCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -401,7 +401,7 @@ func (client *DatabaseAccountsClient) getReadOnlyKeysHandleResponse(resp *http.R // NewListPager - Lists all the Azure Cosmos DB database accounts available under the subscription. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - options - DatabaseAccountsClientListOptions contains the optional parameters for the DatabaseAccountsClient.NewListPager // method. func (client *DatabaseAccountsClient) NewListPager(options *DatabaseAccountsClientListOptions) *runtime.Pager[DatabaseAccountsClientListResponse] { @@ -438,7 +438,7 @@ func (client *DatabaseAccountsClient) listCreateRequest(ctx context.Context, opt return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -455,7 +455,7 @@ func (client *DatabaseAccountsClient) listHandleResponse(resp *http.Response) (D // NewListByResourceGroupPager - Lists all the Azure Cosmos DB database accounts available under the given resource group. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - DatabaseAccountsClientListByResourceGroupOptions contains the optional parameters for the DatabaseAccountsClient.NewListByResourceGroupPager // method. @@ -497,7 +497,7 @@ func (client *DatabaseAccountsClient) listByResourceGroupCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -515,7 +515,7 @@ func (client *DatabaseAccountsClient) listByResourceGroupHandleResponse(resp *ht // ListConnectionStrings - Lists the connection strings for the specified Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - DatabaseAccountsClientListConnectionStringsOptions contains the optional parameters for the DatabaseAccountsClient.ListConnectionStrings @@ -555,7 +555,7 @@ func (client *DatabaseAccountsClient) listConnectionStringsCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -573,7 +573,7 @@ func (client *DatabaseAccountsClient) listConnectionStringsHandleResponse(resp * // ListKeys - Lists the access keys for the specified Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - DatabaseAccountsClientListKeysOptions contains the optional parameters for the DatabaseAccountsClient.ListKeys @@ -613,7 +613,7 @@ func (client *DatabaseAccountsClient) listKeysCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -630,7 +630,7 @@ func (client *DatabaseAccountsClient) listKeysHandleResponse(resp *http.Response // NewListMetricDefinitionsPager - Retrieves metric definitions for the given database account. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - DatabaseAccountsClientListMetricDefinitionsOptions contains the optional parameters for the DatabaseAccountsClient.NewListMetricDefinitionsPager @@ -677,7 +677,7 @@ func (client *DatabaseAccountsClient) listMetricDefinitionsCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -694,7 +694,7 @@ func (client *DatabaseAccountsClient) listMetricDefinitionsHandleResponse(resp * // NewListMetricsPager - Retrieves the metrics determined by the given filter for the given database account. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - filter - An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are @@ -744,7 +744,7 @@ func (client *DatabaseAccountsClient) listMetricsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") reqQP.Set("$filter", filter) req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} @@ -763,7 +763,7 @@ func (client *DatabaseAccountsClient) listMetricsHandleResponse(resp *http.Respo // ListReadOnlyKeys - Lists the read-only access keys for the specified Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - DatabaseAccountsClientListReadOnlyKeysOptions contains the optional parameters for the DatabaseAccountsClient.ListReadOnlyKeys @@ -803,7 +803,7 @@ func (client *DatabaseAccountsClient) listReadOnlyKeysCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -820,7 +820,7 @@ func (client *DatabaseAccountsClient) listReadOnlyKeysHandleResponse(resp *http. // NewListUsagesPager - Retrieves the usages (most recent data) for the given database account. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - DatabaseAccountsClientListUsagesOptions contains the optional parameters for the DatabaseAccountsClient.NewListUsagesPager @@ -867,7 +867,7 @@ func (client *DatabaseAccountsClient) listUsagesCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } @@ -888,7 +888,7 @@ func (client *DatabaseAccountsClient) listUsagesHandleResponse(resp *http.Respon // BeginOfflineRegion - Offline the specified region for the specified Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - regionParameterForOffline - Cosmos DB region to offline for the database account. @@ -909,7 +909,7 @@ func (client *DatabaseAccountsClient) BeginOfflineRegion(ctx context.Context, re // OfflineRegion - Offline the specified region for the specified Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *DatabaseAccountsClient) offlineRegion(ctx context.Context, resourceGroupName string, accountName string, regionParameterForOffline RegionForOnlineOffline, options *DatabaseAccountsClientBeginOfflineRegionOptions) (*http.Response, error) { req, err := client.offlineRegionCreateRequest(ctx, resourceGroupName, accountName, regionParameterForOffline, options) if err != nil { @@ -945,7 +945,7 @@ func (client *DatabaseAccountsClient) offlineRegionCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, regionParameterForOffline) @@ -954,7 +954,7 @@ func (client *DatabaseAccountsClient) offlineRegionCreateRequest(ctx context.Con // BeginOnlineRegion - Online the specified region for the specified Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - regionParameterForOnline - Cosmos DB region to online for the database account. @@ -975,7 +975,7 @@ func (client *DatabaseAccountsClient) BeginOnlineRegion(ctx context.Context, res // OnlineRegion - Online the specified region for the specified Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *DatabaseAccountsClient) onlineRegion(ctx context.Context, resourceGroupName string, accountName string, regionParameterForOnline RegionForOnlineOffline, options *DatabaseAccountsClientBeginOnlineRegionOptions) (*http.Response, error) { req, err := client.onlineRegionCreateRequest(ctx, resourceGroupName, accountName, regionParameterForOnline, options) if err != nil { @@ -1011,7 +1011,7 @@ func (client *DatabaseAccountsClient) onlineRegionCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, regionParameterForOnline) @@ -1020,7 +1020,7 @@ func (client *DatabaseAccountsClient) onlineRegionCreateRequest(ctx context.Cont // BeginRegenerateKey - Regenerates an access key for the specified Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyToRegenerate - The name of the key to regenerate. @@ -1041,7 +1041,7 @@ func (client *DatabaseAccountsClient) BeginRegenerateKey(ctx context.Context, re // RegenerateKey - Regenerates an access key for the specified Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *DatabaseAccountsClient) regenerateKey(ctx context.Context, resourceGroupName string, accountName string, keyToRegenerate DatabaseAccountRegenerateKeyParameters, options *DatabaseAccountsClientBeginRegenerateKeyOptions) (*http.Response, error) { req, err := client.regenerateKeyCreateRequest(ctx, resourceGroupName, accountName, keyToRegenerate, options) if err != nil { @@ -1077,7 +1077,7 @@ func (client *DatabaseAccountsClient) regenerateKeyCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() return req, runtime.MarshalAsJSON(req, keyToRegenerate) } @@ -1085,7 +1085,7 @@ func (client *DatabaseAccountsClient) regenerateKeyCreateRequest(ctx context.Con // BeginUpdate - Updates the properties of an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - updateParameters - The parameters to provide for the current database account. @@ -1106,7 +1106,7 @@ func (client *DatabaseAccountsClient) BeginUpdate(ctx context.Context, resourceG // Update - Updates the properties of an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *DatabaseAccountsClient) update(ctx context.Context, resourceGroupName string, accountName string, updateParameters DatabaseAccountUpdateParameters, options *DatabaseAccountsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, accountName, updateParameters, options) if err != nil { @@ -1142,7 +1142,7 @@ func (client *DatabaseAccountsClient) updateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, updateParameters) diff --git a/sdk/resourcemanager/cosmos/armcosmos/databaseaccounts_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/databaseaccounts_client_example_test.go index 44c7f0ccf8d5..b329a64948c0 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/databaseaccounts_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/databaseaccounts_client_example_test.go @@ -20,7 +20,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDatabaseAccountGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDatabaseAccountGet.json func ExampleDatabaseAccountsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -42,6 +42,9 @@ func ExampleDatabaseAccountsClient_Get() { // Name: to.Ptr("ddb1"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1"), + // Location: to.Ptr("West US"), + // Tags: map[string]*string{ + // }, // Identity: &armcosmos.ManagedServiceIdentity{ // Type: to.Ptr(armcosmos.ResourceIdentityTypeSystemAssignedUserAssigned), // PrincipalID: to.Ptr("52f4fef3-3c3f-4ff3-b52e-b5c9eeb68656"), @@ -53,9 +56,6 @@ func ExampleDatabaseAccountsClient_Get() { // }, // }, // }, - // Location: to.Ptr("West US"), - // Tags: map[string]*string{ - // }, // Kind: to.Ptr(armcosmos.DatabaseAccountKindGlobalDocumentDB), // Properties: &armcosmos.DatabaseAccountGetProperties{ // AnalyticalStorageConfiguration: &armcosmos.AnalyticalStorageConfiguration{ @@ -86,15 +86,10 @@ func ExampleDatabaseAccountsClient_Get() { // CreateMode: to.Ptr(armcosmos.CreateModeDefault), // DatabaseAccountOfferType: to.Ptr("Standard"), // DefaultIdentity: to.Ptr("FirstPartyIdentity"), - // DiagnosticLogSettings: &armcosmos.DiagnosticLogSettings{ - // EnableFullTextQuery: to.Ptr(armcosmos.EnableFullTextQueryFalse), - // }, // DisableKeyBasedMetadataWriteAccess: to.Ptr(false), // DocumentEndpoint: to.Ptr("https://ddb1.documents.azure.com:443/"), // EnableAnalyticalStorage: to.Ptr(true), - // EnableBurstCapacity: to.Ptr(true), // EnableFreeTier: to.Ptr(false), - // EnableMaterializedViews: to.Ptr(false), // EnablePartitionMerge: to.Ptr(true), // FailoverPolicies: []*armcosmos.FailoverPolicy{ // { @@ -168,7 +163,7 @@ func ExampleDatabaseAccountsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDatabaseAccountPatch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDatabaseAccountPatch.json func ExampleDatabaseAccountsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -196,7 +191,7 @@ func ExampleDatabaseAccountsClient_BeginUpdate() { PeriodicModeProperties: &armcosmos.PeriodicModeProperties{ BackupIntervalInMinutes: to.Ptr[int32](240), BackupRetentionIntervalInHours: to.Ptr[int32](720), - BackupStorageRedundancy: to.Ptr(armcosmos.BackupStorageRedundancyGeo), + BackupStorageRedundancy: to.Ptr(armcosmos.BackupStorageRedundancyLocal), }, }, Capacity: &armcosmos.Capacity{ @@ -207,12 +202,8 @@ func ExampleDatabaseAccountsClient_BeginUpdate() { MaxIntervalInSeconds: to.Ptr[int32](10), MaxStalenessPrefix: to.Ptr[int64](200), }, - DefaultIdentity: to.Ptr("FirstPartyIdentity"), - DiagnosticLogSettings: &armcosmos.DiagnosticLogSettings{ - EnableFullTextQuery: to.Ptr(armcosmos.EnableFullTextQueryTrue), - }, + DefaultIdentity: to.Ptr("FirstPartyIdentity"), EnableAnalyticalStorage: to.Ptr(true), - EnableBurstCapacity: to.Ptr(true), EnableFreeTier: to.Ptr(false), EnablePartitionMerge: to.Ptr(true), IPRules: []*armcosmos.IPAddressOrRange{ @@ -251,6 +242,10 @@ func ExampleDatabaseAccountsClient_BeginUpdate() { // Name: to.Ptr("ddb1"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1"), + // Location: to.Ptr("West US"), + // Tags: map[string]*string{ + // "dept": to.Ptr("finance"), + // }, // Identity: &armcosmos.ManagedServiceIdentity{ // Type: to.Ptr(armcosmos.ResourceIdentityTypeSystemAssignedUserAssigned), // PrincipalID: to.Ptr("52f4fef3-3c3f-4ff3-b52e-b5c9eeb68656"), @@ -258,14 +253,10 @@ func ExampleDatabaseAccountsClient_BeginUpdate() { // UserAssignedIdentities: map[string]*armcosmos.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties{ // "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armcosmos.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties{ // ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"), - // PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"), + // PrincipalID: to.Ptr("33e01921-4d64-4f8c-a055-5bdaffd5e33d"), // }, // }, // }, - // Location: to.Ptr("West US"), - // Tags: map[string]*string{ - // "dept": to.Ptr("finance"), - // }, // Kind: to.Ptr(armcosmos.DatabaseAccountKindGlobalDocumentDB), // Properties: &armcosmos.DatabaseAccountGetProperties{ // AnalyticalStorageConfiguration: &armcosmos.AnalyticalStorageConfiguration{ @@ -278,7 +269,7 @@ func ExampleDatabaseAccountsClient_BeginUpdate() { // PeriodicModeProperties: &armcosmos.PeriodicModeProperties{ // BackupIntervalInMinutes: to.Ptr[int32](240), // BackupRetentionIntervalInHours: to.Ptr[int32](720), - // BackupStorageRedundancy: to.Ptr(armcosmos.BackupStorageRedundancyGeo), + // BackupStorageRedundancy: to.Ptr(armcosmos.BackupStorageRedundancyLocal), // }, // }, // Capacity: &armcosmos.Capacity{ @@ -291,25 +282,19 @@ func ExampleDatabaseAccountsClient_BeginUpdate() { // }, // Cors: []*armcosmos.CorsPolicy{ // }, - // CreateMode: to.Ptr(armcosmos.CreateModeDefault), // DatabaseAccountOfferType: to.Ptr("Standard"), // DefaultIdentity: to.Ptr("FirstPartyIdentity"), - // DiagnosticLogSettings: &armcosmos.DiagnosticLogSettings{ - // EnableFullTextQuery: to.Ptr(armcosmos.EnableFullTextQueryTrue), - // }, // DisableKeyBasedMetadataWriteAccess: to.Ptr(false), // DocumentEndpoint: to.Ptr("https://ddb1.documents.azure.com:443/"), // EnableAnalyticalStorage: to.Ptr(true), - // EnableBurstCapacity: to.Ptr(true), // EnableFreeTier: to.Ptr(false), - // EnableMaterializedViews: to.Ptr(false), + // EnablePartitionMerge: to.Ptr(true), // FailoverPolicies: []*armcosmos.FailoverPolicy{ // { // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-eastus"), // LocationName: to.Ptr("East US"), // }}, - // InstanceID: to.Ptr("d9b26648-2f53-4541-b3d8-3044f4f9810d"), // IPRules: []*armcosmos.IPAddressOrRange{ // { // IPAddressOrRange: to.Ptr("23.43.230.120"), @@ -380,13 +365,10 @@ func ExampleDatabaseAccountsClient_BeginUpdate() { // ProvisioningState: to.Ptr("Succeeded"), // }}, // }, - // SystemData: &armcosmos.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09Z"); return t}()), - // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDatabaseAccountCreateMax.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDatabaseAccountCreateMax.json func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbDatabaseAccountCreateMax() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -398,15 +380,15 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbDatabaseAccountCr log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabaseAccountsClient().BeginCreateOrUpdate(ctx, "rg1", "ddb1", armcosmos.DatabaseAccountCreateUpdateParameters{ + Location: to.Ptr("westus"), + Tags: map[string]*string{}, Identity: &armcosmos.ManagedServiceIdentity{ Type: to.Ptr(armcosmos.ResourceIdentityTypeSystemAssignedUserAssigned), UserAssignedIdentities: map[string]*armcosmos.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties{ "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {}, }, }, - Location: to.Ptr("westus"), - Tags: map[string]*string{}, - Kind: to.Ptr(armcosmos.DatabaseAccountKindMongoDB), + Kind: to.Ptr(armcosmos.DatabaseAccountKindMongoDB), Properties: &armcosmos.DatabaseAccountCreateUpdateProperties{ AnalyticalStorageConfiguration: &armcosmos.AnalyticalStorageConfiguration{ SchemaType: to.Ptr(armcosmos.AnalyticalStorageSchemaTypeWellDefined), @@ -438,9 +420,7 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbDatabaseAccountCr DatabaseAccountOfferType: to.Ptr("Standard"), DefaultIdentity: to.Ptr("FirstPartyIdentity"), EnableAnalyticalStorage: to.Ptr(true), - EnableBurstCapacity: to.Ptr(true), EnableFreeTier: to.Ptr(false), - EnableMaterializedViews: to.Ptr(false), IPRules: []*armcosmos.IPAddressOrRange{ { IPAddressOrRange: to.Ptr("23.43.230.120"), @@ -487,6 +467,9 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbDatabaseAccountCr // Name: to.Ptr("ddb1"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1"), + // Location: to.Ptr("West US"), + // Tags: map[string]*string{ + // }, // Identity: &armcosmos.ManagedServiceIdentity{ // Type: to.Ptr(armcosmos.ResourceIdentityTypeSystemAssignedUserAssigned), // PrincipalID: to.Ptr("52f4fef3-3c3f-4ff3-b52e-b5c9eeb68656"), @@ -494,13 +477,10 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbDatabaseAccountCr // UserAssignedIdentities: map[string]*armcosmos.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties{ // "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armcosmos.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties{ // ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"), - // PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"), + // PrincipalID: to.Ptr("33e01921-4d64-4f8c-a055-5bdaffd5e33d"), // }, // }, // }, - // Location: to.Ptr("West US"), - // Tags: map[string]*string{ - // }, // Kind: to.Ptr(armcosmos.DatabaseAccountKindMongoDB), // Properties: &armcosmos.DatabaseAccountGetProperties{ // AnalyticalStorageConfiguration: &armcosmos.AnalyticalStorageConfiguration{ @@ -534,9 +514,7 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbDatabaseAccountCr // DefaultIdentity: to.Ptr("FirstPartyIdentity"), // DisableKeyBasedMetadataWriteAccess: to.Ptr(false), // EnableAnalyticalStorage: to.Ptr(true), - // EnableBurstCapacity: to.Ptr(true), // EnableFreeTier: to.Ptr(false), - // EnableMaterializedViews: to.Ptr(false), // FailoverPolicies: []*armcosmos.FailoverPolicy{ // { // FailoverPriority: to.Ptr[int32](0), @@ -560,16 +538,16 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbDatabaseAccountCr // KeyVaultKeyURI: to.Ptr("https://myKeyVault.vault.azure.net"), // KeysMetadata: &armcosmos.DatabaseAccountKeysMetadata{ // PrimaryMasterKey: &armcosmos.AccountKeyMetadata{ - // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11Z"); return t}()), + // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09Z"); return t}()), // }, // PrimaryReadonlyMasterKey: &armcosmos.AccountKeyMetadata{ - // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11Z"); return t}()), + // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09Z"); return t}()), // }, // SecondaryMasterKey: &armcosmos.AccountKeyMetadata{ - // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11Z"); return t}()), + // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09Z"); return t}()), // }, // SecondaryReadonlyMasterKey: &armcosmos.AccountKeyMetadata{ - // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11Z"); return t}()), + // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09Z"); return t}()), // }, // }, // Locations: []*armcosmos.Location{ @@ -627,7 +605,7 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbDatabaseAccountCr // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDatabaseAccountCreateMin.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDatabaseAccountCreateMin.json func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbDatabaseAccountCreateMin() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -692,7 +670,6 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbDatabaseAccountCr // DisableKeyBasedMetadataWriteAccess: to.Ptr(false), // EnableAnalyticalStorage: to.Ptr(false), // EnableFreeTier: to.Ptr(false), - // EnableMaterializedViews: to.Ptr(false), // FailoverPolicies: []*armcosmos.FailoverPolicy{ // { // FailoverPriority: to.Ptr[int32](0), @@ -704,16 +681,16 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbDatabaseAccountCr // }, // KeysMetadata: &armcosmos.DatabaseAccountKeysMetadata{ // PrimaryMasterKey: &armcosmos.AccountKeyMetadata{ - // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11Z"); return t}()), + // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09Z"); return t}()), // }, // PrimaryReadonlyMasterKey: &armcosmos.AccountKeyMetadata{ - // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11Z"); return t}()), + // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09Z"); return t}()), // }, // SecondaryMasterKey: &armcosmos.AccountKeyMetadata{ - // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11Z"); return t}()), + // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09Z"); return t}()), // }, // SecondaryReadonlyMasterKey: &armcosmos.AccountKeyMetadata{ - // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11Z"); return t}()), + // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09Z"); return t}()), // }, // }, // Locations: []*armcosmos.Location{ @@ -752,7 +729,7 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbDatabaseAccountCr // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBRestoreDatabaseAccountCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBRestoreDatabaseAccountCreateUpdate.json func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbRestoreDatabaseAccountCreateUpdateJson() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -773,9 +750,6 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbRestoreDatabaseAc }, BackupPolicy: &armcosmos.ContinuousModeBackupPolicy{ Type: to.Ptr(armcosmos.BackupPolicyTypeContinuous), - ContinuousModeProperties: &armcosmos.ContinuousModeProperties{ - Tier: to.Ptr(armcosmos.ContinuousTierContinuous30Days), - }, }, ConsistencyPolicy: &armcosmos.ConsistencyPolicy{ DefaultConsistencyLevel: to.Ptr(armcosmos.DefaultConsistencyLevelBoundedStaleness), @@ -786,7 +760,6 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbRestoreDatabaseAc DatabaseAccountOfferType: to.Ptr("Standard"), EnableAnalyticalStorage: to.Ptr(true), EnableFreeTier: to.Ptr(false), - EnableMaterializedViews: to.Ptr(false), KeyVaultKeyURI: to.Ptr("https://myKeyVault.vault.azure.net"), Locations: []*armcosmos.Location{ { @@ -796,8 +769,6 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbRestoreDatabaseAc }}, MinimalTLSVersion: to.Ptr(armcosmos.MinimalTLSVersionTLS), RestoreParameters: &armcosmos.RestoreParameters{ - RestoreSource: to.Ptr("/subscriptions/subid/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1a97b4bb-f6a0-430e-ade1-638d781830cc"), - RestoreTimestampInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T22:05:09Z"); return t }()), DatabasesToRestore: []*armcosmos.DatabaseRestoreResource{ { CollectionNames: []*string{ @@ -811,8 +782,9 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbRestoreDatabaseAc to.Ptr("collection4")}, DatabaseName: to.Ptr("db2"), }}, - RestoreMode: to.Ptr(armcosmos.RestoreModePointInTime), - SourceBackupLocation: to.Ptr("westus"), + RestoreMode: to.Ptr(armcosmos.RestoreModePointInTime), + RestoreSource: to.Ptr("/subscriptions/subid/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1a97b4bb-f6a0-430e-ade1-638d781830cc"), + RestoreTimestampInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T22:05:09Z"); return t }()), }, }, }, nil) @@ -837,12 +809,6 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbRestoreDatabaseAc // Properties: &armcosmos.DatabaseAccountGetProperties{ // APIProperties: &armcosmos.APIProperties{ // }, - // BackupPolicy: &armcosmos.ContinuousModeBackupPolicy{ - // Type: to.Ptr(armcosmos.BackupPolicyTypeContinuous), - // ContinuousModeProperties: &armcosmos.ContinuousModeProperties{ - // Tier: to.Ptr(armcosmos.ContinuousTierContinuous30Days), - // }, - // }, // ConsistencyPolicy: &armcosmos.ConsistencyPolicy{ // DefaultConsistencyLevel: to.Ptr(armcosmos.DefaultConsistencyLevelSession), // MaxIntervalInSeconds: to.Ptr[int32](5), @@ -853,7 +819,6 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbRestoreDatabaseAc // DisableKeyBasedMetadataWriteAccess: to.Ptr(false), // EnableAnalyticalStorage: to.Ptr(false), // EnableFreeTier: to.Ptr(false), - // EnableMaterializedViews: to.Ptr(false), // FailoverPolicies: []*armcosmos.FailoverPolicy{ // { // FailoverPriority: to.Ptr[int32](0), @@ -886,9 +851,6 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbRestoreDatabaseAc // ProvisioningState: to.Ptr("Succeeded"), // }}, // MinimalTLSVersion: to.Ptr(armcosmos.MinimalTLSVersionTLS), - // NetworkACLBypass: to.Ptr(armcosmos.NetworkACLBypassNone), - // NetworkACLBypassResourceIDs: []*string{ - // }, // ProvisioningState: to.Ptr("Succeeded"), // ReadLocations: []*armcosmos.Location{ // { @@ -913,7 +875,7 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbRestoreDatabaseAc // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDatabaseAccountDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDatabaseAccountDelete.json func ExampleDatabaseAccountsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -934,7 +896,7 @@ func ExampleDatabaseAccountsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDatabaseAccountFailoverPriorityChange.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDatabaseAccountFailoverPriorityChange.json func ExampleDatabaseAccountsClient_BeginFailoverPriorityChange() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -965,7 +927,7 @@ func ExampleDatabaseAccountsClient_BeginFailoverPriorityChange() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDatabaseAccountList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDatabaseAccountList.json func ExampleDatabaseAccountsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -993,6 +955,9 @@ func ExampleDatabaseAccountsClient_NewListPager() { // Name: to.Ptr("ddb1"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1"), + // Location: to.Ptr("West US"), + // Tags: map[string]*string{ + // }, // Identity: &armcosmos.ManagedServiceIdentity{ // Type: to.Ptr(armcosmos.ResourceIdentityTypeSystemAssignedUserAssigned), // PrincipalID: to.Ptr("52f4fef3-3c3f-4ff3-b52e-b5c9eeb68656"), @@ -1004,9 +969,6 @@ func ExampleDatabaseAccountsClient_NewListPager() { // }, // }, // }, - // Location: to.Ptr("West US"), - // Tags: map[string]*string{ - // }, // Kind: to.Ptr(armcosmos.DatabaseAccountKindGlobalDocumentDB), // Properties: &armcosmos.DatabaseAccountGetProperties{ // AnalyticalStorageConfiguration: &armcosmos.AnalyticalStorageConfiguration{ @@ -1035,9 +997,7 @@ func ExampleDatabaseAccountsClient_NewListPager() { // DisableKeyBasedMetadataWriteAccess: to.Ptr(false), // DocumentEndpoint: to.Ptr("https://ddb1.documents.azure.com:443/"), // EnableAnalyticalStorage: to.Ptr(true), - // EnableBurstCapacity: to.Ptr(true), // EnableFreeTier: to.Ptr(false), - // EnableMaterializedViews: to.Ptr(false), // EnablePartitionMerge: to.Ptr(true), // FailoverPolicies: []*armcosmos.FailoverPolicy{ // { @@ -1113,7 +1073,7 @@ func ExampleDatabaseAccountsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDatabaseAccountListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDatabaseAccountListByResourceGroup.json func ExampleDatabaseAccountsClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1141,6 +1101,9 @@ func ExampleDatabaseAccountsClient_NewListByResourceGroupPager() { // Name: to.Ptr("ddb1"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1"), + // Location: to.Ptr("West US"), + // Tags: map[string]*string{ + // }, // Identity: &armcosmos.ManagedServiceIdentity{ // Type: to.Ptr(armcosmos.ResourceIdentityTypeSystemAssignedUserAssigned), // PrincipalID: to.Ptr("52f4fef3-3c3f-4ff3-b52e-b5c9eeb68656"), @@ -1152,19 +1115,8 @@ func ExampleDatabaseAccountsClient_NewListByResourceGroupPager() { // }, // }, // }, - // Location: to.Ptr("West US"), - // Tags: map[string]*string{ - // }, // Kind: to.Ptr(armcosmos.DatabaseAccountKindGlobalDocumentDB), // Properties: &armcosmos.DatabaseAccountGetProperties{ - // BackupPolicy: &armcosmos.PeriodicModeBackupPolicy{ - // Type: to.Ptr(armcosmos.BackupPolicyTypePeriodic), - // PeriodicModeProperties: &armcosmos.PeriodicModeProperties{ - // BackupIntervalInMinutes: to.Ptr[int32](240), - // BackupRetentionIntervalInHours: to.Ptr[int32](720), - // BackupStorageRedundancy: to.Ptr(armcosmos.BackupStorageRedundancyGeo), - // }, - // }, // ConsistencyPolicy: &armcosmos.ConsistencyPolicy{ // DefaultConsistencyLevel: to.Ptr(armcosmos.DefaultConsistencyLevelSession), // MaxIntervalInSeconds: to.Ptr[int32](5), @@ -1172,20 +1124,17 @@ func ExampleDatabaseAccountsClient_NewListByResourceGroupPager() { // }, // Cors: []*armcosmos.CorsPolicy{ // }, - // CreateMode: to.Ptr(armcosmos.CreateModeDefault), // DatabaseAccountOfferType: to.Ptr("Standard"), // DefaultIdentity: to.Ptr("FirstPartyIdentity"), // DisableKeyBasedMetadataWriteAccess: to.Ptr(false), // DocumentEndpoint: to.Ptr("https://ddb1.documents.azure.com:443/"), // EnableFreeTier: to.Ptr(false), - // EnableMaterializedViews: to.Ptr(false), // FailoverPolicies: []*armcosmos.FailoverPolicy{ // { // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-eastus"), // LocationName: to.Ptr("East US"), // }}, - // InstanceID: to.Ptr("d9b26648-2f53-4541-b3d8-3044f4f9810d"), // IPRules: []*armcosmos.IPAddressOrRange{ // }, // KeysMetadata: &armcosmos.DatabaseAccountKeysMetadata{ @@ -1232,15 +1181,12 @@ func ExampleDatabaseAccountsClient_NewListByResourceGroupPager() { // ProvisioningState: to.Ptr("Succeeded"), // }}, // }, - // SystemData: &armcosmos.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09Z"); return t}()), - // }, // }}, // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDatabaseAccountListKeys.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDatabaseAccountListKeys.json func ExampleDatabaseAccountsClient_ListKeys() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1266,7 +1212,7 @@ func ExampleDatabaseAccountsClient_ListKeys() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDatabaseAccountListConnectionStrings.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDatabaseAccountListConnectionStrings.json func ExampleDatabaseAccountsClient_ListConnectionStrings_cosmosDbDatabaseAccountListConnectionStrings() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1288,7 +1234,7 @@ func ExampleDatabaseAccountsClient_ListConnectionStrings_cosmosDbDatabaseAccount // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDatabaseAccountListConnectionStringsMongo.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDatabaseAccountListConnectionStringsMongo.json func ExampleDatabaseAccountsClient_ListConnectionStrings_cosmosDbDatabaseAccountListConnectionStringsMongo() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1315,7 +1261,7 @@ func ExampleDatabaseAccountsClient_ListConnectionStrings_cosmosDbDatabaseAccount // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDatabaseAccountOfflineRegion.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDatabaseAccountOfflineRegion.json func ExampleDatabaseAccountsClient_BeginOfflineRegion() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1336,7 +1282,7 @@ func ExampleDatabaseAccountsClient_BeginOfflineRegion() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDatabaseAccountOnlineRegion.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDatabaseAccountOnlineRegion.json func ExampleDatabaseAccountsClient_BeginOnlineRegion() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1357,7 +1303,7 @@ func ExampleDatabaseAccountsClient_BeginOnlineRegion() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json func ExampleDatabaseAccountsClient_GetReadOnlyKeys() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1381,7 +1327,7 @@ func ExampleDatabaseAccountsClient_GetReadOnlyKeys() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDatabaseAccountRegenerateKey.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDatabaseAccountRegenerateKey.json func ExampleDatabaseAccountsClient_BeginRegenerateKey() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1404,7 +1350,7 @@ func ExampleDatabaseAccountsClient_BeginRegenerateKey() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDatabaseAccountCheckNameExists.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDatabaseAccountCheckNameExists.json func ExampleDatabaseAccountsClient_CheckNameExists() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1421,7 +1367,7 @@ func ExampleDatabaseAccountsClient_CheckNameExists() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDatabaseAccountGetMetrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDatabaseAccountGetMetrics.json func ExampleDatabaseAccountsClient_NewListMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1484,7 +1430,7 @@ func ExampleDatabaseAccountsClient_NewListMetricsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDatabaseAccountGetUsages.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDatabaseAccountGetUsages.json func ExampleDatabaseAccountsClient_NewListUsagesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1522,7 +1468,7 @@ func ExampleDatabaseAccountsClient_NewListUsagesPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDatabaseAccountGetMetricDefinitions.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDatabaseAccountGetMetricDefinitions.json func ExampleDatabaseAccountsClient_NewListMetricDefinitionsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/datatransferjobs_client.go b/sdk/resourcemanager/cosmos/armcosmos/datatransferjobs_client.go deleted file mode 100644 index ccd3da2307dd..000000000000 --- a/sdk/resourcemanager/cosmos/armcosmos/datatransferjobs_client.go +++ /dev/null @@ -1,425 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcosmos - -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" -) - -// DataTransferJobsClient contains the methods for the DataTransferJobs group. -// Don't use this type directly, use NewDataTransferJobsClient() instead. -type DataTransferJobsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewDataTransferJobsClient creates a new instance of DataTransferJobsClient with the specified values. -// - subscriptionID - The ID of the target subscription. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewDataTransferJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataTransferJobsClient, error) { - cl, err := arm.NewClient(moduleName+".DataTransferJobsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &DataTransferJobsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// Cancel - Cancels a Data Transfer Job. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - jobName - Name of the Data Transfer Job -// - options - DataTransferJobsClientCancelOptions contains the optional parameters for the DataTransferJobsClient.Cancel method. -func (client *DataTransferJobsClient) Cancel(ctx context.Context, resourceGroupName string, accountName string, jobName string, options *DataTransferJobsClientCancelOptions) (DataTransferJobsClientCancelResponse, error) { - req, err := client.cancelCreateRequest(ctx, resourceGroupName, accountName, jobName, options) - if err != nil { - return DataTransferJobsClientCancelResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DataTransferJobsClientCancelResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataTransferJobsClientCancelResponse{}, runtime.NewResponseError(resp) - } - return client.cancelHandleResponse(resp) -} - -// cancelCreateRequest creates the Cancel request. -func (client *DataTransferJobsClient) cancelCreateRequest(ctx context.Context, resourceGroupName string, accountName string, jobName string, options *DataTransferJobsClientCancelOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/cancel" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if jobName == "" { - return nil, errors.New("parameter jobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// cancelHandleResponse handles the Cancel response. -func (client *DataTransferJobsClient) cancelHandleResponse(resp *http.Response) (DataTransferJobsClientCancelResponse, error) { - result := DataTransferJobsClientCancelResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DataTransferJobGetResults); err != nil { - return DataTransferJobsClientCancelResponse{}, err - } - return result, nil -} - -// Create - Creates a Data Transfer Job. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - jobName - Name of the Data Transfer Job -// - options - DataTransferJobsClientCreateOptions contains the optional parameters for the DataTransferJobsClient.Create method. -func (client *DataTransferJobsClient) Create(ctx context.Context, resourceGroupName string, accountName string, jobName string, jobCreateParameters CreateJobRequest, options *DataTransferJobsClientCreateOptions) (DataTransferJobsClientCreateResponse, error) { - req, err := client.createCreateRequest(ctx, resourceGroupName, accountName, jobName, jobCreateParameters, options) - if err != nil { - return DataTransferJobsClientCreateResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DataTransferJobsClientCreateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataTransferJobsClientCreateResponse{}, runtime.NewResponseError(resp) - } - return client.createHandleResponse(resp) -} - -// createCreateRequest creates the Create request. -func (client *DataTransferJobsClient) createCreateRequest(ctx context.Context, resourceGroupName string, accountName string, jobName string, jobCreateParameters CreateJobRequest, options *DataTransferJobsClientCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if jobName == "" { - return nil, errors.New("parameter jobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, jobCreateParameters) -} - -// createHandleResponse handles the Create response. -func (client *DataTransferJobsClient) createHandleResponse(resp *http.Response) (DataTransferJobsClientCreateResponse, error) { - result := DataTransferJobsClientCreateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DataTransferJobGetResults); err != nil { - return DataTransferJobsClientCreateResponse{}, err - } - return result, nil -} - -// Get - Get a Data Transfer Job. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - jobName - Name of the Data Transfer Job -// - options - DataTransferJobsClientGetOptions contains the optional parameters for the DataTransferJobsClient.Get method. -func (client *DataTransferJobsClient) Get(ctx context.Context, resourceGroupName string, accountName string, jobName string, options *DataTransferJobsClientGetOptions) (DataTransferJobsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, jobName, options) - if err != nil { - return DataTransferJobsClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DataTransferJobsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataTransferJobsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *DataTransferJobsClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, jobName string, options *DataTransferJobsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if jobName == "" { - return nil, errors.New("parameter jobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *DataTransferJobsClient) getHandleResponse(resp *http.Response) (DataTransferJobsClientGetResponse, error) { - result := DataTransferJobsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DataTransferJobGetResults); err != nil { - return DataTransferJobsClientGetResponse{}, err - } - return result, nil -} - -// NewListByDatabaseAccountPager - Get a list of Data Transfer jobs. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - options - DataTransferJobsClientListByDatabaseAccountOptions contains the optional parameters for the DataTransferJobsClient.NewListByDatabaseAccountPager -// method. -func (client *DataTransferJobsClient) NewListByDatabaseAccountPager(resourceGroupName string, accountName string, options *DataTransferJobsClientListByDatabaseAccountOptions) *runtime.Pager[DataTransferJobsClientListByDatabaseAccountResponse] { - return runtime.NewPager(runtime.PagingHandler[DataTransferJobsClientListByDatabaseAccountResponse]{ - More: func(page DataTransferJobsClientListByDatabaseAccountResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DataTransferJobsClientListByDatabaseAccountResponse) (DataTransferJobsClientListByDatabaseAccountResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByDatabaseAccountCreateRequest(ctx, resourceGroupName, accountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DataTransferJobsClientListByDatabaseAccountResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DataTransferJobsClientListByDatabaseAccountResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataTransferJobsClientListByDatabaseAccountResponse{}, runtime.NewResponseError(resp) - } - return client.listByDatabaseAccountHandleResponse(resp) - }, - }) -} - -// listByDatabaseAccountCreateRequest creates the ListByDatabaseAccount request. -func (client *DataTransferJobsClient) listByDatabaseAccountCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *DataTransferJobsClientListByDatabaseAccountOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByDatabaseAccountHandleResponse handles the ListByDatabaseAccount response. -func (client *DataTransferJobsClient) listByDatabaseAccountHandleResponse(resp *http.Response) (DataTransferJobsClientListByDatabaseAccountResponse, error) { - result := DataTransferJobsClientListByDatabaseAccountResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DataTransferJobFeedResults); err != nil { - return DataTransferJobsClientListByDatabaseAccountResponse{}, err - } - return result, nil -} - -// Pause - Pause a Data Transfer Job. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - jobName - Name of the Data Transfer Job -// - options - DataTransferJobsClientPauseOptions contains the optional parameters for the DataTransferJobsClient.Pause method. -func (client *DataTransferJobsClient) Pause(ctx context.Context, resourceGroupName string, accountName string, jobName string, options *DataTransferJobsClientPauseOptions) (DataTransferJobsClientPauseResponse, error) { - req, err := client.pauseCreateRequest(ctx, resourceGroupName, accountName, jobName, options) - if err != nil { - return DataTransferJobsClientPauseResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DataTransferJobsClientPauseResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataTransferJobsClientPauseResponse{}, runtime.NewResponseError(resp) - } - return client.pauseHandleResponse(resp) -} - -// pauseCreateRequest creates the Pause request. -func (client *DataTransferJobsClient) pauseCreateRequest(ctx context.Context, resourceGroupName string, accountName string, jobName string, options *DataTransferJobsClientPauseOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/pause" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if jobName == "" { - return nil, errors.New("parameter jobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// pauseHandleResponse handles the Pause response. -func (client *DataTransferJobsClient) pauseHandleResponse(resp *http.Response) (DataTransferJobsClientPauseResponse, error) { - result := DataTransferJobsClientPauseResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DataTransferJobGetResults); err != nil { - return DataTransferJobsClientPauseResponse{}, err - } - return result, nil -} - -// Resume - Resumes a Data Transfer Job. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - jobName - Name of the Data Transfer Job -// - options - DataTransferJobsClientResumeOptions contains the optional parameters for the DataTransferJobsClient.Resume method. -func (client *DataTransferJobsClient) Resume(ctx context.Context, resourceGroupName string, accountName string, jobName string, options *DataTransferJobsClientResumeOptions) (DataTransferJobsClientResumeResponse, error) { - req, err := client.resumeCreateRequest(ctx, resourceGroupName, accountName, jobName, options) - if err != nil { - return DataTransferJobsClientResumeResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DataTransferJobsClientResumeResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataTransferJobsClientResumeResponse{}, runtime.NewResponseError(resp) - } - return client.resumeHandleResponse(resp) -} - -// resumeCreateRequest creates the Resume request. -func (client *DataTransferJobsClient) resumeCreateRequest(ctx context.Context, resourceGroupName string, accountName string, jobName string, options *DataTransferJobsClientResumeOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/resume" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if jobName == "" { - return nil, errors.New("parameter jobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// resumeHandleResponse handles the Resume response. -func (client *DataTransferJobsClient) resumeHandleResponse(resp *http.Response) (DataTransferJobsClientResumeResponse, error) { - result := DataTransferJobsClientResumeResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DataTransferJobGetResults); err != nil { - return DataTransferJobsClientResumeResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/cosmos/armcosmos/datatransferjobs_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/datatransferjobs_client_example_test.go deleted file mode 100644 index cac59adeb088..000000000000 --- a/sdk/resourcemanager/cosmos/armcosmos/datatransferjobs_client_example_test.go +++ /dev/null @@ -1,286 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcosmos_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobCreate.json -func ExampleDataTransferJobsClient_Create() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDataTransferJobsClient().Create(ctx, "rg1", "ddb1", "j1", armcosmos.CreateJobRequest{ - Properties: &armcosmos.DataTransferJobProperties{ - Destination: &armcosmos.AzureBlobDataTransferDataSourceSink{ - Component: to.Ptr(armcosmos.DataTransferComponentAzureBlobStorage), - ContainerName: to.Ptr("blob_container"), - EndpointURL: to.Ptr("https://blob.windows.net"), - }, - Source: &armcosmos.CassandraDataTransferDataSourceSink{ - Component: to.Ptr(armcosmos.DataTransferComponentCosmosDBCassandra), - KeyspaceName: to.Ptr("keyspace"), - TableName: to.Ptr("table"), - }, - }, - }, 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.DataTransferJobGetResults = armcosmos.DataTransferJobGetResults{ - // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/dataTransferJobs"), - // ID: to.Ptr("ab1b6f34-b33c-46b1-98c7-3a0a63fd0d16"), - // Properties: &armcosmos.DataTransferJobProperties{ - // Destination: &armcosmos.AzureBlobDataTransferDataSourceSink{ - // Component: to.Ptr(armcosmos.DataTransferComponentAzureBlobStorage), - // ContainerName: to.Ptr("blob_container"), - // EndpointURL: to.Ptr("https://blob.windows.net"), - // }, - // JobName: to.Ptr("j1"), - // LastUpdatedUTCTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-12T11:10:55.2780000Z"); return t}()), - // ProcessedCount: to.Ptr[int64](0), - // Source: &armcosmos.CassandraDataTransferDataSourceSink{ - // Component: to.Ptr(armcosmos.DataTransferComponentCosmosDBCassandra), - // KeyspaceName: to.Ptr("keyspace"), - // TableName: to.Ptr("table"), - // }, - // Status: to.Ptr("Running"), - // TotalCount: to.Ptr[int64](0), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobGet.json -func ExampleDataTransferJobsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDataTransferJobsClient().Get(ctx, "rg1", "ddb1", "j1", 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.DataTransferJobGetResults = armcosmos.DataTransferJobGetResults{ - // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/dataTransferJobs"), - // ID: to.Ptr("ab1b6f34-b33c-46b1-98c7-3a0a63fd0d16"), - // Properties: &armcosmos.DataTransferJobProperties{ - // Destination: &armcosmos.AzureBlobDataTransferDataSourceSink{ - // Component: to.Ptr(armcosmos.DataTransferComponentAzureBlobStorage), - // ContainerName: to.Ptr("blob_container"), - // EndpointURL: to.Ptr("https://blob.windows.net"), - // }, - // JobName: to.Ptr("j1"), - // LastUpdatedUTCTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-12T12:04:23.1530000Z"); return t}()), - // ProcessedCount: to.Ptr[int64](50), - // Source: &armcosmos.CassandraDataTransferDataSourceSink{ - // Component: to.Ptr(armcosmos.DataTransferComponentCosmosDBCassandra), - // KeyspaceName: to.Ptr("keyspace"), - // TableName: to.Ptr("table"), - // }, - // Status: to.Ptr("Completed"), - // TotalCount: to.Ptr[int64](50), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobPause.json -func ExampleDataTransferJobsClient_Pause() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDataTransferJobsClient().Pause(ctx, "rg1", "ddb1", "j1", 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.DataTransferJobGetResults = armcosmos.DataTransferJobGetResults{ - // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/dataTransferJobs"), - // ID: to.Ptr("ab1b6f34-b33c-46b1-98c7-3a0a63fd0d16"), - // Properties: &armcosmos.DataTransferJobProperties{ - // Destination: &armcosmos.AzureBlobDataTransferDataSourceSink{ - // Component: to.Ptr(armcosmos.DataTransferComponentAzureBlobStorage), - // ContainerName: to.Ptr("blob_container"), - // EndpointURL: to.Ptr("https://blob.windows.net"), - // }, - // JobName: to.Ptr("j1"), - // LastUpdatedUTCTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-12T11:10:55.2780000Z"); return t}()), - // ProcessedCount: to.Ptr[int64](20), - // Source: &armcosmos.CassandraDataTransferDataSourceSink{ - // Component: to.Ptr(armcosmos.DataTransferComponentCosmosDBCassandra), - // KeyspaceName: to.Ptr("keyspace"), - // TableName: to.Ptr("table"), - // }, - // Status: to.Ptr("Paused"), - // TotalCount: to.Ptr[int64](100), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobResume.json -func ExampleDataTransferJobsClient_Resume() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDataTransferJobsClient().Resume(ctx, "rg1", "ddb1", "j1", 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.DataTransferJobGetResults = armcosmos.DataTransferJobGetResults{ - // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/dataTransferJobs"), - // ID: to.Ptr("ab1b6f34-b33c-46b1-98c7-3a0a63fd0d16"), - // Properties: &armcosmos.DataTransferJobProperties{ - // Destination: &armcosmos.AzureBlobDataTransferDataSourceSink{ - // Component: to.Ptr(armcosmos.DataTransferComponentAzureBlobStorage), - // ContainerName: to.Ptr("blob_container"), - // EndpointURL: to.Ptr("https://blob.windows.net"), - // }, - // JobName: to.Ptr("j1"), - // LastUpdatedUTCTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-12T11:10:55.2780000Z"); return t}()), - // ProcessedCount: to.Ptr[int64](20), - // Source: &armcosmos.CassandraDataTransferDataSourceSink{ - // Component: to.Ptr(armcosmos.DataTransferComponentCosmosDBCassandra), - // KeyspaceName: to.Ptr("keyspace"), - // TableName: to.Ptr("table"), - // }, - // Status: to.Ptr("Pending"), - // TotalCount: to.Ptr[int64](100), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobCancel.json -func ExampleDataTransferJobsClient_Cancel() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDataTransferJobsClient().Cancel(ctx, "rg1", "ddb1", "j1", 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.DataTransferJobGetResults = armcosmos.DataTransferJobGetResults{ - // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/dataTransferJobs"), - // ID: to.Ptr("ab1b6f34-b33c-46b1-98c7-3a0a63fd0d16"), - // Properties: &armcosmos.DataTransferJobProperties{ - // Destination: &armcosmos.AzureBlobDataTransferDataSourceSink{ - // Component: to.Ptr(armcosmos.DataTransferComponentAzureBlobStorage), - // ContainerName: to.Ptr("blob_container"), - // EndpointURL: to.Ptr("https://blob.windows.net"), - // }, - // JobName: to.Ptr("j1"), - // LastUpdatedUTCTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-12T11:10:55.2780000Z"); return t}()), - // ProcessedCount: to.Ptr[int64](20), - // Source: &armcosmos.CassandraDataTransferDataSourceSink{ - // Component: to.Ptr(armcosmos.DataTransferComponentCosmosDBCassandra), - // KeyspaceName: to.Ptr("keyspace"), - // TableName: to.Ptr("table"), - // }, - // Status: to.Ptr("Cancelled"), - // TotalCount: to.Ptr[int64](100), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobFeed.json -func ExampleDataTransferJobsClient_NewListByDatabaseAccountPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDataTransferJobsClient().NewListByDatabaseAccountPager("rg1", "ddb1", 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.DataTransferJobFeedResults = armcosmos.DataTransferJobFeedResults{ - // Value: []*armcosmos.DataTransferJobGetResults{ - // { - // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/dataTransferJobs"), - // ID: to.Ptr("ab1b6f34-b33c-46b1-98c7-3a0a63fd0d16"), - // Properties: &armcosmos.DataTransferJobProperties{ - // Destination: &armcosmos.AzureBlobDataTransferDataSourceSink{ - // Component: to.Ptr(armcosmos.DataTransferComponentAzureBlobStorage), - // ContainerName: to.Ptr("blob_container"), - // EndpointURL: to.Ptr("https://blob.windows.net"), - // }, - // JobName: to.Ptr("j1"), - // LastUpdatedUTCTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-12T12:04:23.1530000Z"); return t}()), - // ProcessedCount: to.Ptr[int64](100), - // Source: &armcosmos.CassandraDataTransferDataSourceSink{ - // Component: to.Ptr(armcosmos.DataTransferComponentCosmosDBCassandra), - // KeyspaceName: to.Ptr("keyspace"), - // TableName: to.Ptr("table"), - // }, - // Status: to.Ptr("Completed"), - // TotalCount: to.Ptr[int64](100), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/cosmos/armcosmos/graphresources_client.go b/sdk/resourcemanager/cosmos/armcosmos/graphresources_client.go deleted file mode 100644 index 05fb26673dd9..000000000000 --- a/sdk/resourcemanager/cosmos/armcosmos/graphresources_client.go +++ /dev/null @@ -1,311 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcosmos - -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" -) - -// GraphResourcesClient contains the methods for the GraphResources group. -// Don't use this type directly, use NewGraphResourcesClient() instead. -type GraphResourcesClient struct { - internal *arm.Client - subscriptionID string -} - -// NewGraphResourcesClient creates a new instance of GraphResourcesClient with the specified values. -// - subscriptionID - The ID of the target subscription. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewGraphResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GraphResourcesClient, error) { - cl, err := arm.NewClient(moduleName+".GraphResourcesClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &GraphResourcesClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateUpdateGraph - Create or update an Azure Cosmos DB Graph. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - graphName - Cosmos DB graph resource name. -// - createUpdateGraphParameters - The parameters to provide for the current graph. -// - options - GraphResourcesClientBeginCreateUpdateGraphOptions contains the optional parameters for the GraphResourcesClient.BeginCreateUpdateGraph -// method. -func (client *GraphResourcesClient) BeginCreateUpdateGraph(ctx context.Context, resourceGroupName string, accountName string, graphName string, createUpdateGraphParameters GraphResourceCreateUpdateParameters, options *GraphResourcesClientBeginCreateUpdateGraphOptions) (*runtime.Poller[GraphResourcesClientCreateUpdateGraphResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createUpdateGraph(ctx, resourceGroupName, accountName, graphName, createUpdateGraphParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[GraphResourcesClientCreateUpdateGraphResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[GraphResourcesClientCreateUpdateGraphResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// CreateUpdateGraph - Create or update an Azure Cosmos DB Graph. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -func (client *GraphResourcesClient) createUpdateGraph(ctx context.Context, resourceGroupName string, accountName string, graphName string, createUpdateGraphParameters GraphResourceCreateUpdateParameters, options *GraphResourcesClientBeginCreateUpdateGraphOptions) (*http.Response, error) { - req, err := client.createUpdateGraphCreateRequest(ctx, resourceGroupName, accountName, graphName, createUpdateGraphParameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createUpdateGraphCreateRequest creates the CreateUpdateGraph request. -func (client *GraphResourcesClient) createUpdateGraphCreateRequest(ctx context.Context, resourceGroupName string, accountName string, graphName string, createUpdateGraphParameters GraphResourceCreateUpdateParameters, options *GraphResourcesClientBeginCreateUpdateGraphOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if graphName == "" { - return nil, errors.New("parameter graphName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{graphName}", url.PathEscape(graphName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, createUpdateGraphParameters) -} - -// BeginDeleteGraphResource - Deletes an existing Azure Cosmos DB Graph Resource. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - graphName - Cosmos DB graph resource name. -// - options - GraphResourcesClientBeginDeleteGraphResourceOptions contains the optional parameters for the GraphResourcesClient.BeginDeleteGraphResource -// method. -func (client *GraphResourcesClient) BeginDeleteGraphResource(ctx context.Context, resourceGroupName string, accountName string, graphName string, options *GraphResourcesClientBeginDeleteGraphResourceOptions) (*runtime.Poller[GraphResourcesClientDeleteGraphResourceResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteGraphResource(ctx, resourceGroupName, accountName, graphName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[GraphResourcesClientDeleteGraphResourceResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[GraphResourcesClientDeleteGraphResourceResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// DeleteGraphResource - Deletes an existing Azure Cosmos DB Graph Resource. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -func (client *GraphResourcesClient) deleteGraphResource(ctx context.Context, resourceGroupName string, accountName string, graphName string, options *GraphResourcesClientBeginDeleteGraphResourceOptions) (*http.Response, error) { - req, err := client.deleteGraphResourceCreateRequest(ctx, resourceGroupName, accountName, graphName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteGraphResourceCreateRequest creates the DeleteGraphResource request. -func (client *GraphResourcesClient) deleteGraphResourceCreateRequest(ctx context.Context, resourceGroupName string, accountName string, graphName string, options *GraphResourcesClientBeginDeleteGraphResourceOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if graphName == "" { - return nil, errors.New("parameter graphName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{graphName}", url.PathEscape(graphName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// GetGraph - Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - graphName - Cosmos DB graph resource name. -// - options - GraphResourcesClientGetGraphOptions contains the optional parameters for the GraphResourcesClient.GetGraph method. -func (client *GraphResourcesClient) GetGraph(ctx context.Context, resourceGroupName string, accountName string, graphName string, options *GraphResourcesClientGetGraphOptions) (GraphResourcesClientGetGraphResponse, error) { - req, err := client.getGraphCreateRequest(ctx, resourceGroupName, accountName, graphName, options) - if err != nil { - return GraphResourcesClientGetGraphResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return GraphResourcesClientGetGraphResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GraphResourcesClientGetGraphResponse{}, runtime.NewResponseError(resp) - } - return client.getGraphHandleResponse(resp) -} - -// getGraphCreateRequest creates the GetGraph request. -func (client *GraphResourcesClient) getGraphCreateRequest(ctx context.Context, resourceGroupName string, accountName string, graphName string, options *GraphResourcesClientGetGraphOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if graphName == "" { - return nil, errors.New("parameter graphName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{graphName}", url.PathEscape(graphName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getGraphHandleResponse handles the GetGraph response. -func (client *GraphResourcesClient) getGraphHandleResponse(resp *http.Response) (GraphResourcesClientGetGraphResponse, error) { - result := GraphResourcesClientGetGraphResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.GraphResourceGetResults); err != nil { - return GraphResourcesClientGetGraphResponse{}, err - } - return result, nil -} - -// NewListGraphsPager - Lists the graphs under an existing Azure Cosmos DB database account. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - options - GraphResourcesClientListGraphsOptions contains the optional parameters for the GraphResourcesClient.NewListGraphsPager -// method. -func (client *GraphResourcesClient) NewListGraphsPager(resourceGroupName string, accountName string, options *GraphResourcesClientListGraphsOptions) *runtime.Pager[GraphResourcesClientListGraphsResponse] { - return runtime.NewPager(runtime.PagingHandler[GraphResourcesClientListGraphsResponse]{ - More: func(page GraphResourcesClientListGraphsResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *GraphResourcesClientListGraphsResponse) (GraphResourcesClientListGraphsResponse, error) { - req, err := client.listGraphsCreateRequest(ctx, resourceGroupName, accountName, options) - if err != nil { - return GraphResourcesClientListGraphsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return GraphResourcesClientListGraphsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GraphResourcesClientListGraphsResponse{}, runtime.NewResponseError(resp) - } - return client.listGraphsHandleResponse(resp) - }, - }) -} - -// listGraphsCreateRequest creates the ListGraphs request. -func (client *GraphResourcesClient) listGraphsCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *GraphResourcesClientListGraphsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listGraphsHandleResponse handles the ListGraphs response. -func (client *GraphResourcesClient) listGraphsHandleResponse(resp *http.Response) (GraphResourcesClientListGraphsResponse, error) { - result := GraphResourcesClientListGraphsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.GraphResourcesListResult); err != nil { - return GraphResourcesClientListGraphsResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/cosmos/armcosmos/graphresources_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/graphresources_client_example_test.go deleted file mode 100644 index 13dc1d627a7f..000000000000 --- a/sdk/resourcemanager/cosmos/armcosmos/graphresources_client_example_test.go +++ /dev/null @@ -1,160 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcosmos_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBGraphResourceList.json -func ExampleGraphResourcesClient_NewListGraphsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewGraphResourcesClient().NewListGraphsPager("rgName", "ddb1", 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.GraphResourcesListResult = armcosmos.GraphResourcesListResult{ - // Value: []*armcosmos.GraphResourceGetResults{ - // { - // Name: to.Ptr("graphName"), - // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/graphs"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/graphs/graphName"), - // Location: to.Ptr("West US"), - // Tags: map[string]*string{ - // }, - // Properties: &armcosmos.GraphResourceGetProperties{ - // Resource: &armcosmos.GraphResourceGetPropertiesResource{ - // ID: to.Ptr("graphName"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBGraphResourceGet.json -func ExampleGraphResourcesClient_GetGraph() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGraphResourcesClient().GetGraph(ctx, "rg1", "ddb1", "graphName", 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.GraphResourceGetResults = armcosmos.GraphResourceGetResults{ - // Name: to.Ptr("graphName"), - // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/graphs"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/graphs/graphName"), - // Location: to.Ptr("West US"), - // Tags: map[string]*string{ - // }, - // Properties: &armcosmos.GraphResourceGetProperties{ - // Resource: &armcosmos.GraphResourceGetPropertiesResource{ - // ID: to.Ptr("graphName"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBGraphResourceCreateUpdate.json -func ExampleGraphResourcesClient_BeginCreateUpdateGraph() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewGraphResourcesClient().BeginCreateUpdateGraph(ctx, "rg1", "ddb1", "graphName", armcosmos.GraphResourceCreateUpdateParameters{ - Location: to.Ptr("West US"), - Tags: map[string]*string{}, - Properties: &armcosmos.GraphResourceCreateUpdateProperties{ - Options: &armcosmos.CreateUpdateOptions{}, - Resource: &armcosmos.GraphResource{ - ID: to.Ptr("graphName"), - }, - }, - }, 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.GraphResourceGetResults = armcosmos.GraphResourceGetResults{ - // Name: to.Ptr("graphName"), - // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/graphs"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/graphs/graphName"), - // Location: to.Ptr("West US"), - // Tags: map[string]*string{ - // }, - // Properties: &armcosmos.GraphResourceGetProperties{ - // Resource: &armcosmos.GraphResourceGetPropertiesResource{ - // ID: to.Ptr("graphName"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBGraphResourceDelete.json -func ExampleGraphResourcesClient_BeginDeleteGraphResource() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewGraphResourcesClient().BeginDeleteGraphResource(ctx, "rg1", "ddb1", "graphName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/cosmos/armcosmos/gremlinresources_client.go b/sdk/resourcemanager/cosmos/armcosmos/gremlinresources_client.go index 0cedc0c20711..36f13a8eab0a 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/gremlinresources_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/gremlinresources_client.go @@ -47,7 +47,7 @@ func NewGremlinResourcesClient(subscriptionID string, credential azcore.TokenCre // BeginCreateUpdateGremlinDatabase - Create or update an Azure Cosmos DB Gremlin database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -69,7 +69,7 @@ func (client *GremlinResourcesClient) BeginCreateUpdateGremlinDatabase(ctx conte // CreateUpdateGremlinDatabase - Create or update an Azure Cosmos DB Gremlin database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *GremlinResourcesClient) createUpdateGremlinDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, createUpdateGremlinDatabaseParameters GremlinDatabaseCreateUpdateParameters, options *GremlinResourcesClientBeginCreateUpdateGremlinDatabaseOptions) (*http.Response, error) { req, err := client.createUpdateGremlinDatabaseCreateRequest(ctx, resourceGroupName, accountName, databaseName, createUpdateGremlinDatabaseParameters, options) if err != nil { @@ -109,7 +109,7 @@ func (client *GremlinResourcesClient) createUpdateGremlinDatabaseCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, createUpdateGremlinDatabaseParameters) @@ -118,7 +118,7 @@ func (client *GremlinResourcesClient) createUpdateGremlinDatabaseCreateRequest(c // BeginCreateUpdateGremlinGraph - Create or update an Azure Cosmos DB Gremlin graph // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -141,7 +141,7 @@ func (client *GremlinResourcesClient) BeginCreateUpdateGremlinGraph(ctx context. // CreateUpdateGremlinGraph - Create or update an Azure Cosmos DB Gremlin graph // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *GremlinResourcesClient) createUpdateGremlinGraph(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, createUpdateGremlinGraphParameters GremlinGraphCreateUpdateParameters, options *GremlinResourcesClientBeginCreateUpdateGremlinGraphOptions) (*http.Response, error) { req, err := client.createUpdateGremlinGraphCreateRequest(ctx, resourceGroupName, accountName, databaseName, graphName, createUpdateGremlinGraphParameters, options) if err != nil { @@ -185,7 +185,7 @@ func (client *GremlinResourcesClient) createUpdateGremlinGraphCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, createUpdateGremlinGraphParameters) @@ -194,7 +194,7 @@ func (client *GremlinResourcesClient) createUpdateGremlinGraphCreateRequest(ctx // BeginDeleteGremlinDatabase - Deletes an existing Azure Cosmos DB Gremlin database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -215,7 +215,7 @@ func (client *GremlinResourcesClient) BeginDeleteGremlinDatabase(ctx context.Con // DeleteGremlinDatabase - Deletes an existing Azure Cosmos DB Gremlin database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *GremlinResourcesClient) deleteGremlinDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *GremlinResourcesClientBeginDeleteGremlinDatabaseOptions) (*http.Response, error) { req, err := client.deleteGremlinDatabaseCreateRequest(ctx, resourceGroupName, accountName, databaseName, options) if err != nil { @@ -255,7 +255,7 @@ func (client *GremlinResourcesClient) deleteGremlinDatabaseCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -263,7 +263,7 @@ func (client *GremlinResourcesClient) deleteGremlinDatabaseCreateRequest(ctx con // BeginDeleteGremlinGraph - Deletes an existing Azure Cosmos DB Gremlin graph. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -285,7 +285,7 @@ func (client *GremlinResourcesClient) BeginDeleteGremlinGraph(ctx context.Contex // DeleteGremlinGraph - Deletes an existing Azure Cosmos DB Gremlin graph. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *GremlinResourcesClient) deleteGremlinGraph(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, options *GremlinResourcesClientBeginDeleteGremlinGraphOptions) (*http.Response, error) { req, err := client.deleteGremlinGraphCreateRequest(ctx, resourceGroupName, accountName, databaseName, graphName, options) if err != nil { @@ -329,7 +329,7 @@ func (client *GremlinResourcesClient) deleteGremlinGraphCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -337,7 +337,7 @@ func (client *GremlinResourcesClient) deleteGremlinGraphCreateRequest(ctx contex // GetGremlinDatabase - Gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -382,7 +382,7 @@ func (client *GremlinResourcesClient) getGremlinDatabaseCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -401,7 +401,7 @@ func (client *GremlinResourcesClient) getGremlinDatabaseHandleResponse(resp *htt // account with the provided name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -446,7 +446,7 @@ func (client *GremlinResourcesClient) getGremlinDatabaseThroughputCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -464,7 +464,7 @@ func (client *GremlinResourcesClient) getGremlinDatabaseThroughputHandleResponse // GetGremlinGraph - Gets the Gremlin graph under an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -514,7 +514,7 @@ func (client *GremlinResourcesClient) getGremlinGraphCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -533,7 +533,7 @@ func (client *GremlinResourcesClient) getGremlinGraphHandleResponse(resp *http.R // provided name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -583,7 +583,7 @@ func (client *GremlinResourcesClient) getGremlinGraphThroughputCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -600,7 +600,7 @@ func (client *GremlinResourcesClient) getGremlinGraphThroughputHandleResponse(re // NewListGremlinDatabasesPager - Lists the Gremlin databases under an existing Azure Cosmos DB database account. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - GremlinResourcesClientListGremlinDatabasesOptions contains the optional parameters for the GremlinResourcesClient.NewListGremlinDatabasesPager @@ -647,7 +647,7 @@ func (client *GremlinResourcesClient) listGremlinDatabasesCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -664,7 +664,7 @@ func (client *GremlinResourcesClient) listGremlinDatabasesHandleResponse(resp *h // NewListGremlinGraphsPager - Lists the Gremlin graph under an existing Azure Cosmos DB database account. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -716,7 +716,7 @@ func (client *GremlinResourcesClient) listGremlinGraphsCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -734,7 +734,7 @@ func (client *GremlinResourcesClient) listGremlinGraphsHandleResponse(resp *http // BeginMigrateGremlinDatabaseToAutoscale - Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -755,7 +755,7 @@ func (client *GremlinResourcesClient) BeginMigrateGremlinDatabaseToAutoscale(ctx // MigrateGremlinDatabaseToAutoscale - Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *GremlinResourcesClient) migrateGremlinDatabaseToAutoscale(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *GremlinResourcesClientBeginMigrateGremlinDatabaseToAutoscaleOptions) (*http.Response, error) { req, err := client.migrateGremlinDatabaseToAutoscaleCreateRequest(ctx, resourceGroupName, accountName, databaseName, options) if err != nil { @@ -795,7 +795,7 @@ func (client *GremlinResourcesClient) migrateGremlinDatabaseToAutoscaleCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -804,7 +804,7 @@ func (client *GremlinResourcesClient) migrateGremlinDatabaseToAutoscaleCreateReq // BeginMigrateGremlinDatabaseToManualThroughput - Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -825,7 +825,7 @@ func (client *GremlinResourcesClient) BeginMigrateGremlinDatabaseToManualThrough // MigrateGremlinDatabaseToManualThroughput - Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *GremlinResourcesClient) migrateGremlinDatabaseToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *GremlinResourcesClientBeginMigrateGremlinDatabaseToManualThroughputOptions) (*http.Response, error) { req, err := client.migrateGremlinDatabaseToManualThroughputCreateRequest(ctx, resourceGroupName, accountName, databaseName, options) if err != nil { @@ -865,7 +865,7 @@ func (client *GremlinResourcesClient) migrateGremlinDatabaseToManualThroughputCr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -874,7 +874,7 @@ func (client *GremlinResourcesClient) migrateGremlinDatabaseToManualThroughputCr // BeginMigrateGremlinGraphToAutoscale - Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -896,7 +896,7 @@ func (client *GremlinResourcesClient) BeginMigrateGremlinGraphToAutoscale(ctx co // MigrateGremlinGraphToAutoscale - Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *GremlinResourcesClient) migrateGremlinGraphToAutoscale(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, options *GremlinResourcesClientBeginMigrateGremlinGraphToAutoscaleOptions) (*http.Response, error) { req, err := client.migrateGremlinGraphToAutoscaleCreateRequest(ctx, resourceGroupName, accountName, databaseName, graphName, options) if err != nil { @@ -940,7 +940,7 @@ func (client *GremlinResourcesClient) migrateGremlinGraphToAutoscaleCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -949,7 +949,7 @@ func (client *GremlinResourcesClient) migrateGremlinGraphToAutoscaleCreateReques // BeginMigrateGremlinGraphToManualThroughput - Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -971,7 +971,7 @@ func (client *GremlinResourcesClient) BeginMigrateGremlinGraphToManualThroughput // MigrateGremlinGraphToManualThroughput - Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *GremlinResourcesClient) migrateGremlinGraphToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, options *GremlinResourcesClientBeginMigrateGremlinGraphToManualThroughputOptions) (*http.Response, error) { req, err := client.migrateGremlinGraphToManualThroughputCreateRequest(ctx, resourceGroupName, accountName, databaseName, graphName, options) if err != nil { @@ -1015,7 +1015,7 @@ func (client *GremlinResourcesClient) migrateGremlinGraphToManualThroughputCreat return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1024,7 +1024,7 @@ func (client *GremlinResourcesClient) migrateGremlinGraphToManualThroughputCreat // BeginRetrieveContinuousBackupInformation - Retrieves continuous backup information for a gremlin graph. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1049,7 +1049,7 @@ func (client *GremlinResourcesClient) BeginRetrieveContinuousBackupInformation(c // RetrieveContinuousBackupInformation - Retrieves continuous backup information for a gremlin graph. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *GremlinResourcesClient) retrieveContinuousBackupInformation(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, location ContinuousBackupRestoreLocation, options *GremlinResourcesClientBeginRetrieveContinuousBackupInformationOptions) (*http.Response, error) { req, err := client.retrieveContinuousBackupInformationCreateRequest(ctx, resourceGroupName, accountName, databaseName, graphName, location, options) if err != nil { @@ -1093,7 +1093,7 @@ func (client *GremlinResourcesClient) retrieveContinuousBackupInformationCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, location) @@ -1102,7 +1102,7 @@ func (client *GremlinResourcesClient) retrieveContinuousBackupInformationCreateR // BeginUpdateGremlinDatabaseThroughput - Update RUs per second of an Azure Cosmos DB Gremlin database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1124,7 +1124,7 @@ func (client *GremlinResourcesClient) BeginUpdateGremlinDatabaseThroughput(ctx c // UpdateGremlinDatabaseThroughput - Update RUs per second of an Azure Cosmos DB Gremlin database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *GremlinResourcesClient) updateGremlinDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *GremlinResourcesClientBeginUpdateGremlinDatabaseThroughputOptions) (*http.Response, error) { req, err := client.updateGremlinDatabaseThroughputCreateRequest(ctx, resourceGroupName, accountName, databaseName, updateThroughputParameters, options) if err != nil { @@ -1164,7 +1164,7 @@ func (client *GremlinResourcesClient) updateGremlinDatabaseThroughputCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, updateThroughputParameters) @@ -1173,7 +1173,7 @@ func (client *GremlinResourcesClient) updateGremlinDatabaseThroughputCreateReque // BeginUpdateGremlinGraphThroughput - Update RUs per second of an Azure Cosmos DB Gremlin graph // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1196,7 +1196,7 @@ func (client *GremlinResourcesClient) BeginUpdateGremlinGraphThroughput(ctx cont // UpdateGremlinGraphThroughput - Update RUs per second of an Azure Cosmos DB Gremlin graph // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *GremlinResourcesClient) updateGremlinGraphThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *GremlinResourcesClientBeginUpdateGremlinGraphThroughputOptions) (*http.Response, error) { req, err := client.updateGremlinGraphThroughputCreateRequest(ctx, resourceGroupName, accountName, databaseName, graphName, updateThroughputParameters, options) if err != nil { @@ -1240,7 +1240,7 @@ func (client *GremlinResourcesClient) updateGremlinGraphThroughputCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, updateThroughputParameters) diff --git a/sdk/resourcemanager/cosmos/armcosmos/gremlinresources_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/gremlinresources_client_example_test.go index dd54b521abff..00cd1c03aae4 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/gremlinresources_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/gremlinresources_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBGremlinDatabaseList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBGremlinDatabaseList.json func ExampleGremlinResourcesClient_NewListGremlinDatabasesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -62,7 +62,7 @@ func ExampleGremlinResourcesClient_NewListGremlinDatabasesPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBGremlinDatabaseGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBGremlinDatabaseGet.json func ExampleGremlinResourcesClient_GetGremlinDatabase() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -98,7 +98,7 @@ func ExampleGremlinResourcesClient_GetGremlinDatabase() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBGremlinDatabaseCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBGremlinDatabaseCreateUpdate.json func ExampleGremlinResourcesClient_BeginCreateUpdateGremlinDatabase() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -147,7 +147,7 @@ func ExampleGremlinResourcesClient_BeginCreateUpdateGremlinDatabase() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBGremlinDatabaseDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBGremlinDatabaseDelete.json func ExampleGremlinResourcesClient_BeginDeleteGremlinDatabase() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -168,7 +168,7 @@ func ExampleGremlinResourcesClient_BeginDeleteGremlinDatabase() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBGremlinDatabaseThroughputGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBGremlinDatabaseThroughputGet.json func ExampleGremlinResourcesClient_GetGremlinDatabaseThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -206,7 +206,7 @@ func ExampleGremlinResourcesClient_GetGremlinDatabaseThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBGremlinDatabaseThroughputUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBGremlinDatabaseThroughputUpdate.json func ExampleGremlinResourcesClient_BeginUpdateGremlinDatabaseThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -256,7 +256,7 @@ func ExampleGremlinResourcesClient_BeginUpdateGremlinDatabaseThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBGremlinDatabaseMigrateToAutoscale.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBGremlinDatabaseMigrateToAutoscale.json func ExampleGremlinResourcesClient_BeginMigrateGremlinDatabaseToAutoscale() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -295,7 +295,7 @@ func ExampleGremlinResourcesClient_BeginMigrateGremlinDatabaseToAutoscale() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBGremlinDatabaseMigrateToManualThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBGremlinDatabaseMigrateToManualThroughput.json func ExampleGremlinResourcesClient_BeginMigrateGremlinDatabaseToManualThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -331,7 +331,7 @@ func ExampleGremlinResourcesClient_BeginMigrateGremlinDatabaseToManualThroughput // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBGremlinGraphList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBGremlinGraphList.json func ExampleGremlinResourcesClient_NewListGremlinGraphsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -410,7 +410,7 @@ func ExampleGremlinResourcesClient_NewListGremlinGraphsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBGremlinGraphGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBGremlinGraphGet.json func ExampleGremlinResourcesClient_GetGremlinGraph() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -481,7 +481,7 @@ func ExampleGremlinResourcesClient_GetGremlinGraph() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBGremlinGraphCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBGremlinGraphCreateUpdate.json func ExampleGremlinResourcesClient_BeginCreateUpdateGremlinGraph() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -605,7 +605,7 @@ func ExampleGremlinResourcesClient_BeginCreateUpdateGremlinGraph() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBGremlinGraphDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBGremlinGraphDelete.json func ExampleGremlinResourcesClient_BeginDeleteGremlinGraph() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -626,7 +626,7 @@ func ExampleGremlinResourcesClient_BeginDeleteGremlinGraph() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBGremlinGraphThroughputGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBGremlinGraphThroughputGet.json func ExampleGremlinResourcesClient_GetGremlinGraphThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -664,7 +664,7 @@ func ExampleGremlinResourcesClient_GetGremlinGraphThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBGremlinGraphThroughputUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBGremlinGraphThroughputUpdate.json func ExampleGremlinResourcesClient_BeginUpdateGremlinGraphThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -714,7 +714,7 @@ func ExampleGremlinResourcesClient_BeginUpdateGremlinGraphThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBGremlinGraphMigrateToAutoscale.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBGremlinGraphMigrateToAutoscale.json func ExampleGremlinResourcesClient_BeginMigrateGremlinGraphToAutoscale() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -753,7 +753,7 @@ func ExampleGremlinResourcesClient_BeginMigrateGremlinGraphToAutoscale() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBGremlinGraphMigrateToManualThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBGremlinGraphMigrateToManualThroughput.json func ExampleGremlinResourcesClient_BeginMigrateGremlinGraphToManualThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -789,7 +789,7 @@ func ExampleGremlinResourcesClient_BeginMigrateGremlinGraphToManualThroughput() // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBGremlinGraphBackupInformation.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBGremlinGraphBackupInformation.json func ExampleGremlinResourcesClient_BeginRetrieveContinuousBackupInformation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/locations_client.go b/sdk/resourcemanager/cosmos/armcosmos/locations_client.go index 06264c4c2cc9..6bf209fa6b0b 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/locations_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/locations_client.go @@ -47,7 +47,7 @@ func NewLocationsClient(subscriptionID string, credential azcore.TokenCredential // Get - Get the properties of an existing Cosmos DB location // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - location - Cosmos DB region, with spaces between words and each word capitalized. // - options - LocationsClientGetOptions contains the optional parameters for the LocationsClient.Get method. func (client *LocationsClient) Get(ctx context.Context, location string, options *LocationsClientGetOptions) (LocationsClientGetResponse, error) { @@ -81,7 +81,7 @@ func (client *LocationsClient) getCreateRequest(ctx context.Context, location st return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -98,7 +98,7 @@ func (client *LocationsClient) getHandleResponse(resp *http.Response) (Locations // NewListPager - List Cosmos DB locations and their properties // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - options - LocationsClientListOptions contains the optional parameters for the LocationsClient.NewListPager method. func (client *LocationsClient) NewListPager(options *LocationsClientListOptions) *runtime.Pager[LocationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[LocationsClientListResponse]{ @@ -134,7 +134,7 @@ func (client *LocationsClient) listCreateRequest(ctx context.Context, options *L return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/locations_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/locations_client_example_test.go index 99b288e84ad4..0f9649471cd4 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/locations_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/locations_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBLocationList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBLocationList.json func ExampleLocationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -50,7 +50,6 @@ func ExampleLocationsClient_NewListPager() { // to.Ptr(armcosmos.BackupStorageRedundancyLocal), // to.Ptr(armcosmos.BackupStorageRedundancyGeo)}, // IsResidencyRestricted: to.Ptr(false), - // Status: to.Ptr("ProductionSLA"), // SupportsAvailabilityZone: to.Ptr(false), // }, // }, @@ -63,7 +62,6 @@ func ExampleLocationsClient_NewListPager() { // to.Ptr(armcosmos.BackupStorageRedundancyZone), // to.Ptr(armcosmos.BackupStorageRedundancyGeo)}, // IsResidencyRestricted: to.Ptr(false), - // Status: to.Ptr("ProductionSLA"), // SupportsAvailabilityZone: to.Ptr(true), // }, // }}, @@ -71,7 +69,7 @@ func ExampleLocationsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBLocationGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBLocationGet.json func ExampleLocationsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -98,7 +96,6 @@ func ExampleLocationsClient_Get() { // to.Ptr(armcosmos.BackupStorageRedundancyLocal), // to.Ptr(armcosmos.BackupStorageRedundancyGeo)}, // IsResidencyRestricted: to.Ptr(true), - // Status: to.Ptr("ProductionSLA"), // SupportsAvailabilityZone: to.Ptr(true), // }, // } diff --git a/sdk/resourcemanager/cosmos/armcosmos/models.go b/sdk/resourcemanager/cosmos/armcosmos/models.go index 5ce747f6d7e8..cc29b89aa4c4 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/models.go +++ b/sdk/resourcemanager/cosmos/armcosmos/models.go @@ -31,9 +31,6 @@ type ARMProxyResource struct { // ARMResourceProperties - The core properties of ARM resources. type ARMResourceProperties struct { - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -67,28 +64,6 @@ type AnalyticalStorageConfiguration struct { SchemaType *AnalyticalStorageSchemaType `json:"schemaType,omitempty"` } -// AuthenticationMethodLdapProperties - Ldap authentication method properties. This feature is in preview. -type AuthenticationMethodLdapProperties struct { - // Distinguished name of the object to start the recursive search of users from. - SearchBaseDistinguishedName *string `json:"searchBaseDistinguishedName,omitempty"` - - // Template to use for searching. Defaults to (cn=%s) where %s will be replaced by the username used to login. - SearchFilterTemplate *string `json:"searchFilterTemplate,omitempty"` - ServerCertificates []*Certificate `json:"serverCertificates,omitempty"` - - // Hostname of the LDAP server. - ServerHostname *string `json:"serverHostname,omitempty"` - - // Port of the LDAP server. - ServerPort *int32 `json:"serverPort,omitempty"` - - // Distinguished name of the look up user account, who can look up user details on authentication. - ServiceUserDistinguishedName *string `json:"serviceUserDistinguishedName,omitempty"` - - // Password of the look up user. - ServiceUserPassword *string `json:"serviceUserPassword,omitempty"` -} - // AutoUpgradePolicyResource - Cosmos DB resource auto-upgrade policy type AutoUpgradePolicyResource struct { // Represents throughput policy which service must adhere to for auto-upgrade @@ -112,23 +87,6 @@ type AutoscaleSettingsResource struct { TargetMaxThroughput *int32 `json:"targetMaxThroughput,omitempty" azure:"ro"` } -// AzureBlobDataTransferDataSourceSink - An Azure Blob Storage data source/sink -type AzureBlobDataTransferDataSourceSink struct { - // REQUIRED - Component *DataTransferComponent `json:"component,omitempty"` - - // REQUIRED - ContainerName *string `json:"containerName,omitempty"` - EndpointURL *string `json:"endpointUrl,omitempty"` -} - -// GetDataTransferDataSourceSink implements the DataTransferDataSourceSinkClassification interface for type AzureBlobDataTransferDataSourceSink. -func (a *AzureBlobDataTransferDataSourceSink) GetDataTransferDataSourceSink() *DataTransferDataSourceSink { - return &DataTransferDataSourceSink{ - Component: a.Component, - } -} - // BackupInformation - Backup information of a resource. type BackupInformation struct { // READ-ONLY; Information about the status of continuous backups. @@ -168,25 +126,6 @@ type BackupPolicyMigrationState struct { TargetType *BackupPolicyType `json:"targetType,omitempty"` } -// BackupResource - A restorable backup of a Cassandra cluster. -type BackupResource struct { - Properties *BackupResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; The unique resource identifier of the database account. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the database account. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of Azure resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -type BackupResourceProperties struct { - // The time this backup was taken, formatted like 2021-01-21T17:35:21 - Timestamp *time.Time `json:"timestamp,omitempty"` -} - // Capability - Cosmos DB capability object type Capability struct { // Name of the Cosmos DB capability. For example, "name": "EnableCassandra". Current values also include "EnableTable" and @@ -263,22 +202,11 @@ type CassandraClustersClientBeginUpdateOptions struct { ResumeToken string } -// CassandraClustersClientGetBackupOptions contains the optional parameters for the CassandraClustersClient.GetBackup method. -type CassandraClustersClientGetBackupOptions struct { - // placeholder for future optional parameters -} - // CassandraClustersClientGetOptions contains the optional parameters for the CassandraClustersClient.Get method. type CassandraClustersClientGetOptions struct { // placeholder for future optional parameters } -// CassandraClustersClientListBackupsOptions contains the optional parameters for the CassandraClustersClient.NewListBackupsPager -// method. -type CassandraClustersClientListBackupsOptions struct { - // placeholder for future optional parameters -} - // CassandraClustersClientListByResourceGroupOptions contains the optional parameters for the CassandraClustersClient.NewListByResourceGroupPager // method. type CassandraClustersClientListByResourceGroupOptions struct { @@ -328,33 +256,11 @@ type CassandraDataCentersClientListOptions struct { // placeholder for future optional parameters } -// CassandraDataTransferDataSourceSink - A CosmosDB Cassandra API data source/sink -type CassandraDataTransferDataSourceSink struct { - // REQUIRED - Component *DataTransferComponent `json:"component,omitempty"` - - // REQUIRED - KeyspaceName *string `json:"keyspaceName,omitempty"` - - // REQUIRED - TableName *string `json:"tableName,omitempty"` -} - -// GetDataTransferDataSourceSink implements the DataTransferDataSourceSinkClassification interface for type CassandraDataTransferDataSourceSink. -func (c *CassandraDataTransferDataSourceSink) GetDataTransferDataSourceSink() *DataTransferDataSourceSink { - return &DataTransferDataSourceSink{ - Component: c.Component, - } -} - // CassandraKeyspaceCreateUpdateParameters - Parameters to create and update Cosmos DB Cassandra keyspace. type CassandraKeyspaceCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB Cassandra keyspace. Properties *CassandraKeyspaceCreateUpdateProperties `json:"properties,omitempty"` - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -415,9 +321,6 @@ type CassandraKeyspaceGetPropertiesResource struct { // CassandraKeyspaceGetResults - An Azure Cosmos DB Cassandra keyspace. type CassandraKeyspaceGetResults struct { - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -473,13 +376,6 @@ type CassandraResourcesClientBeginCreateUpdateCassandraTableOptions struct { ResumeToken string } -// CassandraResourcesClientBeginCreateUpdateCassandraViewOptions contains the optional parameters for the CassandraResourcesClient.BeginCreateUpdateCassandraView -// method. -type CassandraResourcesClientBeginCreateUpdateCassandraViewOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - // CassandraResourcesClientBeginDeleteCassandraKeyspaceOptions contains the optional parameters for the CassandraResourcesClient.BeginDeleteCassandraKeyspace // method. type CassandraResourcesClientBeginDeleteCassandraKeyspaceOptions struct { @@ -494,13 +390,6 @@ type CassandraResourcesClientBeginDeleteCassandraTableOptions struct { ResumeToken string } -// CassandraResourcesClientBeginDeleteCassandraViewOptions contains the optional parameters for the CassandraResourcesClient.BeginDeleteCassandraView -// method. -type CassandraResourcesClientBeginDeleteCassandraViewOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - // CassandraResourcesClientBeginMigrateCassandraKeyspaceToAutoscaleOptions contains the optional parameters for the CassandraResourcesClient.BeginMigrateCassandraKeyspaceToAutoscale // method. type CassandraResourcesClientBeginMigrateCassandraKeyspaceToAutoscaleOptions struct { @@ -529,20 +418,6 @@ type CassandraResourcesClientBeginMigrateCassandraTableToManualThroughputOptions ResumeToken string } -// CassandraResourcesClientBeginMigrateCassandraViewToAutoscaleOptions contains the optional parameters for the CassandraResourcesClient.BeginMigrateCassandraViewToAutoscale -// method. -type CassandraResourcesClientBeginMigrateCassandraViewToAutoscaleOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CassandraResourcesClientBeginMigrateCassandraViewToManualThroughputOptions contains the optional parameters for the CassandraResourcesClient.BeginMigrateCassandraViewToManualThroughput -// method. -type CassandraResourcesClientBeginMigrateCassandraViewToManualThroughputOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - // CassandraResourcesClientBeginUpdateCassandraKeyspaceThroughputOptions contains the optional parameters for the CassandraResourcesClient.BeginUpdateCassandraKeyspaceThroughput // method. type CassandraResourcesClientBeginUpdateCassandraKeyspaceThroughputOptions struct { @@ -557,13 +432,6 @@ type CassandraResourcesClientBeginUpdateCassandraTableThroughputOptions struct { ResumeToken string } -// CassandraResourcesClientBeginUpdateCassandraViewThroughputOptions contains the optional parameters for the CassandraResourcesClient.BeginUpdateCassandraViewThroughput -// method. -type CassandraResourcesClientBeginUpdateCassandraViewThroughputOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - // CassandraResourcesClientGetCassandraKeyspaceOptions contains the optional parameters for the CassandraResourcesClient.GetCassandraKeyspace // method. type CassandraResourcesClientGetCassandraKeyspaceOptions struct { @@ -588,18 +456,6 @@ type CassandraResourcesClientGetCassandraTableThroughputOptions struct { // placeholder for future optional parameters } -// CassandraResourcesClientGetCassandraViewOptions contains the optional parameters for the CassandraResourcesClient.GetCassandraView -// method. -type CassandraResourcesClientGetCassandraViewOptions struct { - // placeholder for future optional parameters -} - -// CassandraResourcesClientGetCassandraViewThroughputOptions contains the optional parameters for the CassandraResourcesClient.GetCassandraViewThroughput -// method. -type CassandraResourcesClientGetCassandraViewThroughputOptions struct { - // placeholder for future optional parameters -} - // CassandraResourcesClientListCassandraKeyspacesOptions contains the optional parameters for the CassandraResourcesClient.NewListCassandraKeyspacesPager // method. type CassandraResourcesClientListCassandraKeyspacesOptions struct { @@ -612,12 +468,6 @@ type CassandraResourcesClientListCassandraTablesOptions struct { // placeholder for future optional parameters } -// CassandraResourcesClientListCassandraViewsOptions contains the optional parameters for the CassandraResourcesClient.NewListCassandraViewsPager -// method. -type CassandraResourcesClientListCassandraViewsOptions struct { - // placeholder for future optional parameters -} - // CassandraSchema - Cosmos DB Cassandra table schema type CassandraSchema struct { // List of cluster key. @@ -635,9 +485,6 @@ type CassandraTableCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB Cassandra table. Properties *CassandraTableCreateUpdateProperties `json:"properties,omitempty"` - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -707,9 +554,6 @@ type CassandraTableGetPropertiesResource struct { // CassandraTableGetResults - An Azure Cosmos DB Cassandra table. type CassandraTableGetResults struct { - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -754,118 +598,6 @@ type CassandraTableResource struct { Schema *CassandraSchema `json:"schema,omitempty"` } -// CassandraViewCreateUpdateParameters - Parameters to create and update Cosmos DB Cassandra view. -type CassandraViewCreateUpdateParameters struct { - // REQUIRED; Properties to create and update Azure Cosmos DB Cassandra view. - Properties *CassandraViewCreateUpdateProperties `json:"properties,omitempty"` - - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - - // The location of the resource group to which the resource belongs. - Location *string `json:"location,omitempty"` - - // Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource - // (across resource groups). A maximum of 15 tags can be provided for a - // resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, - // the default experience for a template type is set with "defaultExperience": - // "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; The unique resource identifier of the ARM resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the ARM resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of Azure resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// CassandraViewCreateUpdateProperties - Properties to create and update Azure Cosmos DB Cassandra view. -type CassandraViewCreateUpdateProperties struct { - // REQUIRED; The standard JSON format of a Cassandra view - Resource *CassandraViewResource `json:"resource,omitempty"` - - // A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - Options *CreateUpdateOptions `json:"options,omitempty"` -} - -// CassandraViewGetProperties - The properties of an Azure Cosmos DB Cassandra view -type CassandraViewGetProperties struct { - Options *CassandraViewGetPropertiesOptions `json:"options,omitempty"` - Resource *CassandraViewGetPropertiesResource `json:"resource,omitempty"` -} - -type CassandraViewGetPropertiesOptions struct { - // Specifies the Autoscale settings. - AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"` - - // Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer - // details. - Throughput *int32 `json:"throughput,omitempty"` -} - -type CassandraViewGetPropertiesResource struct { - // REQUIRED; Name of the Cosmos DB Cassandra view - ID *string `json:"id,omitempty"` - - // REQUIRED; View Definition of the Cosmos DB Cassandra view - ViewDefinition *string `json:"viewDefinition,omitempty"` - - // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. - Etag *string `json:"_etag,omitempty" azure:"ro"` - - // READ-ONLY; A system generated property. A unique identifier. - Rid *string `json:"_rid,omitempty" azure:"ro"` - - // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. - Ts *float32 `json:"_ts,omitempty" azure:"ro"` -} - -// CassandraViewGetResults - An Azure Cosmos DB Cassandra view. -type CassandraViewGetResults struct { - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - - // The location of the resource group to which the resource belongs. - Location *string `json:"location,omitempty"` - - // The properties of an Azure Cosmos DB Cassandra view - Properties *CassandraViewGetProperties `json:"properties,omitempty"` - - // Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource - // (across resource groups). A maximum of 15 tags can be provided for a - // resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, - // the default experience for a template type is set with "defaultExperience": - // "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; The unique resource identifier of the ARM resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the ARM resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of Azure resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// CassandraViewListResult - The List operation response, that contains the Cassandra views and their properties. -type CassandraViewListResult struct { - // READ-ONLY; List of Cassandra views and their properties. - Value []*CassandraViewGetResults `json:"value,omitempty" azure:"ro"` -} - -// CassandraViewResource - Cosmos DB Cassandra view resource object -type CassandraViewResource struct { - // REQUIRED; Name of the Cosmos DB Cassandra view - ID *string `json:"id,omitempty"` - - // REQUIRED; View Definition of the Cosmos DB Cassandra view - ViewDefinition *string `json:"viewDefinition,omitempty"` -} - type Certificate struct { // PEM formatted public key. Pem *string `json:"pem,omitempty"` @@ -1013,7 +745,7 @@ type ClusterResource struct { type ClusterResourceProperties struct { // Which authentication method Cassandra should use to authenticate clients. 'None' turns off authentication, so should not // be used except in emergencies. 'Cassandra' is the default password based - // authentication. The default is 'Cassandra'. 'Ldap' is in preview. + // authentication. The default is 'Cassandra'. AuthenticationMethod *AuthenticationMethod `json:"authenticationMethod,omitempty"` // Whether Cassandra audit logging is enabled @@ -1209,7 +941,7 @@ type ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersIte State *NodeState `json:"state,omitempty"` Status *string `json:"status,omitempty"` - // The timestamp at which that snapshot of these usage statistics were taken. + // The timestamp when these statistics were captured. Timestamp *string `json:"timestamp,omitempty"` // List of tokens this node covers. @@ -1302,9 +1034,6 @@ type ContinuousModeBackupPolicy struct { // REQUIRED; Describes the mode of backups. Type *BackupPolicyType `json:"type,omitempty"` - // Configuration values for continuous mode backup - ContinuousModeProperties *ContinuousModeProperties `json:"continuousModeProperties,omitempty"` - // The object representing the state of the migration between the backup policies. MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"` } @@ -1317,12 +1046,6 @@ func (c *ContinuousModeBackupPolicy) GetBackupPolicy() *BackupPolicy { } } -// ContinuousModeProperties - Configuration values for periodic mode backup -type ContinuousModeProperties struct { - // Enum to indicate type of Continuos backup mode - Tier *ContinuousTier `json:"tier,omitempty"` -} - // CorsPolicy - The CORS policy for the Cosmos DB database account. type CorsPolicy struct { // REQUIRED; The origin domains that are permitted to make a request against the service via CORS. @@ -1341,21 +1064,6 @@ type CorsPolicy struct { MaxAgeInSeconds *int64 `json:"maxAgeInSeconds,omitempty"` } -// CreateJobRequest - Parameters to create Data Transfer Job -type CreateJobRequest struct { - // REQUIRED; Data Transfer Create Job Properties - Properties *DataTransferJobProperties `json:"properties,omitempty"` - - // READ-ONLY; The unique resource identifier of the database account. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the database account. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of Azure resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - // CreateUpdateOptions are a list of key-value pairs that describe the resource. Supported keys are "If-Match", "If-None-Match", // "Session-Token" and "Throughput" type CreateUpdateOptions struct { @@ -1383,11 +1091,8 @@ type DataCenterResource struct { // DataCenterResourceProperties - Properties of a managed Cassandra data center. type DataCenterResourceProperties struct { - // Ldap authentication method properties. This feature is in preview. - AuthenticationMethodLdapProperties *AuthenticationMethodLdapProperties `json:"authenticationMethodLdapProperties,omitempty"` - - // If the data center has Availability Zone feature, apply it to the Virtual Machine ScaleSet that host the cassandra data - // center virtual machines. + // If the azure data center has Availability Zone support, apply it to the Virtual Machine ScaleSet that host the cassandra + // data center virtual machines. AvailabilityZone *bool `json:"availabilityZone,omitempty"` // Indicates the Key Uri of the customer key to use for encryption of the backup storage account. @@ -1434,111 +1139,6 @@ type DataCenterResourceProperties struct { SeedNodes []*SeedNode `json:"seedNodes,omitempty" azure:"ro"` } -// DataTransferDataSourceSinkClassification provides polymorphic access to related types. -// Call the interface's GetDataTransferDataSourceSink() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureBlobDataTransferDataSourceSink, *CassandraDataTransferDataSourceSink, *DataTransferDataSourceSink, *SQLDataTransferDataSourceSink -type DataTransferDataSourceSinkClassification interface { - // GetDataTransferDataSourceSink returns the DataTransferDataSourceSink content of the underlying type. - GetDataTransferDataSourceSink() *DataTransferDataSourceSink -} - -// DataTransferDataSourceSink - Base class for all DataTransfer source/sink -type DataTransferDataSourceSink struct { - // REQUIRED - Component *DataTransferComponent `json:"component,omitempty"` -} - -// GetDataTransferDataSourceSink implements the DataTransferDataSourceSinkClassification interface for type DataTransferDataSourceSink. -func (d *DataTransferDataSourceSink) GetDataTransferDataSourceSink() *DataTransferDataSourceSink { - return d -} - -// DataTransferJobFeedResults - The List operation response, that contains the Data Transfer jobs and their properties. -type DataTransferJobFeedResults struct { - // READ-ONLY; URL to get the next set of Data Transfer job list results if there are any. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` - - // READ-ONLY; List of Data Transfer jobs and their properties. - Value []*DataTransferJobGetResults `json:"value,omitempty" azure:"ro"` -} - -// DataTransferJobGetResults - A Cosmos DB Data Transfer Job -type DataTransferJobGetResults struct { - // The properties of a DataTransfer Job - Properties *DataTransferJobProperties `json:"properties,omitempty"` - - // READ-ONLY; The unique resource identifier of the database account. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the database account. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of Azure resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DataTransferJobProperties - The properties of a DataTransfer Job -type DataTransferJobProperties struct { - // REQUIRED; Destination DataStore details - Destination DataTransferDataSourceSinkClassification `json:"destination,omitempty"` - - // REQUIRED; Source DataStore details - Source DataTransferDataSourceSinkClassification `json:"source,omitempty"` - - // Worker count - WorkerCount *int32 `json:"workerCount,omitempty"` - - // READ-ONLY; Error response for Faulted job - Error *ErrorResponse `json:"error,omitempty" azure:"ro"` - - // READ-ONLY; Job Name - JobName *string `json:"jobName,omitempty" azure:"ro"` - - // READ-ONLY; Last Updated Time (ISO-8601 format). - LastUpdatedUTCTime *time.Time `json:"lastUpdatedUtcTime,omitempty" azure:"ro"` - - // READ-ONLY; Processed Count. - ProcessedCount *int64 `json:"processedCount,omitempty" azure:"ro"` - - // READ-ONLY; Job Status - Status *string `json:"status,omitempty" azure:"ro"` - - // READ-ONLY; Total Count. - TotalCount *int64 `json:"totalCount,omitempty" azure:"ro"` -} - -// DataTransferJobsClientCancelOptions contains the optional parameters for the DataTransferJobsClient.Cancel method. -type DataTransferJobsClientCancelOptions struct { - // placeholder for future optional parameters -} - -// DataTransferJobsClientCreateOptions contains the optional parameters for the DataTransferJobsClient.Create method. -type DataTransferJobsClientCreateOptions struct { - // placeholder for future optional parameters -} - -// DataTransferJobsClientGetOptions contains the optional parameters for the DataTransferJobsClient.Get method. -type DataTransferJobsClientGetOptions struct { - // placeholder for future optional parameters -} - -// DataTransferJobsClientListByDatabaseAccountOptions contains the optional parameters for the DataTransferJobsClient.NewListByDatabaseAccountPager -// method. -type DataTransferJobsClientListByDatabaseAccountOptions struct { - // placeholder for future optional parameters -} - -// DataTransferJobsClientPauseOptions contains the optional parameters for the DataTransferJobsClient.Pause method. -type DataTransferJobsClientPauseOptions struct { - // placeholder for future optional parameters -} - -// DataTransferJobsClientResumeOptions contains the optional parameters for the DataTransferJobsClient.Resume method. -type DataTransferJobsClientResumeOptions struct { - // placeholder for future optional parameters -} - // DataTransferRegionalServiceResource - Resource for a regional service location. type DataTransferRegionalServiceResource struct { // READ-ONLY; The location name. @@ -1674,9 +1274,6 @@ type DatabaseAccountCreateUpdateProperties struct { // "SystemAssignedIdentity" and more. DefaultIdentity *string `json:"defaultIdentity,omitempty"` - // The Object representing the different Diagnostic log settings for the Cosmos DB Account. - DiagnosticLogSettings *DiagnosticLogSettings `json:"diagnosticLogSettings,omitempty"` - // Disable write operations on metadata resources (databases, containers, throughput) via account keys DisableKeyBasedMetadataWriteAccess *bool `json:"disableKeyBasedMetadataWriteAccess,omitempty"` @@ -1691,18 +1288,12 @@ type DatabaseAccountCreateUpdateProperties struct { // based on the failover priorities configured for the account. EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty"` - // Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account - EnableBurstCapacity *bool `json:"enableBurstCapacity,omitempty"` - // Enables the cassandra connector on the Cosmos DB C* account EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"` // Flag to indicate whether Free Tier is enabled. EnableFreeTier *bool `json:"enableFreeTier,omitempty"` - // Flag to indicate whether to enable MaterializedViews on the Cosmos DB account - EnableMaterializedViews *bool `json:"enableMaterializedViews,omitempty"` - // Enables the account to write in multiple locations EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"` @@ -1776,9 +1367,6 @@ type DatabaseAccountGetProperties struct { // "SystemAssignedIdentity" and more. DefaultIdentity *string `json:"defaultIdentity,omitempty"` - // The Object representing the different Diagnostic log settings for the Cosmos DB Account. - DiagnosticLogSettings *DiagnosticLogSettings `json:"diagnosticLogSettings,omitempty"` - // Disable write operations on metadata resources (databases, containers, throughput) via account keys DisableKeyBasedMetadataWriteAccess *bool `json:"disableKeyBasedMetadataWriteAccess,omitempty"` @@ -1793,18 +1381,12 @@ type DatabaseAccountGetProperties struct { // based on the failover priorities configured for the account. EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty"` - // Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account - EnableBurstCapacity *bool `json:"enableBurstCapacity,omitempty"` - // Enables the cassandra connector on the Cosmos DB C* account EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"` // Flag to indicate whether Free Tier is enabled. EnableFreeTier *bool `json:"enableFreeTier,omitempty"` - // Flag to indicate whether to enable MaterializedViews on the Cosmos DB account - EnableMaterializedViews *bool `json:"enableMaterializedViews,omitempty"` - // Enables the account to write in multiple locations EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"` @@ -2016,9 +1598,6 @@ type DatabaseAccountUpdateProperties struct { // "SystemAssignedIdentity" and more. DefaultIdentity *string `json:"defaultIdentity,omitempty"` - // The Object representing the different Diagnostic log settings for the Cosmos DB Account. - DiagnosticLogSettings *DiagnosticLogSettings `json:"diagnosticLogSettings,omitempty"` - // Disable write operations on metadata resources (databases, containers, throughput) via account keys DisableKeyBasedMetadataWriteAccess *bool `json:"disableKeyBasedMetadataWriteAccess,omitempty"` @@ -2033,18 +1612,12 @@ type DatabaseAccountUpdateProperties struct { // based on the failover priorities configured for the account. EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty"` - // Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account - EnableBurstCapacity *bool `json:"enableBurstCapacity,omitempty"` - // Enables the cassandra connector on the Cosmos DB C* account EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"` // Flag to indicate whether Free Tier is enabled. EnableFreeTier *bool `json:"enableFreeTier,omitempty"` - // Flag to indicate whether to enable MaterializedViews on the Cosmos DB account - EnableMaterializedViews *bool `json:"enableMaterializedViews,omitempty"` - // Enables the account to write in multiple locations EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"` @@ -2229,12 +1802,6 @@ type DatabaseRestoreResource struct { DatabaseName *string `json:"databaseName,omitempty"` } -// DiagnosticLogSettings - Indicates what diagnostic log settings are to be enabled. -type DiagnosticLogSettings struct { - // Describe the level of detail with which queries are to be logged. - EnableFullTextQuery *EnableFullTextQuery `json:"enableFullTextQuery,omitempty"` -} - // ErrorResponse - Error Response. type ErrorResponse struct { // Error code. @@ -2342,136 +1909,11 @@ func (g *GraphAPIComputeServiceResourceProperties) GetServiceResourceProperties( } } -// GraphResource - Cosmos DB Graph resource object -type GraphResource struct { - // REQUIRED; Name of the Cosmos DB Graph - ID *string `json:"id,omitempty"` -} - -// GraphResourceCreateUpdateParameters - Parameters to create and update Cosmos DB Graph resource. -type GraphResourceCreateUpdateParameters struct { - // REQUIRED; Properties to create and update Azure Cosmos DB Graph resource. - Properties *GraphResourceCreateUpdateProperties `json:"properties,omitempty"` - - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - - // The location of the resource group to which the resource belongs. - Location *string `json:"location,omitempty"` - - // Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource - // (across resource groups). A maximum of 15 tags can be provided for a - // resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, - // the default experience for a template type is set with "defaultExperience": - // "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; The unique resource identifier of the ARM resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the ARM resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of Azure resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// GraphResourceCreateUpdateProperties - Properties to create and update Azure Cosmos DB Graph resource. -type GraphResourceCreateUpdateProperties struct { - // REQUIRED; The standard JSON format of a Graph resource - Resource *GraphResource `json:"resource,omitempty"` - - // A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - Options *CreateUpdateOptions `json:"options,omitempty"` -} - -// GraphResourceGetProperties - The properties of an Azure Cosmos DB SQL database -type GraphResourceGetProperties struct { - Options *GraphResourceGetPropertiesOptions `json:"options,omitempty"` - Resource *GraphResourceGetPropertiesResource `json:"resource,omitempty"` -} - -type GraphResourceGetPropertiesOptions struct { - // Specifies the Autoscale settings. - AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"` - - // Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer - // details. - Throughput *int32 `json:"throughput,omitempty"` -} - -type GraphResourceGetPropertiesResource struct { - // REQUIRED; Name of the Cosmos DB Graph - ID *string `json:"id,omitempty"` -} - -// GraphResourceGetResults - An Azure Cosmos DB Graph resource. -type GraphResourceGetResults struct { - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - - // The location of the resource group to which the resource belongs. - Location *string `json:"location,omitempty"` - - // The properties of an Azure Cosmos DB Graph resource. - Properties *GraphResourceGetProperties `json:"properties,omitempty"` - - // Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource - // (across resource groups). A maximum of 15 tags can be provided for a - // resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, - // the default experience for a template type is set with "defaultExperience": - // "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; The unique resource identifier of the ARM resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the ARM resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of Azure resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// GraphResourcesClientBeginCreateUpdateGraphOptions contains the optional parameters for the GraphResourcesClient.BeginCreateUpdateGraph -// method. -type GraphResourcesClientBeginCreateUpdateGraphOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// GraphResourcesClientBeginDeleteGraphResourceOptions contains the optional parameters for the GraphResourcesClient.BeginDeleteGraphResource -// method. -type GraphResourcesClientBeginDeleteGraphResourceOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// GraphResourcesClientGetGraphOptions contains the optional parameters for the GraphResourcesClient.GetGraph method. -type GraphResourcesClientGetGraphOptions struct { - // placeholder for future optional parameters -} - -// GraphResourcesClientListGraphsOptions contains the optional parameters for the GraphResourcesClient.NewListGraphsPager -// method. -type GraphResourcesClientListGraphsOptions struct { - // placeholder for future optional parameters -} - -// GraphResourcesListResult - The List operation response, that contains the Graph resource and their properties. -type GraphResourcesListResult struct { - // READ-ONLY; List of Graph resource and their properties. - Value []*GraphResourceGetResults `json:"value,omitempty" azure:"ro"` -} - // GremlinDatabaseCreateUpdateParameters - Parameters to create and update Cosmos DB Gremlin database. type GremlinDatabaseCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB Gremlin database. Properties *GremlinDatabaseCreateUpdateProperties `json:"properties,omitempty"` - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -2520,12 +1962,6 @@ type GremlinDatabaseGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB Gremlin database ID *string `json:"id,omitempty"` - // Enum to indicate the mode of resource creation. - CreateMode *CreateMode `json:"createMode,omitempty"` - - // Parameters to indicate the information about the restore - RestoreParameters *ResourceRestoreParameters `json:"restoreParameters,omitempty"` - // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string `json:"_etag,omitempty" azure:"ro"` @@ -2538,9 +1974,6 @@ type GremlinDatabaseGetPropertiesResource struct { // GremlinDatabaseGetResults - An Azure Cosmos DB Gremlin database. type GremlinDatabaseGetResults struct { - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -2574,12 +2007,6 @@ type GremlinDatabaseListResult struct { type GremlinDatabaseResource struct { // REQUIRED; Name of the Cosmos DB Gremlin database ID *string `json:"id,omitempty"` - - // Enum to indicate the mode of resource creation. - CreateMode *CreateMode `json:"createMode,omitempty"` - - // Parameters to indicate the information about the restore - RestoreParameters *ResourceRestoreParameters `json:"restoreParameters,omitempty"` } // GremlinDatabaseRestoreResource - Specific Gremlin Databases to restore. @@ -2596,9 +2023,6 @@ type GremlinGraphCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB Gremlin graph. Properties *GremlinGraphCreateUpdateProperties `json:"properties,omitempty"` - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -2653,9 +2077,6 @@ type GremlinGraphGetPropertiesResource struct { // The conflict resolution policy for the graph. ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"` - // Enum to indicate the mode of resource creation. - CreateMode *CreateMode `json:"createMode,omitempty"` - // Default time to live DefaultTTL *int32 `json:"defaultTtl,omitempty"` @@ -2665,9 +2086,6 @@ type GremlinGraphGetPropertiesResource struct { // The configuration of the partition key to be used for partitioning data into multiple partitions PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"` - // Parameters to indicate the information about the restore - RestoreParameters *ResourceRestoreParameters `json:"restoreParameters,omitempty"` - // The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos // DB service. UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"` @@ -2684,9 +2102,6 @@ type GremlinGraphGetPropertiesResource struct { // GremlinGraphGetResults - An Azure Cosmos DB Gremlin graph. type GremlinGraphGetResults struct { - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -2727,9 +2142,6 @@ type GremlinGraphResource struct { // The conflict resolution policy for the graph. ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"` - // Enum to indicate the mode of resource creation. - CreateMode *CreateMode `json:"createMode,omitempty"` - // Default time to live DefaultTTL *int32 `json:"defaultTtl,omitempty"` @@ -2739,9 +2151,6 @@ type GremlinGraphResource struct { // The configuration of the partition key to be used for partitioning data into multiple partitions PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"` - // Parameters to indicate the information about the restore - RestoreParameters *ResourceRestoreParameters `json:"restoreParameters,omitempty"` - // The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos // DB service. UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"` @@ -2927,12 +2336,6 @@ type KeyWrapMetadata struct { Value *string `json:"value,omitempty"` } -// ListBackups - List of restorable backups for a Cassandra cluster. -type ListBackups struct { - // READ-ONLY; Container for array of backups. - Value []*BackupResource `json:"value,omitempty" azure:"ro"` -} - // ListClusters - List of managed Cassandra clusters. type ListClusters struct { // Container for the array of clusters. @@ -3002,9 +2405,6 @@ type LocationProperties struct { // READ-ONLY; Flag indicating whether the location is residency sensitive. IsResidencyRestricted *bool `json:"isResidencyRestricted,omitempty" azure:"ro"` - // READ-ONLY; The current status of location in Azure. - Status *string `json:"status,omitempty" azure:"ro"` - // READ-ONLY; Flag indicating whether the location supports availability zones or not. SupportsAvailabilityZone *bool `json:"supportsAvailabilityZone,omitempty" azure:"ro"` } @@ -3140,12 +2540,6 @@ func (m *MaterializedViewsBuilderServiceResourceProperties) GetServiceResourcePr } } -// MergeParameters - The properties of an Azure Cosmos DB merge operations -type MergeParameters struct { - // Specifies whether the operation is a real merge operation or a simulation. - IsDryRun *bool `json:"isDryRun,omitempty"` -} - // Metric data type Metric struct { // READ-ONLY; The end time for the metric (ISO-8601 format). @@ -3241,9 +2635,6 @@ type MongoDBCollectionCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB MongoDB collection. Properties *MongoDBCollectionCreateUpdateProperties `json:"properties,omitempty"` - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -3295,15 +2686,9 @@ type MongoDBCollectionGetPropertiesResource struct { // Analytical TTL. AnalyticalStorageTTL *int32 `json:"analyticalStorageTtl,omitempty"` - // Enum to indicate the mode of resource creation. - CreateMode *CreateMode `json:"createMode,omitempty"` - // List of index keys Indexes []*MongoIndex `json:"indexes,omitempty"` - // Parameters to indicate the information about the restore - RestoreParameters *ResourceRestoreParameters `json:"restoreParameters,omitempty"` - // A key-value pair of shard keys to be applied for the request. ShardKey map[string]*string `json:"shardKey,omitempty"` @@ -3319,9 +2704,6 @@ type MongoDBCollectionGetPropertiesResource struct { // MongoDBCollectionGetResults - An Azure Cosmos DB MongoDB collection. type MongoDBCollectionGetResults struct { - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -3359,15 +2741,9 @@ type MongoDBCollectionResource struct { // Analytical TTL. AnalyticalStorageTTL *int32 `json:"analyticalStorageTtl,omitempty"` - // Enum to indicate the mode of resource creation. - CreateMode *CreateMode `json:"createMode,omitempty"` - // List of index keys Indexes []*MongoIndex `json:"indexes,omitempty"` - // Parameters to indicate the information about the restore - RestoreParameters *ResourceRestoreParameters `json:"restoreParameters,omitempty"` - // A key-value pair of shard keys to be applied for the request. ShardKey map[string]*string `json:"shardKey,omitempty"` } @@ -3377,9 +2753,6 @@ type MongoDBDatabaseCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB MongoDB database. Properties *MongoDBDatabaseCreateUpdateProperties `json:"properties,omitempty"` - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -3428,12 +2801,6 @@ type MongoDBDatabaseGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB MongoDB database ID *string `json:"id,omitempty"` - // Enum to indicate the mode of resource creation. - CreateMode *CreateMode `json:"createMode,omitempty"` - - // Parameters to indicate the information about the restore - RestoreParameters *ResourceRestoreParameters `json:"restoreParameters,omitempty"` - // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string `json:"_etag,omitempty" azure:"ro"` @@ -3446,9 +2813,6 @@ type MongoDBDatabaseGetPropertiesResource struct { // MongoDBDatabaseGetResults - An Azure Cosmos DB MongoDB database. type MongoDBDatabaseGetResults struct { - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -3482,12 +2846,6 @@ type MongoDBDatabaseListResult struct { type MongoDBDatabaseResource struct { // REQUIRED; Name of the Cosmos DB MongoDB database ID *string `json:"id,omitempty"` - - // Enum to indicate the mode of resource creation. - CreateMode *CreateMode `json:"createMode,omitempty"` - - // Parameters to indicate the information about the restore - RestoreParameters *ResourceRestoreParameters `json:"restoreParameters,omitempty"` } // MongoDBResourcesClientBeginCreateUpdateMongoDBCollectionOptions contains the optional parameters for the MongoDBResourcesClient.BeginCreateUpdateMongoDBCollection @@ -3546,13 +2904,6 @@ type MongoDBResourcesClientBeginDeleteMongoUserDefinitionOptions struct { ResumeToken string } -// MongoDBResourcesClientBeginListMongoDBCollectionPartitionMergeOptions contains the optional parameters for the MongoDBResourcesClient.BeginListMongoDBCollectionPartitionMerge -// method. -type MongoDBResourcesClientBeginListMongoDBCollectionPartitionMergeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - // MongoDBResourcesClientBeginMigrateMongoDBCollectionToAutoscaleOptions contains the optional parameters for the MongoDBResourcesClient.BeginMigrateMongoDBCollectionToAutoscale // method. type MongoDBResourcesClientBeginMigrateMongoDBCollectionToAutoscaleOptions struct { @@ -3581,34 +2932,6 @@ type MongoDBResourcesClientBeginMigrateMongoDBDatabaseToManualThroughputOptions ResumeToken string } -// MongoDBResourcesClientBeginMongoDBContainerRedistributeThroughputOptions contains the optional parameters for the MongoDBResourcesClient.BeginMongoDBContainerRedistributeThroughput -// method. -type MongoDBResourcesClientBeginMongoDBContainerRedistributeThroughputOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// MongoDBResourcesClientBeginMongoDBContainerRetrieveThroughputDistributionOptions contains the optional parameters for the -// MongoDBResourcesClient.BeginMongoDBContainerRetrieveThroughputDistribution method. -type MongoDBResourcesClientBeginMongoDBContainerRetrieveThroughputDistributionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// MongoDBResourcesClientBeginMongoDBDatabaseRedistributeThroughputOptions contains the optional parameters for the MongoDBResourcesClient.BeginMongoDBDatabaseRedistributeThroughput -// method. -type MongoDBResourcesClientBeginMongoDBDatabaseRedistributeThroughputOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// MongoDBResourcesClientBeginMongoDBDatabaseRetrieveThroughputDistributionOptions contains the optional parameters for the -// MongoDBResourcesClient.BeginMongoDBDatabaseRetrieveThroughputDistribution method. -type MongoDBResourcesClientBeginMongoDBDatabaseRetrieveThroughputDistributionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - // MongoDBResourcesClientBeginRetrieveContinuousBackupInformationOptions contains the optional parameters for the MongoDBResourcesClient.BeginRetrieveContinuousBackupInformation // method. type MongoDBResourcesClientBeginRetrieveContinuousBackupInformationOptions struct { @@ -4156,84 +3479,6 @@ type Permission struct { NotDataActions []*string `json:"notDataActions,omitempty"` } -// PhysicalPartitionID - PhysicalPartitionId object -type PhysicalPartitionID struct { - // REQUIRED; Id of a physical partition - ID *string `json:"id,omitempty"` -} - -// PhysicalPartitionStorageInfo - The storage of a physical partition -type PhysicalPartitionStorageInfo struct { - // READ-ONLY; The unique identifier of the partition. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The storage in KB for the physical partition. - StorageInKB *float64 `json:"storageInKB,omitempty" azure:"ro"` -} - -// PhysicalPartitionStorageInfoCollection - List of physical partitions and their properties returned by a merge operation. -type PhysicalPartitionStorageInfoCollection struct { - // READ-ONLY; List of physical partitions and their properties. - PhysicalPartitionStorageInfoCollection []*PhysicalPartitionStorageInfo `json:"physicalPartitionStorageInfoCollection,omitempty" azure:"ro"` -} - -// PhysicalPartitionThroughputInfoProperties - The properties of an Azure Cosmos DB PhysicalPartitionThroughputInfoProperties -// object -type PhysicalPartitionThroughputInfoProperties struct { - // Array of physical partition throughput info objects - PhysicalPartitionThroughputInfo []*PhysicalPartitionThroughputInfoResource `json:"physicalPartitionThroughputInfo,omitempty"` -} - -// PhysicalPartitionThroughputInfoResource - PhysicalPartitionThroughputInfo object -type PhysicalPartitionThroughputInfoResource struct { - // REQUIRED; Id of a physical partition - ID *string `json:"id,omitempty"` - - // Throughput of a physical partition - Throughput *float64 `json:"throughput,omitempty"` -} - -// PhysicalPartitionThroughputInfoResult - An Azure Cosmos DB PhysicalPartitionThroughputInfoResult object. -type PhysicalPartitionThroughputInfoResult struct { - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - - // The location of the resource group to which the resource belongs. - Location *string `json:"location,omitempty"` - - // The properties of an Azure Cosmos DB PhysicalPartitionThroughputInfoResult object - Properties *PhysicalPartitionThroughputInfoResultProperties `json:"properties,omitempty"` - - // Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource - // (across resource groups). A maximum of 15 tags can be provided for a - // resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, - // the default experience for a template type is set with "defaultExperience": - // "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; The unique resource identifier of the ARM resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the ARM resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of Azure resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PhysicalPartitionThroughputInfoResultProperties - The properties of an Azure Cosmos DB PhysicalPartitionThroughputInfoResult -// object -type PhysicalPartitionThroughputInfoResultProperties struct { - // properties of physical partition throughput info - Resource *PhysicalPartitionThroughputInfoResultPropertiesResource `json:"resource,omitempty"` -} - -// PhysicalPartitionThroughputInfoResultPropertiesResource - properties of physical partition throughput info -type PhysicalPartitionThroughputInfoResultPropertiesResource struct { - // Array of physical partition throughput info objects - PhysicalPartitionThroughputInfo []*PhysicalPartitionThroughputInfoResource `json:"physicalPartitionThroughputInfo,omitempty"` -} - // PrivateEndpointConnection - A private endpoint connection type PrivateEndpointConnection struct { // Resource properties. @@ -4389,52 +3634,6 @@ type ProxyResource struct { Type *string `json:"type,omitempty" azure:"ro"` } -// RedistributeThroughputParameters - Cosmos DB redistribute throughput parameters object -type RedistributeThroughputParameters struct { - // REQUIRED; Properties to redistribute throughput parameters object - Properties *RedistributeThroughputProperties `json:"properties,omitempty"` - - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - - // The location of the resource group to which the resource belongs. - Location *string `json:"location,omitempty"` - - // Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource - // (across resource groups). A maximum of 15 tags can be provided for a - // resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, - // the default experience for a template type is set with "defaultExperience": - // "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; The unique resource identifier of the ARM resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the ARM resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of Azure resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// RedistributeThroughputProperties - Properties to redistribute throughput for Azure Cosmos DB resource. -type RedistributeThroughputProperties struct { - // REQUIRED; The standard JSON format of a resource throughput - Resource *RedistributeThroughputPropertiesResource `json:"resource,omitempty"` -} - -// RedistributeThroughputPropertiesResource - Resource to redistribute throughput for Azure Cosmos DB resource -type RedistributeThroughputPropertiesResource struct { - // REQUIRED; Array of PhysicalPartitionThroughputInfoResource objects. - SourcePhysicalPartitionThroughputInfo []*PhysicalPartitionThroughputInfoResource `json:"sourcePhysicalPartitionThroughputInfo,omitempty"` - - // REQUIRED; Array of PhysicalPartitionThroughputInfoResource objects. - TargetPhysicalPartitionThroughputInfo []*PhysicalPartitionThroughputInfoResource `json:"targetPhysicalPartitionThroughputInfo,omitempty"` - - // REQUIRED; ThroughputPolicy to apply for throughput redistribution - ThroughputPolicy *ThroughputPolicyType `json:"throughputPolicy,omitempty"` -} - // RegionForOnlineOffline - Cosmos DB region to online or offline. type RegionForOnlineOffline struct { // REQUIRED; Cosmos DB region, with spaces between words and each word capitalized. @@ -4465,16 +3664,6 @@ type Resource struct { Type *string `json:"type,omitempty" azure:"ro"` } -// ResourceRestoreParameters - Parameters to indicate the information about the restore. -type ResourceRestoreParameters struct { - // The id of the restorable database account from which the restore has to be initiated. For example: - // /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName} - RestoreSource *string `json:"restoreSource,omitempty"` - - // Time to which the account has to be restored (ISO-8601 format). - RestoreTimestampInUTC *time.Time `json:"restoreTimestampInUtc,omitempty"` -} - // RestorableDatabaseAccountGetResult - A Azure Cosmos DB restorable database account. type RestorableDatabaseAccountGetResult struct { // The location of the resource group to which the resource belongs. @@ -4504,9 +3693,6 @@ type RestorableDatabaseAccountProperties struct { // The time at which the restorable database account has been deleted (ISO-8601 format). DeletionTime *time.Time `json:"deletionTime,omitempty"` - // The least recent time at which the database account can be restored to (ISO-8601 format). - OldestRestorableTime *time.Time `json:"oldestRestorableTime,omitempty"` - // READ-ONLY; The API type of the restorable database account. APIType *APIType `json:"apiType,omitempty" azure:"ro"` @@ -4893,9 +4079,6 @@ type RestorableSQLContainerPropertiesResourceContainer struct { // The conflict resolution policy for the container. ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"` - // Enum to indicate the mode of resource creation. - CreateMode *CreateMode `json:"createMode,omitempty"` - // Default time to live DefaultTTL *int32 `json:"defaultTtl,omitempty"` @@ -4905,9 +4088,6 @@ type RestorableSQLContainerPropertiesResourceContainer struct { // The configuration of the partition key to be used for partitioning data into multiple partitions PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"` - // Parameters to indicate the information about the restore - RestoreParameters *ResourceRestoreParameters `json:"restoreParameters,omitempty"` - // The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos // DB service. UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"` @@ -4989,12 +4169,6 @@ type RestorableSQLDatabasePropertiesResourceDatabase struct { // REQUIRED; Name of the Cosmos DB SQL database ID *string `json:"id,omitempty"` - // Enum to indicate the mode of resource creation. - CreateMode *CreateMode `json:"createMode,omitempty"` - - // Parameters to indicate the information about the restore - RestoreParameters *ResourceRestoreParameters `json:"restoreParameters,omitempty"` - // READ-ONLY; A system generated property that specified the addressable path of the collections resource. Colls *string `json:"_colls,omitempty" azure:"ro"` @@ -5157,63 +4331,10 @@ type RestoreParameters struct { // Time to which the account has to be restored (ISO-8601 format). RestoreTimestampInUTC *time.Time `json:"restoreTimestampInUtc,omitempty"` - // The source backup location for restore. - SourceBackupLocation *string `json:"sourceBackupLocation,omitempty"` - // List of specific tables available for restore. TablesToRestore []*string `json:"tablesToRestore,omitempty"` } -// RestoreParametersBase - Parameters to indicate the information about the restore. -type RestoreParametersBase struct { - // The id of the restorable database account from which the restore has to be initiated. For example: - // /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName} - RestoreSource *string `json:"restoreSource,omitempty"` - - // Time to which the account has to be restored (ISO-8601 format). - RestoreTimestampInUTC *time.Time `json:"restoreTimestampInUtc,omitempty"` -} - -// RetrieveThroughputParameters - Cosmos DB retrieve throughput parameters object -type RetrieveThroughputParameters struct { - // REQUIRED; Properties to retrieve throughput parameters object - Properties *RetrieveThroughputProperties `json:"properties,omitempty"` - - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - - // The location of the resource group to which the resource belongs. - Location *string `json:"location,omitempty"` - - // Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource - // (across resource groups). A maximum of 15 tags can be provided for a - // resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, - // the default experience for a template type is set with "defaultExperience": - // "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; The unique resource identifier of the ARM resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the ARM resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of Azure resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// RetrieveThroughputProperties - Properties to retrieve throughput for Azure Cosmos DB resource. -type RetrieveThroughputProperties struct { - // REQUIRED; The standard JSON format of a resource throughput - Resource *RetrieveThroughputPropertiesResource `json:"resource,omitempty"` -} - -// RetrieveThroughputPropertiesResource - Resource to retrieve throughput information for Cosmos DB resource -type RetrieveThroughputPropertiesResource struct { - // REQUIRED; Array of PhysicalPartitionId objects. - PhysicalPartitionIDs []*PhysicalPartitionID `json:"physicalPartitionIds,omitempty"` -} - // Role - The set of roles permitted through this Role Definition. type Role struct { // The database name the role is applied. @@ -5228,9 +4349,6 @@ type SQLContainerCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB container. Properties *SQLContainerCreateUpdateProperties `json:"properties,omitempty"` - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -5288,9 +4406,6 @@ type SQLContainerGetPropertiesResource struct { // The conflict resolution policy for the container. ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"` - // Enum to indicate the mode of resource creation. - CreateMode *CreateMode `json:"createMode,omitempty"` - // Default time to live DefaultTTL *int32 `json:"defaultTtl,omitempty"` @@ -5300,9 +4415,6 @@ type SQLContainerGetPropertiesResource struct { // The configuration of the partition key to be used for partitioning data into multiple partitions PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"` - // Parameters to indicate the information about the restore - RestoreParameters *ResourceRestoreParameters `json:"restoreParameters,omitempty"` - // The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos // DB service. UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"` @@ -5319,9 +4431,6 @@ type SQLContainerGetPropertiesResource struct { // SQLContainerGetResults - An Azure Cosmos DB container. type SQLContainerGetResults struct { - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -5365,9 +4474,6 @@ type SQLContainerResource struct { // The conflict resolution policy for the container. ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"` - // Enum to indicate the mode of resource creation. - CreateMode *CreateMode `json:"createMode,omitempty"` - // Default time to live DefaultTTL *int32 `json:"defaultTtl,omitempty"` @@ -5377,41 +4483,16 @@ type SQLContainerResource struct { // The configuration of the partition key to be used for partitioning data into multiple partitions PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"` - // Parameters to indicate the information about the restore - RestoreParameters *ResourceRestoreParameters `json:"restoreParameters,omitempty"` - // The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos // DB service. UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"` } -// SQLDataTransferDataSourceSink - A CosmosDB Cassandra API data source/sink -type SQLDataTransferDataSourceSink struct { - // REQUIRED - Component *DataTransferComponent `json:"component,omitempty"` - - // REQUIRED - ContainerName *string `json:"containerName,omitempty"` - - // REQUIRED - DatabaseName *string `json:"databaseName,omitempty"` -} - -// GetDataTransferDataSourceSink implements the DataTransferDataSourceSinkClassification interface for type SQLDataTransferDataSourceSink. -func (s *SQLDataTransferDataSourceSink) GetDataTransferDataSourceSink() *DataTransferDataSourceSink { - return &DataTransferDataSourceSink{ - Component: s.Component, - } -} - // SQLDatabaseCreateUpdateParameters - Parameters to create and update Cosmos DB SQL database. type SQLDatabaseCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB SQL database. Properties *SQLDatabaseCreateUpdateProperties `json:"properties,omitempty"` - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -5463,12 +4544,6 @@ type SQLDatabaseGetPropertiesResource struct { // A system generated property that specified the addressable path of the collections resource. Colls *string `json:"_colls,omitempty"` - // Enum to indicate the mode of resource creation. - CreateMode *CreateMode `json:"createMode,omitempty"` - - // Parameters to indicate the information about the restore - RestoreParameters *ResourceRestoreParameters `json:"restoreParameters,omitempty"` - // A system generated property that specifies the addressable path of the users resource. Users *string `json:"_users,omitempty"` @@ -5484,9 +4559,6 @@ type SQLDatabaseGetPropertiesResource struct { // SQLDatabaseGetResults - An Azure Cosmos DB SQL database. type SQLDatabaseGetResults struct { - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -5520,12 +4592,6 @@ type SQLDatabaseListResult struct { type SQLDatabaseResource struct { // REQUIRED; Name of the Cosmos DB SQL database ID *string `json:"id,omitempty"` - - // Enum to indicate the mode of resource creation. - CreateMode *CreateMode `json:"createMode,omitempty"` - - // Parameters to indicate the information about the restore - RestoreParameters *ResourceRestoreParameters `json:"restoreParameters,omitempty"` } // SQLDedicatedGatewayRegionalServiceResource - Resource for a regional service location. @@ -5693,13 +4759,6 @@ type SQLResourcesClientBeginDeleteSQLUserDefinedFunctionOptions struct { ResumeToken string } -// SQLResourcesClientBeginListSQLContainerPartitionMergeOptions contains the optional parameters for the SQLResourcesClient.BeginListSQLContainerPartitionMerge -// method. -type SQLResourcesClientBeginListSQLContainerPartitionMergeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - // SQLResourcesClientBeginMigrateSQLContainerToAutoscaleOptions contains the optional parameters for the SQLResourcesClient.BeginMigrateSQLContainerToAutoscale // method. type SQLResourcesClientBeginMigrateSQLContainerToAutoscaleOptions struct { @@ -5735,34 +4794,6 @@ type SQLResourcesClientBeginRetrieveContinuousBackupInformationOptions struct { ResumeToken string } -// SQLResourcesClientBeginSQLContainerRedistributeThroughputOptions contains the optional parameters for the SQLResourcesClient.BeginSQLContainerRedistributeThroughput -// method. -type SQLResourcesClientBeginSQLContainerRedistributeThroughputOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SQLResourcesClientBeginSQLContainerRetrieveThroughputDistributionOptions contains the optional parameters for the SQLResourcesClient.BeginSQLContainerRetrieveThroughputDistribution -// method. -type SQLResourcesClientBeginSQLContainerRetrieveThroughputDistributionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SQLResourcesClientBeginSQLDatabaseRedistributeThroughputOptions contains the optional parameters for the SQLResourcesClient.BeginSQLDatabaseRedistributeThroughput -// method. -type SQLResourcesClientBeginSQLDatabaseRedistributeThroughputOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SQLResourcesClientBeginSQLDatabaseRetrieveThroughputDistributionOptions contains the optional parameters for the SQLResourcesClient.BeginSQLDatabaseRetrieveThroughputDistribution -// method. -type SQLResourcesClientBeginSQLDatabaseRetrieveThroughputDistributionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - // SQLResourcesClientBeginUpdateSQLContainerThroughputOptions contains the optional parameters for the SQLResourcesClient.BeginUpdateSQLContainerThroughput // method. type SQLResourcesClientBeginUpdateSQLContainerThroughputOptions struct { @@ -5974,9 +5005,6 @@ type SQLStoredProcedureCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB storedProcedure. Properties *SQLStoredProcedureCreateUpdateProperties `json:"properties,omitempty"` - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -6030,9 +5058,6 @@ type SQLStoredProcedureGetPropertiesResource struct { // SQLStoredProcedureGetResults - An Azure Cosmos DB storedProcedure. type SQLStoredProcedureGetResults struct { - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -6076,9 +5101,6 @@ type SQLTriggerCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB trigger. Properties *SQLTriggerCreateUpdateProperties `json:"properties,omitempty"` - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -6138,9 +5160,6 @@ type SQLTriggerGetPropertiesResource struct { // SQLTriggerGetResults - An Azure Cosmos DB trigger. type SQLTriggerGetResults struct { - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -6190,9 +5209,6 @@ type SQLUserDefinedFunctionCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB userDefinedFunction. Properties *SQLUserDefinedFunctionCreateUpdateProperties `json:"properties,omitempty"` - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -6246,9 +5262,6 @@ type SQLUserDefinedFunctionGetPropertiesResource struct { // SQLUserDefinedFunctionGetResults - An Azure Cosmos DB userDefinedFunction. type SQLUserDefinedFunctionGetResults struct { - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -6423,9 +5436,6 @@ type TableCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB Table. Properties *TableCreateUpdateProperties `json:"properties,omitempty"` - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -6474,12 +5484,6 @@ type TableGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB table ID *string `json:"id,omitempty"` - // Enum to indicate the mode of resource creation. - CreateMode *CreateMode `json:"createMode,omitempty"` - - // Parameters to indicate the information about the restore - RestoreParameters *ResourceRestoreParameters `json:"restoreParameters,omitempty"` - // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string `json:"_etag,omitempty" azure:"ro"` @@ -6492,9 +5496,6 @@ type TableGetPropertiesResource struct { // TableGetResults - An Azure Cosmos DB Table. type TableGetResults struct { - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -6528,12 +5529,6 @@ type TableListResult struct { type TableResource struct { // REQUIRED; Name of the Cosmos DB table ID *string `json:"id,omitempty"` - - // Enum to indicate the mode of resource creation. - CreateMode *CreateMode `json:"createMode,omitempty"` - - // Parameters to indicate the information about the restore - RestoreParameters *ResourceRestoreParameters `json:"restoreParameters,omitempty"` } // TableResourcesClientBeginCreateUpdateTableOptions contains the optional parameters for the TableResourcesClient.BeginCreateUpdateTable @@ -6634,9 +5629,6 @@ type ThroughputSettingsGetPropertiesResource struct { // ThroughputSettingsGetResults - An Azure Cosmos DB resource throughput. type ThroughputSettingsGetResults struct { - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` @@ -6681,9 +5673,6 @@ type ThroughputSettingsUpdateParameters struct { // REQUIRED; Properties to update Azure Cosmos DB resource throughput. Properties *ThroughputSettingsUpdateProperties `json:"properties,omitempty"` - // Identity for the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` diff --git a/sdk/resourcemanager/cosmos/armcosmos/models_serde.go b/sdk/resourcemanager/cosmos/armcosmos/models_serde.go index 13cebbfb9e59..919bc879ed2d 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/models_serde.go +++ b/sdk/resourcemanager/cosmos/armcosmos/models_serde.go @@ -83,7 +83,6 @@ func (a *ARMProxyResource) UnmarshalJSON(data []byte) error { func (a ARMResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", a.ID) - populate(objectMap, "identity", a.Identity) populate(objectMap, "location", a.Location) populate(objectMap, "name", a.Name) populate(objectMap, "tags", a.Tags) @@ -103,9 +102,6 @@ func (a *ARMResourceProperties) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &a.Identity) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &a.Location) delete(rawMsg, key) @@ -180,57 +176,6 @@ func (a *AnalyticalStorageConfiguration) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type AuthenticationMethodLdapProperties. -func (a AuthenticationMethodLdapProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "searchBaseDistinguishedName", a.SearchBaseDistinguishedName) - populate(objectMap, "searchFilterTemplate", a.SearchFilterTemplate) - populate(objectMap, "serverCertificates", a.ServerCertificates) - populate(objectMap, "serverHostname", a.ServerHostname) - populate(objectMap, "serverPort", a.ServerPort) - populate(objectMap, "serviceUserDistinguishedName", a.ServiceUserDistinguishedName) - populate(objectMap, "serviceUserPassword", a.ServiceUserPassword) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AuthenticationMethodLdapProperties. -func (a *AuthenticationMethodLdapProperties) 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", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "searchBaseDistinguishedName": - err = unpopulate(val, "SearchBaseDistinguishedName", &a.SearchBaseDistinguishedName) - delete(rawMsg, key) - case "searchFilterTemplate": - err = unpopulate(val, "SearchFilterTemplate", &a.SearchFilterTemplate) - delete(rawMsg, key) - case "serverCertificates": - err = unpopulate(val, "ServerCertificates", &a.ServerCertificates) - delete(rawMsg, key) - case "serverHostname": - err = unpopulate(val, "ServerHostname", &a.ServerHostname) - delete(rawMsg, key) - case "serverPort": - err = unpopulate(val, "ServerPort", &a.ServerPort) - delete(rawMsg, key) - case "serviceUserDistinguishedName": - err = unpopulate(val, "ServiceUserDistinguishedName", &a.ServiceUserDistinguishedName) - delete(rawMsg, key) - case "serviceUserPassword": - err = unpopulate(val, "ServiceUserPassword", &a.ServiceUserPassword) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type AutoUpgradePolicyResource. func (a AutoUpgradePolicyResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -320,41 +265,6 @@ func (a *AutoscaleSettingsResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type AzureBlobDataTransferDataSourceSink. -func (a AzureBlobDataTransferDataSourceSink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["component"] = DataTransferComponentAzureBlobStorage - populate(objectMap, "containerName", a.ContainerName) - populate(objectMap, "endpointUrl", a.EndpointURL) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBlobDataTransferDataSourceSink. -func (a *AzureBlobDataTransferDataSourceSink) 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", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "component": - err = unpopulate(val, "Component", &a.Component) - delete(rawMsg, key) - case "containerName": - err = unpopulate(val, "ContainerName", &a.ContainerName) - delete(rawMsg, key) - case "endpointUrl": - err = unpopulate(val, "EndpointURL", &a.EndpointURL) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type BackupInformation. func (b BackupInformation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -448,72 +358,6 @@ func (b *BackupPolicyMigrationState) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type BackupResource. -func (b BackupResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", b.ID) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackupResource. -func (b *BackupResource) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &b.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &b.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &b.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackupResourceProperties. -func (b BackupResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "timestamp", b.Timestamp) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackupResourceProperties. -func (b *BackupResourceProperties) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "timestamp": - err = unpopulateTimeRFC3339(val, "Timestamp", &b.Timestamp) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type Capability. func (c Capability) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -642,46 +486,10 @@ func (c *CassandraClusterPublicStatusDataCentersItem) UnmarshalJSON(data []byte) return nil } -// MarshalJSON implements the json.Marshaller interface for type CassandraDataTransferDataSourceSink. -func (c CassandraDataTransferDataSourceSink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["component"] = DataTransferComponentCosmosDBCassandra - populate(objectMap, "keyspaceName", c.KeyspaceName) - populate(objectMap, "tableName", c.TableName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CassandraDataTransferDataSourceSink. -func (c *CassandraDataTransferDataSourceSink) 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 "component": - err = unpopulate(val, "Component", &c.Component) - delete(rawMsg, key) - case "keyspaceName": - err = unpopulate(val, "KeyspaceName", &c.KeyspaceName) - delete(rawMsg, key) - case "tableName": - err = unpopulate(val, "TableName", &c.TableName) - 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 CassandraKeyspaceCreateUpdateParameters. func (c CassandraKeyspaceCreateUpdateParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", c.ID) - populate(objectMap, "identity", c.Identity) populate(objectMap, "location", c.Location) populate(objectMap, "name", c.Name) populate(objectMap, "properties", c.Properties) @@ -702,9 +510,6 @@ func (c *CassandraKeyspaceCreateUpdateParameters) UnmarshalJSON(data []byte) err case "id": err = unpopulate(val, "ID", &c.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &c.Identity) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &c.Location) delete(rawMsg, key) @@ -864,7 +669,6 @@ func (c *CassandraKeyspaceGetPropertiesResource) UnmarshalJSON(data []byte) erro func (c CassandraKeyspaceGetResults) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", c.ID) - populate(objectMap, "identity", c.Identity) populate(objectMap, "location", c.Location) populate(objectMap, "name", c.Name) populate(objectMap, "properties", c.Properties) @@ -885,9 +689,6 @@ func (c *CassandraKeyspaceGetResults) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &c.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &c.Identity) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &c.Location) delete(rawMsg, key) @@ -1031,7 +832,6 @@ func (c *CassandraSchema) UnmarshalJSON(data []byte) error { func (c CassandraTableCreateUpdateParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", c.ID) - populate(objectMap, "identity", c.Identity) populate(objectMap, "location", c.Location) populate(objectMap, "name", c.Name) populate(objectMap, "properties", c.Properties) @@ -1052,9 +852,6 @@ func (c *CassandraTableCreateUpdateParameters) UnmarshalJSON(data []byte) error case "id": err = unpopulate(val, "ID", &c.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &c.Identity) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &c.Location) delete(rawMsg, key) @@ -1226,7 +1023,6 @@ func (c *CassandraTableGetPropertiesResource) UnmarshalJSON(data []byte) error { func (c CassandraTableGetResults) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", c.ID) - populate(objectMap, "identity", c.Identity) populate(objectMap, "location", c.Location) populate(objectMap, "name", c.Name) populate(objectMap, "properties", c.Properties) @@ -1247,9 +1043,6 @@ func (c *CassandraTableGetResults) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &c.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &c.Identity) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &c.Location) delete(rawMsg, key) @@ -1339,21 +1132,15 @@ func (c *CassandraTableResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CassandraViewCreateUpdateParameters. -func (c CassandraViewCreateUpdateParameters) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Certificate. +func (c Certificate) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", c.ID) - populate(objectMap, "identity", c.Identity) - populate(objectMap, "location", c.Location) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "tags", c.Tags) - populate(objectMap, "type", c.Type) + populate(objectMap, "pem", c.Pem) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type CassandraViewCreateUpdateParameters. -func (c *CassandraViewCreateUpdateParameters) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Certificate. +func (c *Certificate) 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) @@ -1361,26 +1148,47 @@ func (c *CassandraViewCreateUpdateParameters) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &c.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &c.Location) + case "pem": + err = unpopulate(val, "Pem", &c.Pem) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClientEncryptionIncludedPath. +func (c ClientEncryptionIncludedPath) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientEncryptionKeyId", c.ClientEncryptionKeyID) + populate(objectMap, "encryptionAlgorithm", c.EncryptionAlgorithm) + populate(objectMap, "encryptionType", c.EncryptionType) + populate(objectMap, "path", c.Path) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionIncludedPath. +func (c *ClientEncryptionIncludedPath) 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 "clientEncryptionKeyId": + err = unpopulate(val, "ClientEncryptionKeyID", &c.ClientEncryptionKeyID) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) + case "encryptionAlgorithm": + err = unpopulate(val, "EncryptionAlgorithm", &c.EncryptionAlgorithm) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &c.Tags) + case "encryptionType": + err = unpopulate(val, "EncryptionType", &c.EncryptionType) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) + case "path": + err = unpopulate(val, "Path", &c.Path) delete(rawMsg, key) } if err != nil { @@ -1390,16 +1198,15 @@ func (c *CassandraViewCreateUpdateParameters) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CassandraViewCreateUpdateProperties. -func (c CassandraViewCreateUpdateProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ClientEncryptionKeyCreateUpdateParameters. +func (c ClientEncryptionKeyCreateUpdateParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "options", c.Options) - populate(objectMap, "resource", c.Resource) + populate(objectMap, "properties", c.Properties) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type CassandraViewCreateUpdateProperties. -func (c *CassandraViewCreateUpdateProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionKeyCreateUpdateParameters. +func (c *ClientEncryptionKeyCreateUpdateParameters) 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) @@ -1407,11 +1214,8 @@ func (c *CassandraViewCreateUpdateProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "options": - err = unpopulate(val, "Options", &c.Options) - delete(rawMsg, key) - case "resource": - err = unpopulate(val, "Resource", &c.Resource) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) delete(rawMsg, key) } if err != nil { @@ -1421,16 +1225,15 @@ func (c *CassandraViewCreateUpdateProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CassandraViewGetProperties. -func (c CassandraViewGetProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ClientEncryptionKeyCreateUpdateProperties. +func (c ClientEncryptionKeyCreateUpdateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "options", c.Options) populate(objectMap, "resource", c.Resource) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type CassandraViewGetProperties. -func (c *CassandraViewGetProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionKeyCreateUpdateProperties. +func (c *ClientEncryptionKeyCreateUpdateProperties) 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) @@ -1438,9 +1241,6 @@ func (c *CassandraViewGetProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "options": - err = unpopulate(val, "Options", &c.Options) - delete(rawMsg, key) case "resource": err = unpopulate(val, "Resource", &c.Resource) delete(rawMsg, key) @@ -1452,16 +1252,15 @@ func (c *CassandraViewGetProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CassandraViewGetPropertiesOptions. -func (c CassandraViewGetPropertiesOptions) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ClientEncryptionKeyGetProperties. +func (c ClientEncryptionKeyGetProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "autoscaleSettings", c.AutoscaleSettings) - populate(objectMap, "throughput", c.Throughput) + populate(objectMap, "resource", c.Resource) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type CassandraViewGetPropertiesOptions. -func (c *CassandraViewGetPropertiesOptions) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionKeyGetProperties. +func (c *ClientEncryptionKeyGetProperties) 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) @@ -1469,11 +1268,8 @@ func (c *CassandraViewGetPropertiesOptions) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "autoscaleSettings": - err = unpopulate(val, "AutoscaleSettings", &c.AutoscaleSettings) - delete(rawMsg, key) - case "throughput": - err = unpopulate(val, "Throughput", &c.Throughput) + case "resource": + err = unpopulate(val, "Resource", &c.Resource) delete(rawMsg, key) } if err != nil { @@ -1483,19 +1279,21 @@ func (c *CassandraViewGetPropertiesOptions) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CassandraViewGetPropertiesResource. -func (c CassandraViewGetPropertiesResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ClientEncryptionKeyGetPropertiesResource. +func (c ClientEncryptionKeyGetPropertiesResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "encryptionAlgorithm", c.EncryptionAlgorithm) populate(objectMap, "_etag", c.Etag) populate(objectMap, "id", c.ID) + populate(objectMap, "keyWrapMetadata", c.KeyWrapMetadata) populate(objectMap, "_rid", c.Rid) populate(objectMap, "_ts", c.Ts) - populate(objectMap, "viewDefinition", c.ViewDefinition) + populateByteArray(objectMap, "wrappedDataEncryptionKey", c.WrappedDataEncryptionKey, runtime.Base64StdFormat) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type CassandraViewGetPropertiesResource. -func (c *CassandraViewGetPropertiesResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionKeyGetPropertiesResource. +func (c *ClientEncryptionKeyGetPropertiesResource) 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) @@ -1503,20 +1301,26 @@ func (c *CassandraViewGetPropertiesResource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "encryptionAlgorithm": + err = unpopulate(val, "EncryptionAlgorithm", &c.EncryptionAlgorithm) + delete(rawMsg, key) case "_etag": err = unpopulate(val, "Etag", &c.Etag) delete(rawMsg, key) case "id": err = unpopulate(val, "ID", &c.ID) delete(rawMsg, key) + case "keyWrapMetadata": + err = unpopulate(val, "KeyWrapMetadata", &c.KeyWrapMetadata) + delete(rawMsg, key) case "_rid": err = unpopulate(val, "Rid", &c.Rid) delete(rawMsg, key) case "_ts": err = unpopulate(val, "Ts", &c.Ts) delete(rawMsg, key) - case "viewDefinition": - err = unpopulate(val, "ViewDefinition", &c.ViewDefinition) + case "wrappedDataEncryptionKey": + err = runtime.DecodeByteArray(string(val), &c.WrappedDataEncryptionKey, runtime.Base64StdFormat) delete(rawMsg, key) } if err != nil { @@ -1526,21 +1330,18 @@ func (c *CassandraViewGetPropertiesResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CassandraViewGetResults. -func (c CassandraViewGetResults) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ClientEncryptionKeyGetResults. +func (c ClientEncryptionKeyGetResults) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", c.ID) - populate(objectMap, "identity", c.Identity) - populate(objectMap, "location", c.Location) populate(objectMap, "name", c.Name) populate(objectMap, "properties", c.Properties) - populate(objectMap, "tags", c.Tags) populate(objectMap, "type", c.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type CassandraViewGetResults. -func (c *CassandraViewGetResults) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionKeyGetResults. +func (c *ClientEncryptionKeyGetResults) 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) @@ -1551,21 +1352,12 @@ func (c *CassandraViewGetResults) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &c.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &c.Identity) - 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 "tags": - err = unpopulate(val, "Tags", &c.Tags) - delete(rawMsg, key) case "type": err = unpopulate(val, "Type", &c.Type) delete(rawMsg, key) @@ -1577,15 +1369,18 @@ func (c *CassandraViewGetResults) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CassandraViewListResult. -func (c CassandraViewListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ClientEncryptionKeyResource. +func (c ClientEncryptionKeyResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", c.Value) + populate(objectMap, "encryptionAlgorithm", c.EncryptionAlgorithm) + populate(objectMap, "id", c.ID) + populate(objectMap, "keyWrapMetadata", c.KeyWrapMetadata) + populateByteArray(objectMap, "wrappedDataEncryptionKey", c.WrappedDataEncryptionKey, runtime.Base64StdFormat) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type CassandraViewListResult. -func (c *CassandraViewListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionKeyResource. +func (c *ClientEncryptionKeyResource) 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) @@ -1593,8 +1388,17 @@ func (c *CassandraViewListResult) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &c.Value) + case "encryptionAlgorithm": + err = unpopulate(val, "EncryptionAlgorithm", &c.EncryptionAlgorithm) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "keyWrapMetadata": + err = unpopulate(val, "KeyWrapMetadata", &c.KeyWrapMetadata) + delete(rawMsg, key) + case "wrappedDataEncryptionKey": + err = runtime.DecodeByteArray(string(val), &c.WrappedDataEncryptionKey, runtime.Base64StdFormat) delete(rawMsg, key) } if err != nil { @@ -1604,16 +1408,15 @@ func (c *CassandraViewListResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CassandraViewResource. -func (c CassandraViewResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ClientEncryptionKeysListResult. +func (c ClientEncryptionKeysListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", c.ID) - populate(objectMap, "viewDefinition", c.ViewDefinition) + populate(objectMap, "value", c.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type CassandraViewResource. -func (c *CassandraViewResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionKeysListResult. +func (c *ClientEncryptionKeysListResult) 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) @@ -1621,11 +1424,8 @@ func (c *CassandraViewResource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "viewDefinition": - err = unpopulate(val, "ViewDefinition", &c.ViewDefinition) + case "value": + err = unpopulate(val, "Value", &c.Value) delete(rawMsg, key) } if err != nil { @@ -1635,15 +1435,16 @@ func (c *CassandraViewResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type Certificate. -func (c Certificate) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ClientEncryptionPolicy. +func (c ClientEncryptionPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "pem", c.Pem) + populate(objectMap, "includedPaths", c.IncludedPaths) + populate(objectMap, "policyFormatVersion", c.PolicyFormatVersion) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Certificate. -func (c *Certificate) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionPolicy. +func (c *ClientEncryptionPolicy) 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) @@ -1651,8 +1452,11 @@ func (c *Certificate) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "pem": - err = unpopulate(val, "Pem", &c.Pem) + case "includedPaths": + err = unpopulate(val, "IncludedPaths", &c.IncludedPaths) + delete(rawMsg, key) + case "policyFormatVersion": + err = unpopulate(val, "PolicyFormatVersion", &c.PolicyFormatVersion) delete(rawMsg, key) } if err != nil { @@ -1662,18 +1466,16 @@ func (c *Certificate) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ClientEncryptionIncludedPath. -func (c ClientEncryptionIncludedPath) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ClusterKey. +func (c ClusterKey) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "clientEncryptionKeyId", c.ClientEncryptionKeyID) - populate(objectMap, "encryptionAlgorithm", c.EncryptionAlgorithm) - populate(objectMap, "encryptionType", c.EncryptionType) - populate(objectMap, "path", c.Path) + populate(objectMap, "name", c.Name) + populate(objectMap, "orderBy", c.OrderBy) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionIncludedPath. -func (c *ClientEncryptionIncludedPath) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterKey. +func (c *ClusterKey) 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) @@ -1681,17 +1483,11 @@ func (c *ClientEncryptionIncludedPath) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "clientEncryptionKeyId": - err = unpopulate(val, "ClientEncryptionKeyID", &c.ClientEncryptionKeyID) - delete(rawMsg, key) - case "encryptionAlgorithm": - err = unpopulate(val, "EncryptionAlgorithm", &c.EncryptionAlgorithm) - delete(rawMsg, key) - case "encryptionType": - err = unpopulate(val, "EncryptionType", &c.EncryptionType) + case "name": + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) - case "path": - err = unpopulate(val, "Path", &c.Path) + case "orderBy": + err = unpopulate(val, "OrderBy", &c.OrderBy) delete(rawMsg, key) } if err != nil { @@ -1701,15 +1497,21 @@ func (c *ClientEncryptionIncludedPath) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ClientEncryptionKeyCreateUpdateParameters. -func (c ClientEncryptionKeyCreateUpdateParameters) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ClusterResource. +func (c ClusterResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "identity", c.Identity) + populate(objectMap, "location", c.Location) + populate(objectMap, "name", c.Name) populate(objectMap, "properties", c.Properties) + populate(objectMap, "tags", c.Tags) + populate(objectMap, "type", c.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionKeyCreateUpdateParameters. -func (c *ClientEncryptionKeyCreateUpdateParameters) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterResource. +func (c *ClusterResource) 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) @@ -1717,9 +1519,27 @@ func (c *ClientEncryptionKeyCreateUpdateParameters) UnmarshalJSON(data []byte) e for key, val := range rawMsg { var err error switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &c.Identity) + 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 "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) @@ -1728,15 +1548,31 @@ func (c *ClientEncryptionKeyCreateUpdateParameters) UnmarshalJSON(data []byte) e return nil } -// MarshalJSON implements the json.Marshaller interface for type ClientEncryptionKeyCreateUpdateProperties. -func (c ClientEncryptionKeyCreateUpdateProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ClusterResourceProperties. +func (c ClusterResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "resource", c.Resource) + populate(objectMap, "authenticationMethod", c.AuthenticationMethod) + populate(objectMap, "cassandraAuditLoggingEnabled", c.CassandraAuditLoggingEnabled) + populate(objectMap, "cassandraVersion", c.CassandraVersion) + populate(objectMap, "clientCertificates", c.ClientCertificates) + populate(objectMap, "clusterNameOverride", c.ClusterNameOverride) + populate(objectMap, "deallocated", c.Deallocated) + populate(objectMap, "delegatedManagementSubnetId", c.DelegatedManagementSubnetID) + populate(objectMap, "externalGossipCertificates", c.ExternalGossipCertificates) + populate(objectMap, "externalSeedNodes", c.ExternalSeedNodes) + populate(objectMap, "gossipCertificates", c.GossipCertificates) + populate(objectMap, "hoursBetweenBackups", c.HoursBetweenBackups) + populate(objectMap, "initialCassandraAdminPassword", c.InitialCassandraAdminPassword) + populate(objectMap, "prometheusEndpoint", c.PrometheusEndpoint) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "repairEnabled", c.RepairEnabled) + populate(objectMap, "restoreFromBackupId", c.RestoreFromBackupID) + populate(objectMap, "seedNodes", c.SeedNodes) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionKeyCreateUpdateProperties. -func (c *ClientEncryptionKeyCreateUpdateProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterResourceProperties. +func (c *ClusterResourceProperties) 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) @@ -1744,8 +1580,56 @@ func (c *ClientEncryptionKeyCreateUpdateProperties) UnmarshalJSON(data []byte) e for key, val := range rawMsg { var err error switch key { - case "resource": - err = unpopulate(val, "Resource", &c.Resource) + case "authenticationMethod": + err = unpopulate(val, "AuthenticationMethod", &c.AuthenticationMethod) + delete(rawMsg, key) + case "cassandraAuditLoggingEnabled": + err = unpopulate(val, "CassandraAuditLoggingEnabled", &c.CassandraAuditLoggingEnabled) + delete(rawMsg, key) + case "cassandraVersion": + err = unpopulate(val, "CassandraVersion", &c.CassandraVersion) + delete(rawMsg, key) + case "clientCertificates": + err = unpopulate(val, "ClientCertificates", &c.ClientCertificates) + delete(rawMsg, key) + case "clusterNameOverride": + err = unpopulate(val, "ClusterNameOverride", &c.ClusterNameOverride) + delete(rawMsg, key) + case "deallocated": + err = unpopulate(val, "Deallocated", &c.Deallocated) + delete(rawMsg, key) + case "delegatedManagementSubnetId": + err = unpopulate(val, "DelegatedManagementSubnetID", &c.DelegatedManagementSubnetID) + delete(rawMsg, key) + case "externalGossipCertificates": + err = unpopulate(val, "ExternalGossipCertificates", &c.ExternalGossipCertificates) + delete(rawMsg, key) + case "externalSeedNodes": + err = unpopulate(val, "ExternalSeedNodes", &c.ExternalSeedNodes) + delete(rawMsg, key) + case "gossipCertificates": + err = unpopulate(val, "GossipCertificates", &c.GossipCertificates) + delete(rawMsg, key) + case "hoursBetweenBackups": + err = unpopulate(val, "HoursBetweenBackups", &c.HoursBetweenBackups) + delete(rawMsg, key) + case "initialCassandraAdminPassword": + err = unpopulate(val, "InitialCassandraAdminPassword", &c.InitialCassandraAdminPassword) + delete(rawMsg, key) + case "prometheusEndpoint": + err = unpopulate(val, "PrometheusEndpoint", &c.PrometheusEndpoint) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "repairEnabled": + err = unpopulate(val, "RepairEnabled", &c.RepairEnabled) + delete(rawMsg, key) + case "restoreFromBackupId": + err = unpopulate(val, "RestoreFromBackupID", &c.RestoreFromBackupID) + delete(rawMsg, key) + case "seedNodes": + err = unpopulate(val, "SeedNodes", &c.SeedNodes) delete(rawMsg, key) } if err != nil { @@ -1755,15 +1639,16 @@ func (c *ClientEncryptionKeyCreateUpdateProperties) UnmarshalJSON(data []byte) e return nil } -// MarshalJSON implements the json.Marshaller interface for type ClientEncryptionKeyGetProperties. -func (c ClientEncryptionKeyGetProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Column. +func (c Column) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "resource", c.Resource) + populate(objectMap, "name", c.Name) + populate(objectMap, "type", c.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionKeyGetProperties. -func (c *ClientEncryptionKeyGetProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Column. +func (c *Column) 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) @@ -1771,8 +1656,11 @@ func (c *ClientEncryptionKeyGetProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "resource": - err = unpopulate(val, "Resource", &c.Resource) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) delete(rawMsg, key) } if err != nil { @@ -1782,21 +1670,15 @@ func (c *ClientEncryptionKeyGetProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ClientEncryptionKeyGetPropertiesResource. -func (c ClientEncryptionKeyGetPropertiesResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CommandOutput. +func (c CommandOutput) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "encryptionAlgorithm", c.EncryptionAlgorithm) - populate(objectMap, "_etag", c.Etag) - populate(objectMap, "id", c.ID) - populate(objectMap, "keyWrapMetadata", c.KeyWrapMetadata) - populate(objectMap, "_rid", c.Rid) - populate(objectMap, "_ts", c.Ts) - populateByteArray(objectMap, "wrappedDataEncryptionKey", c.WrappedDataEncryptionKey, runtime.Base64StdFormat) + populate(objectMap, "commandOutput", c.CommandOutput) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionKeyGetPropertiesResource. -func (c *ClientEncryptionKeyGetPropertiesResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CommandOutput. +func (c *CommandOutput) 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) @@ -1804,26 +1686,8 @@ func (c *ClientEncryptionKeyGetPropertiesResource) UnmarshalJSON(data []byte) er for key, val := range rawMsg { var err error switch key { - case "encryptionAlgorithm": - err = unpopulate(val, "EncryptionAlgorithm", &c.EncryptionAlgorithm) - delete(rawMsg, key) - case "_etag": - err = unpopulate(val, "Etag", &c.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "keyWrapMetadata": - err = unpopulate(val, "KeyWrapMetadata", &c.KeyWrapMetadata) - delete(rawMsg, key) - case "_rid": - err = unpopulate(val, "Rid", &c.Rid) - delete(rawMsg, key) - case "_ts": - err = unpopulate(val, "Ts", &c.Ts) - delete(rawMsg, key) - case "wrappedDataEncryptionKey": - err = runtime.DecodeByteArray(string(val), &c.WrappedDataEncryptionKey, runtime.Base64StdFormat) + case "commandOutput": + err = unpopulate(val, "CommandOutput", &c.CommandOutput) delete(rawMsg, key) } if err != nil { @@ -1833,18 +1697,19 @@ func (c *ClientEncryptionKeyGetPropertiesResource) UnmarshalJSON(data []byte) er return nil } -// MarshalJSON implements the json.Marshaller interface for type ClientEncryptionKeyGetResults. -func (c ClientEncryptionKeyGetResults) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CommandPostBody. +func (c CommandPostBody) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", c.ID) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "type", c.Type) + populate(objectMap, "arguments", c.Arguments) + populate(objectMap, "cassandra-stop-start", c.CassandraStopStart) + populate(objectMap, "command", c.Command) + populate(objectMap, "host", c.Host) + populate(objectMap, "readwrite", c.Readwrite) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionKeyGetResults. -func (c *ClientEncryptionKeyGetResults) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CommandPostBody. +func (c *CommandPostBody) 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) @@ -1852,17 +1717,20 @@ func (c *ClientEncryptionKeyGetResults) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &c.ID) + case "arguments": + err = unpopulate(val, "Arguments", &c.Arguments) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) + case "cassandra-stop-start": + err = unpopulate(val, "CassandraStopStart", &c.CassandraStopStart) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) + case "command": + err = unpopulate(val, "Command", &c.Command) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) + case "host": + err = unpopulate(val, "Host", &c.Host) + delete(rawMsg, key) + case "readwrite": + err = unpopulate(val, "Readwrite", &c.Readwrite) delete(rawMsg, key) } if err != nil { @@ -1872,18 +1740,16 @@ func (c *ClientEncryptionKeyGetResults) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ClientEncryptionKeyResource. -func (c ClientEncryptionKeyResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. +func (c Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "encryptionAlgorithm", c.EncryptionAlgorithm) - populate(objectMap, "id", c.ID) - populate(objectMap, "keyWrapMetadata", c.KeyWrapMetadata) - populateByteArray(objectMap, "wrappedDataEncryptionKey", c.WrappedDataEncryptionKey, runtime.Base64StdFormat) + populate(objectMap, "clientId", c.ClientID) + populate(objectMap, "principalId", c.PrincipalID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionKeyResource. -func (c *ClientEncryptionKeyResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. +func (c *Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties) 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) @@ -1891,17 +1757,11 @@ func (c *ClientEncryptionKeyResource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "encryptionAlgorithm": - err = unpopulate(val, "EncryptionAlgorithm", &c.EncryptionAlgorithm) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "keyWrapMetadata": - err = unpopulate(val, "KeyWrapMetadata", &c.KeyWrapMetadata) + case "clientId": + err = unpopulate(val, "ClientID", &c.ClientID) delete(rawMsg, key) - case "wrappedDataEncryptionKey": - err = runtime.DecodeByteArray(string(val), &c.WrappedDataEncryptionKey, runtime.Base64StdFormat) + case "principalId": + err = unpopulate(val, "PrincipalID", &c.PrincipalID) delete(rawMsg, key) } if err != nil { @@ -1911,15 +1771,30 @@ func (c *ClientEncryptionKeyResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ClientEncryptionKeysListResult. -func (c ClientEncryptionKeysListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems. +func (c ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", c.Value) + populate(objectMap, "address", c.Address) + populate(objectMap, "cpuUsage", c.CPUUsage) + populate(objectMap, "diskFreeKB", c.DiskFreeKB) + populate(objectMap, "diskUsedKB", c.DiskUsedKB) + populate(objectMap, "hostID", c.HostID) + populate(objectMap, "load", c.Load) + populate(objectMap, "memoryBuffersAndCachedKB", c.MemoryBuffersAndCachedKB) + populate(objectMap, "memoryFreeKB", c.MemoryFreeKB) + populate(objectMap, "memoryTotalKB", c.MemoryTotalKB) + populate(objectMap, "memoryUsedKB", c.MemoryUsedKB) + populate(objectMap, "rack", c.Rack) + populate(objectMap, "size", c.Size) + populate(objectMap, "state", c.State) + populate(objectMap, "status", c.Status) + populate(objectMap, "timestamp", c.Timestamp) + populate(objectMap, "tokens", c.Tokens) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionKeysListResult. -func (c *ClientEncryptionKeysListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems. +func (c *ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems) 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) @@ -1927,8 +1802,53 @@ func (c *ClientEncryptionKeysListResult) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &c.Value) + case "address": + err = unpopulate(val, "Address", &c.Address) + delete(rawMsg, key) + case "cpuUsage": + err = unpopulate(val, "CPUUsage", &c.CPUUsage) + delete(rawMsg, key) + case "diskFreeKB": + err = unpopulate(val, "DiskFreeKB", &c.DiskFreeKB) + delete(rawMsg, key) + case "diskUsedKB": + err = unpopulate(val, "DiskUsedKB", &c.DiskUsedKB) + delete(rawMsg, key) + case "hostID": + err = unpopulate(val, "HostID", &c.HostID) + delete(rawMsg, key) + case "load": + err = unpopulate(val, "Load", &c.Load) + delete(rawMsg, key) + case "memoryBuffersAndCachedKB": + err = unpopulate(val, "MemoryBuffersAndCachedKB", &c.MemoryBuffersAndCachedKB) + delete(rawMsg, key) + case "memoryFreeKB": + err = unpopulate(val, "MemoryFreeKB", &c.MemoryFreeKB) + delete(rawMsg, key) + case "memoryTotalKB": + err = unpopulate(val, "MemoryTotalKB", &c.MemoryTotalKB) + delete(rawMsg, key) + case "memoryUsedKB": + err = unpopulate(val, "MemoryUsedKB", &c.MemoryUsedKB) + delete(rawMsg, key) + case "rack": + err = unpopulate(val, "Rack", &c.Rack) + delete(rawMsg, key) + case "size": + err = unpopulate(val, "Size", &c.Size) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &c.State) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &c.Status) + delete(rawMsg, key) + case "timestamp": + err = unpopulate(val, "Timestamp", &c.Timestamp) + delete(rawMsg, key) + case "tokens": + err = unpopulate(val, "Tokens", &c.Tokens) delete(rawMsg, key) } if err != nil { @@ -1938,16 +1858,16 @@ func (c *ClientEncryptionKeysListResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ClientEncryptionPolicy. -func (c ClientEncryptionPolicy) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CompositePath. +func (c CompositePath) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "includedPaths", c.IncludedPaths) - populate(objectMap, "policyFormatVersion", c.PolicyFormatVersion) + populate(objectMap, "order", c.Order) + populate(objectMap, "path", c.Path) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionPolicy. -func (c *ClientEncryptionPolicy) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CompositePath. +func (c *CompositePath) 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) @@ -1955,11 +1875,11 @@ func (c *ClientEncryptionPolicy) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "includedPaths": - err = unpopulate(val, "IncludedPaths", &c.IncludedPaths) + case "order": + err = unpopulate(val, "Order", &c.Order) delete(rawMsg, key) - case "policyFormatVersion": - err = unpopulate(val, "PolicyFormatVersion", &c.PolicyFormatVersion) + case "path": + err = unpopulate(val, "Path", &c.Path) delete(rawMsg, key) } if err != nil { @@ -1969,16 +1889,17 @@ func (c *ClientEncryptionPolicy) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ClusterKey. -func (c ClusterKey) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConflictResolutionPolicy. +func (c ConflictResolutionPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "name", c.Name) - populate(objectMap, "orderBy", c.OrderBy) + populate(objectMap, "conflictResolutionPath", c.ConflictResolutionPath) + populate(objectMap, "conflictResolutionProcedure", c.ConflictResolutionProcedure) + populate(objectMap, "mode", c.Mode) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterKey. -func (c *ClusterKey) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConflictResolutionPolicy. +func (c *ConflictResolutionPolicy) 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) @@ -1986,11 +1907,14 @@ func (c *ClusterKey) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "name": - err = unpopulate(val, "Name", &c.Name) + case "conflictResolutionPath": + err = unpopulate(val, "ConflictResolutionPath", &c.ConflictResolutionPath) delete(rawMsg, key) - case "orderBy": - err = unpopulate(val, "OrderBy", &c.OrderBy) + case "conflictResolutionProcedure": + err = unpopulate(val, "ConflictResolutionProcedure", &c.ConflictResolutionProcedure) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &c.Mode) delete(rawMsg, key) } if err != nil { @@ -2000,21 +1924,19 @@ func (c *ClusterKey) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ClusterResource. -func (c ClusterResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConnectionError. +func (c ConnectionError) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", c.ID) - populate(objectMap, "identity", c.Identity) - populate(objectMap, "location", c.Location) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "tags", c.Tags) - populate(objectMap, "type", c.Type) + populate(objectMap, "connectionState", c.ConnectionState) + populate(objectMap, "exception", c.Exception) + populate(objectMap, "iPFrom", c.IPFrom) + populate(objectMap, "iPTo", c.IPTo) + populate(objectMap, "port", c.Port) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterResource. -func (c *ClusterResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionError. +func (c *ConnectionError) 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) @@ -2022,26 +1944,20 @@ func (c *ClusterResource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &c.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &c.Location) + case "connectionState": + err = unpopulate(val, "ConnectionState", &c.ConnectionState) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) + case "exception": + err = unpopulate(val, "Exception", &c.Exception) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) + case "iPFrom": + err = unpopulate(val, "IPFrom", &c.IPFrom) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &c.Tags) + case "iPTo": + err = unpopulate(val, "IPTo", &c.IPTo) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) + case "port": + err = unpopulate(val, "Port", &c.Port) delete(rawMsg, key) } if err != nil { @@ -2051,31 +1967,17 @@ func (c *ClusterResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ClusterResourceProperties. -func (c ClusterResourceProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConsistencyPolicy. +func (c ConsistencyPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "authenticationMethod", c.AuthenticationMethod) - populate(objectMap, "cassandraAuditLoggingEnabled", c.CassandraAuditLoggingEnabled) - populate(objectMap, "cassandraVersion", c.CassandraVersion) - populate(objectMap, "clientCertificates", c.ClientCertificates) - populate(objectMap, "clusterNameOverride", c.ClusterNameOverride) - populate(objectMap, "deallocated", c.Deallocated) - populate(objectMap, "delegatedManagementSubnetId", c.DelegatedManagementSubnetID) - populate(objectMap, "externalGossipCertificates", c.ExternalGossipCertificates) - populate(objectMap, "externalSeedNodes", c.ExternalSeedNodes) - populate(objectMap, "gossipCertificates", c.GossipCertificates) - populate(objectMap, "hoursBetweenBackups", c.HoursBetweenBackups) - populate(objectMap, "initialCassandraAdminPassword", c.InitialCassandraAdminPassword) - populate(objectMap, "prometheusEndpoint", c.PrometheusEndpoint) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "repairEnabled", c.RepairEnabled) - populate(objectMap, "restoreFromBackupId", c.RestoreFromBackupID) - populate(objectMap, "seedNodes", c.SeedNodes) + populate(objectMap, "defaultConsistencyLevel", c.DefaultConsistencyLevel) + populate(objectMap, "maxIntervalInSeconds", c.MaxIntervalInSeconds) + populate(objectMap, "maxStalenessPrefix", c.MaxStalenessPrefix) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterResourceProperties. -func (c *ClusterResourceProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConsistencyPolicy. +func (c *ConsistencyPolicy) 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) @@ -2083,56 +1985,14 @@ func (c *ClusterResourceProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "authenticationMethod": - err = unpopulate(val, "AuthenticationMethod", &c.AuthenticationMethod) - delete(rawMsg, key) - case "cassandraAuditLoggingEnabled": - err = unpopulate(val, "CassandraAuditLoggingEnabled", &c.CassandraAuditLoggingEnabled) - delete(rawMsg, key) - case "cassandraVersion": - err = unpopulate(val, "CassandraVersion", &c.CassandraVersion) - delete(rawMsg, key) - case "clientCertificates": - err = unpopulate(val, "ClientCertificates", &c.ClientCertificates) - delete(rawMsg, key) - case "clusterNameOverride": - err = unpopulate(val, "ClusterNameOverride", &c.ClusterNameOverride) - delete(rawMsg, key) - case "deallocated": - err = unpopulate(val, "Deallocated", &c.Deallocated) - delete(rawMsg, key) - case "delegatedManagementSubnetId": - err = unpopulate(val, "DelegatedManagementSubnetID", &c.DelegatedManagementSubnetID) - delete(rawMsg, key) - case "externalGossipCertificates": - err = unpopulate(val, "ExternalGossipCertificates", &c.ExternalGossipCertificates) - delete(rawMsg, key) - case "externalSeedNodes": - err = unpopulate(val, "ExternalSeedNodes", &c.ExternalSeedNodes) - delete(rawMsg, key) - case "gossipCertificates": - err = unpopulate(val, "GossipCertificates", &c.GossipCertificates) - delete(rawMsg, key) - case "hoursBetweenBackups": - err = unpopulate(val, "HoursBetweenBackups", &c.HoursBetweenBackups) - delete(rawMsg, key) - case "initialCassandraAdminPassword": - err = unpopulate(val, "InitialCassandraAdminPassword", &c.InitialCassandraAdminPassword) - delete(rawMsg, key) - case "prometheusEndpoint": - err = unpopulate(val, "PrometheusEndpoint", &c.PrometheusEndpoint) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - case "repairEnabled": - err = unpopulate(val, "RepairEnabled", &c.RepairEnabled) + case "defaultConsistencyLevel": + err = unpopulate(val, "DefaultConsistencyLevel", &c.DefaultConsistencyLevel) delete(rawMsg, key) - case "restoreFromBackupId": - err = unpopulate(val, "RestoreFromBackupID", &c.RestoreFromBackupID) + case "maxIntervalInSeconds": + err = unpopulate(val, "MaxIntervalInSeconds", &c.MaxIntervalInSeconds) delete(rawMsg, key) - case "seedNodes": - err = unpopulate(val, "SeedNodes", &c.SeedNodes) + case "maxStalenessPrefix": + err = unpopulate(val, "MaxStalenessPrefix", &c.MaxStalenessPrefix) delete(rawMsg, key) } if err != nil { @@ -2142,16 +2002,18 @@ func (c *ClusterResourceProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type Column. -func (c Column) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContainerPartitionKey. +func (c ContainerPartitionKey) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "name", c.Name) - populate(objectMap, "type", c.Type) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "paths", c.Paths) + populate(objectMap, "systemKey", c.SystemKey) + populate(objectMap, "version", c.Version) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Column. -func (c *Column) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerPartitionKey. +func (c *ContainerPartitionKey) 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) @@ -2159,11 +2021,17 @@ func (c *Column) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "name": - err = unpopulate(val, "Name", &c.Name) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) + case "paths": + err = unpopulate(val, "Paths", &c.Paths) + delete(rawMsg, key) + case "systemKey": + err = unpopulate(val, "SystemKey", &c.SystemKey) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &c.Version) delete(rawMsg, key) } if err != nil { @@ -2173,15 +2041,15 @@ func (c *Column) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CommandOutput. -func (c CommandOutput) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContinuousBackupInformation. +func (c ContinuousBackupInformation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "commandOutput", c.CommandOutput) + populate(objectMap, "latestRestorableTimestamp", c.LatestRestorableTimestamp) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type CommandOutput. -func (c *CommandOutput) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContinuousBackupInformation. +func (c *ContinuousBackupInformation) 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) @@ -2189,8 +2057,8 @@ func (c *CommandOutput) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "commandOutput": - err = unpopulate(val, "CommandOutput", &c.CommandOutput) + case "latestRestorableTimestamp": + err = unpopulate(val, "LatestRestorableTimestamp", &c.LatestRestorableTimestamp) delete(rawMsg, key) } if err != nil { @@ -2200,19 +2068,15 @@ func (c *CommandOutput) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CommandPostBody. -func (c CommandPostBody) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContinuousBackupRestoreLocation. +func (c ContinuousBackupRestoreLocation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "arguments", c.Arguments) - populate(objectMap, "cassandra-stop-start", c.CassandraStopStart) - populate(objectMap, "command", c.Command) - populate(objectMap, "host", c.Host) - populate(objectMap, "readwrite", c.Readwrite) + populate(objectMap, "location", c.Location) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type CommandPostBody. -func (c *CommandPostBody) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContinuousBackupRestoreLocation. +func (c *ContinuousBackupRestoreLocation) 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) @@ -2220,20 +2084,8 @@ func (c *CommandPostBody) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "arguments": - err = unpopulate(val, "Arguments", &c.Arguments) - delete(rawMsg, key) - case "cassandra-stop-start": - err = unpopulate(val, "CassandraStopStart", &c.CassandraStopStart) - delete(rawMsg, key) - case "command": - err = unpopulate(val, "Command", &c.Command) - delete(rawMsg, key) - case "host": - err = unpopulate(val, "Host", &c.Host) - delete(rawMsg, key) - case "readwrite": - err = unpopulate(val, "Readwrite", &c.Readwrite) + case "location": + err = unpopulate(val, "Location", &c.Location) delete(rawMsg, key) } if err != nil { @@ -2243,16 +2095,16 @@ func (c *CommandPostBody) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. -func (c Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContinuousModeBackupPolicy. +func (c ContinuousModeBackupPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "clientId", c.ClientID) - populate(objectMap, "principalId", c.PrincipalID) + populate(objectMap, "migrationState", c.MigrationState) + objectMap["type"] = BackupPolicyTypeContinuous return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. -func (c *Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContinuousModeBackupPolicy. +func (c *ContinuousModeBackupPolicy) 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) @@ -2260,11 +2112,11 @@ func (c *Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedide for key, val := range rawMsg { var err error switch key { - case "clientId": - err = unpopulate(val, "ClientID", &c.ClientID) + case "migrationState": + err = unpopulate(val, "MigrationState", &c.MigrationState) delete(rawMsg, key) - case "principalId": - err = unpopulate(val, "PrincipalID", &c.PrincipalID) + case "type": + err = unpopulate(val, "Type", &c.Type) delete(rawMsg, key) } if err != nil { @@ -2274,30 +2126,19 @@ func (c *Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedide return nil } -// MarshalJSON implements the json.Marshaller interface for type ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems. -func (c ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CorsPolicy. +func (c CorsPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "address", c.Address) - populate(objectMap, "cpuUsage", c.CPUUsage) - populate(objectMap, "diskFreeKB", c.DiskFreeKB) - populate(objectMap, "diskUsedKB", c.DiskUsedKB) - populate(objectMap, "hostID", c.HostID) - populate(objectMap, "load", c.Load) - populate(objectMap, "memoryBuffersAndCachedKB", c.MemoryBuffersAndCachedKB) - populate(objectMap, "memoryFreeKB", c.MemoryFreeKB) - populate(objectMap, "memoryTotalKB", c.MemoryTotalKB) - populate(objectMap, "memoryUsedKB", c.MemoryUsedKB) - populate(objectMap, "rack", c.Rack) - populate(objectMap, "size", c.Size) - populate(objectMap, "state", c.State) - populate(objectMap, "status", c.Status) - populate(objectMap, "timestamp", c.Timestamp) - populate(objectMap, "tokens", c.Tokens) + populate(objectMap, "allowedHeaders", c.AllowedHeaders) + populate(objectMap, "allowedMethods", c.AllowedMethods) + populate(objectMap, "allowedOrigins", c.AllowedOrigins) + populate(objectMap, "exposedHeaders", c.ExposedHeaders) + populate(objectMap, "maxAgeInSeconds", c.MaxAgeInSeconds) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems. -func (c *ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CorsPolicy. +func (c *CorsPolicy) 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) @@ -2305,53 +2146,20 @@ func (c *ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacenter for key, val := range rawMsg { var err error switch key { - case "address": - err = unpopulate(val, "Address", &c.Address) - delete(rawMsg, key) - case "cpuUsage": - err = unpopulate(val, "CPUUsage", &c.CPUUsage) - delete(rawMsg, key) - case "diskFreeKB": - err = unpopulate(val, "DiskFreeKB", &c.DiskFreeKB) - delete(rawMsg, key) - case "diskUsedKB": - err = unpopulate(val, "DiskUsedKB", &c.DiskUsedKB) - delete(rawMsg, key) - case "hostID": - err = unpopulate(val, "HostID", &c.HostID) - delete(rawMsg, key) - case "load": - err = unpopulate(val, "Load", &c.Load) - delete(rawMsg, key) - case "memoryBuffersAndCachedKB": - err = unpopulate(val, "MemoryBuffersAndCachedKB", &c.MemoryBuffersAndCachedKB) - delete(rawMsg, key) - case "memoryFreeKB": - err = unpopulate(val, "MemoryFreeKB", &c.MemoryFreeKB) - delete(rawMsg, key) - case "memoryTotalKB": - err = unpopulate(val, "MemoryTotalKB", &c.MemoryTotalKB) - delete(rawMsg, key) - case "memoryUsedKB": - err = unpopulate(val, "MemoryUsedKB", &c.MemoryUsedKB) - delete(rawMsg, key) - case "rack": - err = unpopulate(val, "Rack", &c.Rack) - delete(rawMsg, key) - case "size": - err = unpopulate(val, "Size", &c.Size) + case "allowedHeaders": + err = unpopulate(val, "AllowedHeaders", &c.AllowedHeaders) delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &c.State) + case "allowedMethods": + err = unpopulate(val, "AllowedMethods", &c.AllowedMethods) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &c.Status) + case "allowedOrigins": + err = unpopulate(val, "AllowedOrigins", &c.AllowedOrigins) delete(rawMsg, key) - case "timestamp": - err = unpopulate(val, "Timestamp", &c.Timestamp) + case "exposedHeaders": + err = unpopulate(val, "ExposedHeaders", &c.ExposedHeaders) delete(rawMsg, key) - case "tokens": - err = unpopulate(val, "Tokens", &c.Tokens) + case "maxAgeInSeconds": + err = unpopulate(val, "MaxAgeInSeconds", &c.MaxAgeInSeconds) delete(rawMsg, key) } if err != nil { @@ -2361,16 +2169,16 @@ func (c *ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacenter return nil } -// MarshalJSON implements the json.Marshaller interface for type CompositePath. -func (c CompositePath) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CreateUpdateOptions. +func (c CreateUpdateOptions) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "order", c.Order) - populate(objectMap, "path", c.Path) + populate(objectMap, "autoscaleSettings", c.AutoscaleSettings) + populate(objectMap, "throughput", c.Throughput) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type CompositePath. -func (c *CompositePath) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CreateUpdateOptions. +func (c *CreateUpdateOptions) 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) @@ -2378,11 +2186,11 @@ func (c *CompositePath) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "order": - err = unpopulate(val, "Order", &c.Order) + case "autoscaleSettings": + err = unpopulate(val, "AutoscaleSettings", &c.AutoscaleSettings) delete(rawMsg, key) - case "path": - err = unpopulate(val, "Path", &c.Path) + case "throughput": + err = unpopulate(val, "Throughput", &c.Throughput) delete(rawMsg, key) } if err != nil { @@ -2392,550 +2200,631 @@ func (c *CompositePath) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ConflictResolutionPolicy. -func (c ConflictResolutionPolicy) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DataCenterResource. +func (d DataCenterResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "conflictResolutionPath", c.ConflictResolutionPath) - populate(objectMap, "conflictResolutionProcedure", c.ConflictResolutionProcedure) - populate(objectMap, "mode", c.Mode) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ConflictResolutionPolicy. -func (c *ConflictResolutionPolicy) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DataCenterResource. +func (d *DataCenterResource) 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) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "conflictResolutionPath": - err = unpopulate(val, "ConflictResolutionPath", &c.ConflictResolutionPath) + case "id": + err = unpopulate(val, "ID", &d.ID) delete(rawMsg, key) - case "conflictResolutionProcedure": - err = unpopulate(val, "ConflictResolutionProcedure", &c.ConflictResolutionProcedure) + case "name": + err = unpopulate(val, "Name", &d.Name) delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &c.Mode) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ConnectionError. -func (c ConnectionError) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DataCenterResourceProperties. +func (d DataCenterResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "connectionState", c.ConnectionState) - populate(objectMap, "exception", c.Exception) - populate(objectMap, "iPFrom", c.IPFrom) - populate(objectMap, "iPTo", c.IPTo) - populate(objectMap, "port", c.Port) + populate(objectMap, "availabilityZone", d.AvailabilityZone) + populate(objectMap, "backupStorageCustomerKeyUri", d.BackupStorageCustomerKeyURI) + populate(objectMap, "base64EncodedCassandraYamlFragment", d.Base64EncodedCassandraYamlFragment) + populate(objectMap, "dataCenterLocation", d.DataCenterLocation) + populate(objectMap, "delegatedSubnetId", d.DelegatedSubnetID) + populate(objectMap, "diskCapacity", d.DiskCapacity) + populate(objectMap, "diskSku", d.DiskSKU) + populate(objectMap, "managedDiskCustomerKeyUri", d.ManagedDiskCustomerKeyURI) + populate(objectMap, "nodeCount", d.NodeCount) + populate(objectMap, "provisioningState", d.ProvisioningState) + populate(objectMap, "sku", d.SKU) + populate(objectMap, "seedNodes", d.SeedNodes) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionError. -func (c *ConnectionError) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DataCenterResourceProperties. +func (d *DataCenterResourceProperties) 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) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "connectionState": - err = unpopulate(val, "ConnectionState", &c.ConnectionState) + case "availabilityZone": + err = unpopulate(val, "AvailabilityZone", &d.AvailabilityZone) delete(rawMsg, key) - case "exception": - err = unpopulate(val, "Exception", &c.Exception) + case "backupStorageCustomerKeyUri": + err = unpopulate(val, "BackupStorageCustomerKeyURI", &d.BackupStorageCustomerKeyURI) delete(rawMsg, key) - case "iPFrom": - err = unpopulate(val, "IPFrom", &c.IPFrom) + case "base64EncodedCassandraYamlFragment": + err = unpopulate(val, "Base64EncodedCassandraYamlFragment", &d.Base64EncodedCassandraYamlFragment) delete(rawMsg, key) - case "iPTo": - err = unpopulate(val, "IPTo", &c.IPTo) + case "dataCenterLocation": + err = unpopulate(val, "DataCenterLocation", &d.DataCenterLocation) delete(rawMsg, key) - case "port": - err = unpopulate(val, "Port", &c.Port) + case "delegatedSubnetId": + err = unpopulate(val, "DelegatedSubnetID", &d.DelegatedSubnetID) + delete(rawMsg, key) + case "diskCapacity": + err = unpopulate(val, "DiskCapacity", &d.DiskCapacity) + delete(rawMsg, key) + case "diskSku": + err = unpopulate(val, "DiskSKU", &d.DiskSKU) + delete(rawMsg, key) + case "managedDiskCustomerKeyUri": + err = unpopulate(val, "ManagedDiskCustomerKeyURI", &d.ManagedDiskCustomerKeyURI) + delete(rawMsg, key) + case "nodeCount": + err = unpopulate(val, "NodeCount", &d.NodeCount) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &d.SKU) + delete(rawMsg, key) + case "seedNodes": + err = unpopulate(val, "SeedNodes", &d.SeedNodes) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ConsistencyPolicy. -func (c ConsistencyPolicy) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DataTransferRegionalServiceResource. +func (d DataTransferRegionalServiceResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "defaultConsistencyLevel", c.DefaultConsistencyLevel) - populate(objectMap, "maxIntervalInSeconds", c.MaxIntervalInSeconds) - populate(objectMap, "maxStalenessPrefix", c.MaxStalenessPrefix) + populate(objectMap, "location", d.Location) + populate(objectMap, "name", d.Name) + populate(objectMap, "status", d.Status) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ConsistencyPolicy. -func (c *ConsistencyPolicy) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DataTransferRegionalServiceResource. +func (d *DataTransferRegionalServiceResource) 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) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "defaultConsistencyLevel": - err = unpopulate(val, "DefaultConsistencyLevel", &c.DefaultConsistencyLevel) + case "location": + err = unpopulate(val, "Location", &d.Location) delete(rawMsg, key) - case "maxIntervalInSeconds": - err = unpopulate(val, "MaxIntervalInSeconds", &c.MaxIntervalInSeconds) + case "name": + err = unpopulate(val, "Name", &d.Name) delete(rawMsg, key) - case "maxStalenessPrefix": - err = unpopulate(val, "MaxStalenessPrefix", &c.MaxStalenessPrefix) + case "status": + err = unpopulate(val, "Status", &d.Status) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ContainerPartitionKey. -func (c ContainerPartitionKey) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DataTransferServiceResource. +func (d DataTransferServiceResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "kind", c.Kind) - populate(objectMap, "paths", c.Paths) - populate(objectMap, "systemKey", c.SystemKey) - populate(objectMap, "version", c.Version) + populate(objectMap, "properties", d.Properties) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerPartitionKey. -func (c *ContainerPartitionKey) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DataTransferServiceResource. +func (d *DataTransferServiceResource) 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) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "kind": - err = unpopulate(val, "Kind", &c.Kind) - delete(rawMsg, key) - case "paths": - err = unpopulate(val, "Paths", &c.Paths) - delete(rawMsg, key) - case "systemKey": - err = unpopulate(val, "SystemKey", &c.SystemKey) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &c.Version) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ContinuousBackupInformation. -func (c ContinuousBackupInformation) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DataTransferServiceResourceProperties. +func (d DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "latestRestorableTimestamp", c.LatestRestorableTimestamp) + populateTimeRFC3339(objectMap, "creationTime", d.CreationTime) + populate(objectMap, "instanceCount", d.InstanceCount) + populate(objectMap, "instanceSize", d.InstanceSize) + populate(objectMap, "locations", d.Locations) + objectMap["serviceType"] = ServiceTypeDataTransfer + populate(objectMap, "status", d.Status) + if d.AdditionalProperties != nil { + for key, val := range d.AdditionalProperties { + objectMap[key] = val + } + } return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ContinuousBackupInformation. -func (c *ContinuousBackupInformation) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DataTransferServiceResourceProperties. +func (d *DataTransferServiceResourceProperties) 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) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "latestRestorableTimestamp": - err = unpopulate(val, "LatestRestorableTimestamp", &c.LatestRestorableTimestamp) + case "creationTime": + err = unpopulateTimeRFC3339(val, "CreationTime", &d.CreationTime) + delete(rawMsg, key) + case "instanceCount": + err = unpopulate(val, "InstanceCount", &d.InstanceCount) + delete(rawMsg, key) + case "instanceSize": + err = unpopulate(val, "InstanceSize", &d.InstanceSize) + delete(rawMsg, key) + case "locations": + err = unpopulate(val, "Locations", &d.Locations) + delete(rawMsg, key) + case "serviceType": + err = unpopulate(val, "ServiceType", &d.ServiceType) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &d.Status) + delete(rawMsg, key) + default: + if d.AdditionalProperties == nil { + d.AdditionalProperties = map[string]any{} + } + if val != nil { + var aux any + err = json.Unmarshal(val, &aux) + d.AdditionalProperties[key] = aux + } delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ContinuousBackupRestoreLocation. -func (c ContinuousBackupRestoreLocation) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountConnectionString. +func (d DatabaseAccountConnectionString) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "location", c.Location) + populate(objectMap, "connectionString", d.ConnectionString) + populate(objectMap, "description", d.Description) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ContinuousBackupRestoreLocation. -func (c *ContinuousBackupRestoreLocation) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountConnectionString. +func (d *DatabaseAccountConnectionString) 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) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "location": - err = unpopulate(val, "Location", &c.Location) + case "connectionString": + err = unpopulate(val, "ConnectionString", &d.ConnectionString) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &d.Description) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ContinuousModeBackupPolicy. -func (c ContinuousModeBackupPolicy) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountCreateUpdateParameters. +func (d DatabaseAccountCreateUpdateParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "continuousModeProperties", c.ContinuousModeProperties) - populate(objectMap, "migrationState", c.MigrationState) - objectMap["type"] = BackupPolicyTypeContinuous + populate(objectMap, "id", d.ID) + populate(objectMap, "identity", d.Identity) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "location", d.Location) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "tags", d.Tags) + populate(objectMap, "type", d.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ContinuousModeBackupPolicy. -func (c *ContinuousModeBackupPolicy) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountCreateUpdateParameters. +func (d *DatabaseAccountCreateUpdateParameters) 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) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "continuousModeProperties": - err = unpopulate(val, "ContinuousModeProperties", &c.ContinuousModeProperties) + case "id": + err = unpopulate(val, "ID", &d.ID) delete(rawMsg, key) - case "migrationState": - err = unpopulate(val, "MigrationState", &c.MigrationState) + case "identity": + err = unpopulate(val, "Identity", &d.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &c.Type) + err = unpopulate(val, "Type", &d.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ContinuousModeProperties. -func (c ContinuousModeProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountCreateUpdateProperties. +func (d DatabaseAccountCreateUpdateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "tier", c.Tier) + populate(objectMap, "apiProperties", d.APIProperties) + populate(objectMap, "analyticalStorageConfiguration", d.AnalyticalStorageConfiguration) + populate(objectMap, "backupPolicy", d.BackupPolicy) + populate(objectMap, "capabilities", d.Capabilities) + populate(objectMap, "capacity", d.Capacity) + populate(objectMap, "connectorOffer", d.ConnectorOffer) + populate(objectMap, "consistencyPolicy", d.ConsistencyPolicy) + populate(objectMap, "cors", d.Cors) + populate(objectMap, "createMode", d.CreateMode) + objectMap["databaseAccountOfferType"] = "Standard" + populate(objectMap, "defaultIdentity", d.DefaultIdentity) + populate(objectMap, "disableKeyBasedMetadataWriteAccess", d.DisableKeyBasedMetadataWriteAccess) + populate(objectMap, "disableLocalAuth", d.DisableLocalAuth) + populate(objectMap, "enableAnalyticalStorage", d.EnableAnalyticalStorage) + populate(objectMap, "enableAutomaticFailover", d.EnableAutomaticFailover) + populate(objectMap, "enableCassandraConnector", d.EnableCassandraConnector) + populate(objectMap, "enableFreeTier", d.EnableFreeTier) + populate(objectMap, "enableMultipleWriteLocations", d.EnableMultipleWriteLocations) + populate(objectMap, "enablePartitionMerge", d.EnablePartitionMerge) + populate(objectMap, "ipRules", d.IPRules) + populate(objectMap, "isVirtualNetworkFilterEnabled", d.IsVirtualNetworkFilterEnabled) + populate(objectMap, "keyVaultKeyUri", d.KeyVaultKeyURI) + populate(objectMap, "keysMetadata", d.KeysMetadata) + populate(objectMap, "locations", d.Locations) + populate(objectMap, "minimalTlsVersion", d.MinimalTLSVersion) + populate(objectMap, "networkAclBypass", d.NetworkACLBypass) + populate(objectMap, "networkAclBypassResourceIds", d.NetworkACLBypassResourceIDs) + populate(objectMap, "publicNetworkAccess", d.PublicNetworkAccess) + populate(objectMap, "restoreParameters", d.RestoreParameters) + populate(objectMap, "virtualNetworkRules", d.VirtualNetworkRules) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ContinuousModeProperties. -func (c *ContinuousModeProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountCreateUpdateProperties. +func (d *DatabaseAccountCreateUpdateProperties) 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) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "tier": - err = unpopulate(val, "Tier", &c.Tier) + case "apiProperties": + err = unpopulate(val, "APIProperties", &d.APIProperties) 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 CorsPolicy. -func (c CorsPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "allowedHeaders", c.AllowedHeaders) - populate(objectMap, "allowedMethods", c.AllowedMethods) - populate(objectMap, "allowedOrigins", c.AllowedOrigins) - populate(objectMap, "exposedHeaders", c.ExposedHeaders) - populate(objectMap, "maxAgeInSeconds", c.MaxAgeInSeconds) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CorsPolicy. -func (c *CorsPolicy) 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 "allowedHeaders": - err = unpopulate(val, "AllowedHeaders", &c.AllowedHeaders) + case "analyticalStorageConfiguration": + err = unpopulate(val, "AnalyticalStorageConfiguration", &d.AnalyticalStorageConfiguration) delete(rawMsg, key) - case "allowedMethods": - err = unpopulate(val, "AllowedMethods", &c.AllowedMethods) + case "backupPolicy": + d.BackupPolicy, err = unmarshalBackupPolicyClassification(val) delete(rawMsg, key) - case "allowedOrigins": - err = unpopulate(val, "AllowedOrigins", &c.AllowedOrigins) + case "capabilities": + err = unpopulate(val, "Capabilities", &d.Capabilities) delete(rawMsg, key) - case "exposedHeaders": - err = unpopulate(val, "ExposedHeaders", &c.ExposedHeaders) + case "capacity": + err = unpopulate(val, "Capacity", &d.Capacity) delete(rawMsg, key) - case "maxAgeInSeconds": - err = unpopulate(val, "MaxAgeInSeconds", &c.MaxAgeInSeconds) + case "connectorOffer": + err = unpopulate(val, "ConnectorOffer", &d.ConnectorOffer) + delete(rawMsg, key) + case "consistencyPolicy": + err = unpopulate(val, "ConsistencyPolicy", &d.ConsistencyPolicy) + delete(rawMsg, key) + case "cors": + err = unpopulate(val, "Cors", &d.Cors) + delete(rawMsg, key) + case "createMode": + err = unpopulate(val, "CreateMode", &d.CreateMode) + delete(rawMsg, key) + case "databaseAccountOfferType": + err = unpopulate(val, "DatabaseAccountOfferType", &d.DatabaseAccountOfferType) + delete(rawMsg, key) + case "defaultIdentity": + err = unpopulate(val, "DefaultIdentity", &d.DefaultIdentity) + delete(rawMsg, key) + case "disableKeyBasedMetadataWriteAccess": + err = unpopulate(val, "DisableKeyBasedMetadataWriteAccess", &d.DisableKeyBasedMetadataWriteAccess) + delete(rawMsg, key) + case "disableLocalAuth": + err = unpopulate(val, "DisableLocalAuth", &d.DisableLocalAuth) + delete(rawMsg, key) + case "enableAnalyticalStorage": + err = unpopulate(val, "EnableAnalyticalStorage", &d.EnableAnalyticalStorage) + delete(rawMsg, key) + case "enableAutomaticFailover": + err = unpopulate(val, "EnableAutomaticFailover", &d.EnableAutomaticFailover) + delete(rawMsg, key) + case "enableCassandraConnector": + err = unpopulate(val, "EnableCassandraConnector", &d.EnableCassandraConnector) + delete(rawMsg, key) + case "enableFreeTier": + err = unpopulate(val, "EnableFreeTier", &d.EnableFreeTier) + delete(rawMsg, key) + case "enableMultipleWriteLocations": + err = unpopulate(val, "EnableMultipleWriteLocations", &d.EnableMultipleWriteLocations) + delete(rawMsg, key) + case "enablePartitionMerge": + err = unpopulate(val, "EnablePartitionMerge", &d.EnablePartitionMerge) + delete(rawMsg, key) + case "ipRules": + err = unpopulate(val, "IPRules", &d.IPRules) + delete(rawMsg, key) + case "isVirtualNetworkFilterEnabled": + err = unpopulate(val, "IsVirtualNetworkFilterEnabled", &d.IsVirtualNetworkFilterEnabled) + delete(rawMsg, key) + case "keyVaultKeyUri": + err = unpopulate(val, "KeyVaultKeyURI", &d.KeyVaultKeyURI) + delete(rawMsg, key) + case "keysMetadata": + err = unpopulate(val, "KeysMetadata", &d.KeysMetadata) + delete(rawMsg, key) + case "locations": + err = unpopulate(val, "Locations", &d.Locations) + delete(rawMsg, key) + case "minimalTlsVersion": + err = unpopulate(val, "MinimalTLSVersion", &d.MinimalTLSVersion) + delete(rawMsg, key) + case "networkAclBypass": + err = unpopulate(val, "NetworkACLBypass", &d.NetworkACLBypass) + delete(rawMsg, key) + case "networkAclBypassResourceIds": + err = unpopulate(val, "NetworkACLBypassResourceIDs", &d.NetworkACLBypassResourceIDs) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &d.PublicNetworkAccess) + delete(rawMsg, key) + case "restoreParameters": + err = unpopulate(val, "RestoreParameters", &d.RestoreParameters) + delete(rawMsg, key) + case "virtualNetworkRules": + err = unpopulate(val, "VirtualNetworkRules", &d.VirtualNetworkRules) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type CreateJobRequest. -func (c CreateJobRequest) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountGetProperties. +func (d DatabaseAccountGetProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", c.ID) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "type", c.Type) + populate(objectMap, "apiProperties", d.APIProperties) + populate(objectMap, "analyticalStorageConfiguration", d.AnalyticalStorageConfiguration) + populate(objectMap, "backupPolicy", d.BackupPolicy) + populate(objectMap, "capabilities", d.Capabilities) + populate(objectMap, "capacity", d.Capacity) + populate(objectMap, "connectorOffer", d.ConnectorOffer) + populate(objectMap, "consistencyPolicy", d.ConsistencyPolicy) + populate(objectMap, "cors", d.Cors) + populate(objectMap, "createMode", d.CreateMode) + objectMap["databaseAccountOfferType"] = "Standard" + populate(objectMap, "defaultIdentity", d.DefaultIdentity) + populate(objectMap, "disableKeyBasedMetadataWriteAccess", d.DisableKeyBasedMetadataWriteAccess) + populate(objectMap, "disableLocalAuth", d.DisableLocalAuth) + populate(objectMap, "documentEndpoint", d.DocumentEndpoint) + populate(objectMap, "enableAnalyticalStorage", d.EnableAnalyticalStorage) + populate(objectMap, "enableAutomaticFailover", d.EnableAutomaticFailover) + populate(objectMap, "enableCassandraConnector", d.EnableCassandraConnector) + populate(objectMap, "enableFreeTier", d.EnableFreeTier) + populate(objectMap, "enableMultipleWriteLocations", d.EnableMultipleWriteLocations) + populate(objectMap, "enablePartitionMerge", d.EnablePartitionMerge) + populate(objectMap, "failoverPolicies", d.FailoverPolicies) + populate(objectMap, "ipRules", d.IPRules) + populate(objectMap, "instanceId", d.InstanceID) + populate(objectMap, "isVirtualNetworkFilterEnabled", d.IsVirtualNetworkFilterEnabled) + populate(objectMap, "keyVaultKeyUri", d.KeyVaultKeyURI) + populate(objectMap, "keysMetadata", d.KeysMetadata) + populate(objectMap, "locations", d.Locations) + populate(objectMap, "minimalTlsVersion", d.MinimalTLSVersion) + populate(objectMap, "networkAclBypass", d.NetworkACLBypass) + populate(objectMap, "networkAclBypassResourceIds", d.NetworkACLBypassResourceIDs) + populate(objectMap, "privateEndpointConnections", d.PrivateEndpointConnections) + populate(objectMap, "provisioningState", d.ProvisioningState) + populate(objectMap, "publicNetworkAccess", d.PublicNetworkAccess) + populate(objectMap, "readLocations", d.ReadLocations) + populate(objectMap, "restoreParameters", d.RestoreParameters) + populate(objectMap, "virtualNetworkRules", d.VirtualNetworkRules) + populate(objectMap, "writeLocations", d.WriteLocations) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type CreateJobRequest. -func (c *CreateJobRequest) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountGetProperties. +func (d *DatabaseAccountGetProperties) 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) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &c.ID) + case "apiProperties": + err = unpopulate(val, "APIProperties", &d.APIProperties) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) + case "analyticalStorageConfiguration": + err = unpopulate(val, "AnalyticalStorageConfiguration", &d.AnalyticalStorageConfiguration) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) + case "backupPolicy": + d.BackupPolicy, err = unmarshalBackupPolicyClassification(val) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) + case "capabilities": + err = unpopulate(val, "Capabilities", &d.Capabilities) 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 CreateUpdateOptions. -func (c CreateUpdateOptions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "autoscaleSettings", c.AutoscaleSettings) - populate(objectMap, "throughput", c.Throughput) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CreateUpdateOptions. -func (c *CreateUpdateOptions) 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 "autoscaleSettings": - err = unpopulate(val, "AutoscaleSettings", &c.AutoscaleSettings) + case "capacity": + err = unpopulate(val, "Capacity", &d.Capacity) delete(rawMsg, key) - case "throughput": - err = unpopulate(val, "Throughput", &c.Throughput) + case "connectorOffer": + err = unpopulate(val, "ConnectorOffer", &d.ConnectorOffer) 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 DataCenterResource. -func (d DataCenterResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", d.ID) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataCenterResource. -func (d *DataCenterResource) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &d.ID) + case "consistencyPolicy": + err = unpopulate(val, "ConsistencyPolicy", &d.ConsistencyPolicy) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) + case "cors": + err = unpopulate(val, "Cors", &d.Cors) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &d.Properties) + case "createMode": + err = unpopulate(val, "CreateMode", &d.CreateMode) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) + case "databaseAccountOfferType": + err = unpopulate(val, "DatabaseAccountOfferType", &d.DatabaseAccountOfferType) delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataCenterResourceProperties. -func (d DataCenterResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "authenticationMethodLdapProperties", d.AuthenticationMethodLdapProperties) - populate(objectMap, "availabilityZone", d.AvailabilityZone) - populate(objectMap, "backupStorageCustomerKeyUri", d.BackupStorageCustomerKeyURI) - populate(objectMap, "base64EncodedCassandraYamlFragment", d.Base64EncodedCassandraYamlFragment) - populate(objectMap, "dataCenterLocation", d.DataCenterLocation) - populate(objectMap, "delegatedSubnetId", d.DelegatedSubnetID) - populate(objectMap, "diskCapacity", d.DiskCapacity) - populate(objectMap, "diskSku", d.DiskSKU) - populate(objectMap, "managedDiskCustomerKeyUri", d.ManagedDiskCustomerKeyURI) - populate(objectMap, "nodeCount", d.NodeCount) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "sku", d.SKU) - populate(objectMap, "seedNodes", d.SeedNodes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataCenterResourceProperties. -func (d *DataCenterResourceProperties) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authenticationMethodLdapProperties": - err = unpopulate(val, "AuthenticationMethodLdapProperties", &d.AuthenticationMethodLdapProperties) + case "defaultIdentity": + err = unpopulate(val, "DefaultIdentity", &d.DefaultIdentity) delete(rawMsg, key) - case "availabilityZone": - err = unpopulate(val, "AvailabilityZone", &d.AvailabilityZone) + case "disableKeyBasedMetadataWriteAccess": + err = unpopulate(val, "DisableKeyBasedMetadataWriteAccess", &d.DisableKeyBasedMetadataWriteAccess) delete(rawMsg, key) - case "backupStorageCustomerKeyUri": - err = unpopulate(val, "BackupStorageCustomerKeyURI", &d.BackupStorageCustomerKeyURI) + case "disableLocalAuth": + err = unpopulate(val, "DisableLocalAuth", &d.DisableLocalAuth) delete(rawMsg, key) - case "base64EncodedCassandraYamlFragment": - err = unpopulate(val, "Base64EncodedCassandraYamlFragment", &d.Base64EncodedCassandraYamlFragment) + case "documentEndpoint": + err = unpopulate(val, "DocumentEndpoint", &d.DocumentEndpoint) delete(rawMsg, key) - case "dataCenterLocation": - err = unpopulate(val, "DataCenterLocation", &d.DataCenterLocation) + case "enableAnalyticalStorage": + err = unpopulate(val, "EnableAnalyticalStorage", &d.EnableAnalyticalStorage) delete(rawMsg, key) - case "delegatedSubnetId": - err = unpopulate(val, "DelegatedSubnetID", &d.DelegatedSubnetID) + case "enableAutomaticFailover": + err = unpopulate(val, "EnableAutomaticFailover", &d.EnableAutomaticFailover) delete(rawMsg, key) - case "diskCapacity": - err = unpopulate(val, "DiskCapacity", &d.DiskCapacity) + case "enableCassandraConnector": + err = unpopulate(val, "EnableCassandraConnector", &d.EnableCassandraConnector) delete(rawMsg, key) - case "diskSku": - err = unpopulate(val, "DiskSKU", &d.DiskSKU) + case "enableFreeTier": + err = unpopulate(val, "EnableFreeTier", &d.EnableFreeTier) delete(rawMsg, key) - case "managedDiskCustomerKeyUri": - err = unpopulate(val, "ManagedDiskCustomerKeyURI", &d.ManagedDiskCustomerKeyURI) + case "enableMultipleWriteLocations": + err = unpopulate(val, "EnableMultipleWriteLocations", &d.EnableMultipleWriteLocations) delete(rawMsg, key) - case "nodeCount": - err = unpopulate(val, "NodeCount", &d.NodeCount) + case "enablePartitionMerge": + err = unpopulate(val, "EnablePartitionMerge", &d.EnablePartitionMerge) + delete(rawMsg, key) + case "failoverPolicies": + err = unpopulate(val, "FailoverPolicies", &d.FailoverPolicies) + delete(rawMsg, key) + case "ipRules": + err = unpopulate(val, "IPRules", &d.IPRules) + delete(rawMsg, key) + case "instanceId": + err = unpopulate(val, "InstanceID", &d.InstanceID) + delete(rawMsg, key) + case "isVirtualNetworkFilterEnabled": + err = unpopulate(val, "IsVirtualNetworkFilterEnabled", &d.IsVirtualNetworkFilterEnabled) + delete(rawMsg, key) + case "keyVaultKeyUri": + err = unpopulate(val, "KeyVaultKeyURI", &d.KeyVaultKeyURI) + delete(rawMsg, key) + case "keysMetadata": + err = unpopulate(val, "KeysMetadata", &d.KeysMetadata) + delete(rawMsg, key) + case "locations": + err = unpopulate(val, "Locations", &d.Locations) + delete(rawMsg, key) + case "minimalTlsVersion": + err = unpopulate(val, "MinimalTLSVersion", &d.MinimalTLSVersion) + delete(rawMsg, key) + case "networkAclBypass": + err = unpopulate(val, "NetworkACLBypass", &d.NetworkACLBypass) + delete(rawMsg, key) + case "networkAclBypassResourceIds": + err = unpopulate(val, "NetworkACLBypassResourceIDs", &d.NetworkACLBypassResourceIDs) + delete(rawMsg, key) + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &d.PrivateEndpointConnections) delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &d.SKU) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &d.PublicNetworkAccess) delete(rawMsg, key) - case "seedNodes": - err = unpopulate(val, "SeedNodes", &d.SeedNodes) + case "readLocations": + err = unpopulate(val, "ReadLocations", &d.ReadLocations) delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataTransferDataSourceSink. -func (d DataTransferDataSourceSink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["component"] = d.Component - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataTransferDataSourceSink. -func (d *DataTransferDataSourceSink) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "component": - err = unpopulate(val, "Component", &d.Component) + case "restoreParameters": + err = unpopulate(val, "RestoreParameters", &d.RestoreParameters) delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataTransferJobFeedResults. -func (d DataTransferJobFeedResults) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", d.NextLink) - populate(objectMap, "value", d.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataTransferJobFeedResults. -func (d *DataTransferJobFeedResults) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &d.NextLink) + case "virtualNetworkRules": + err = unpopulate(val, "VirtualNetworkRules", &d.VirtualNetworkRules) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &d.Value) + case "writeLocations": + err = unpopulate(val, "WriteLocations", &d.WriteLocations) delete(rawMsg, key) } if err != nil { @@ -2945,1910 +2834,623 @@ func (d *DataTransferJobFeedResults) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DataTransferJobGetResults. -func (d DataTransferJobGetResults) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountGetResults. +func (d DatabaseAccountGetResults) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", d.ID) + populate(objectMap, "identity", d.Identity) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "location", d.Location) populate(objectMap, "name", d.Name) populate(objectMap, "properties", d.Properties) + populate(objectMap, "systemData", d.SystemData) + populate(objectMap, "tags", d.Tags) populate(objectMap, "type", d.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DataTransferJobGetResults. -func (d *DataTransferJobGetResults) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &d.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataTransferJobProperties. -func (d DataTransferJobProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "destination", d.Destination) - populate(objectMap, "error", d.Error) - populate(objectMap, "jobName", d.JobName) - populateTimeRFC3339(objectMap, "lastUpdatedUtcTime", d.LastUpdatedUTCTime) - populate(objectMap, "processedCount", d.ProcessedCount) - populate(objectMap, "source", d.Source) - populate(objectMap, "status", d.Status) - populate(objectMap, "totalCount", d.TotalCount) - populate(objectMap, "workerCount", d.WorkerCount) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataTransferJobProperties. -func (d *DataTransferJobProperties) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "destination": - d.Destination, err = unmarshalDataTransferDataSourceSinkClassification(val) - delete(rawMsg, key) - case "error": - err = unpopulate(val, "Error", &d.Error) - delete(rawMsg, key) - case "jobName": - err = unpopulate(val, "JobName", &d.JobName) - delete(rawMsg, key) - case "lastUpdatedUtcTime": - err = unpopulateTimeRFC3339(val, "LastUpdatedUTCTime", &d.LastUpdatedUTCTime) - delete(rawMsg, key) - case "processedCount": - err = unpopulate(val, "ProcessedCount", &d.ProcessedCount) - delete(rawMsg, key) - case "source": - d.Source, err = unmarshalDataTransferDataSourceSinkClassification(val) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &d.Status) - delete(rawMsg, key) - case "totalCount": - err = unpopulate(val, "TotalCount", &d.TotalCount) - delete(rawMsg, key) - case "workerCount": - err = unpopulate(val, "WorkerCount", &d.WorkerCount) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataTransferRegionalServiceResource. -func (d DataTransferRegionalServiceResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "location", d.Location) - populate(objectMap, "name", d.Name) - populate(objectMap, "status", d.Status) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataTransferRegionalServiceResource. -func (d *DataTransferRegionalServiceResource) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "location": - err = unpopulate(val, "Location", &d.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &d.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataTransferServiceResource. -func (d DataTransferServiceResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", d.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataTransferServiceResource. -func (d *DataTransferServiceResource) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataTransferServiceResourceProperties. -func (d DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", d.CreationTime) - populate(objectMap, "instanceCount", d.InstanceCount) - populate(objectMap, "instanceSize", d.InstanceSize) - populate(objectMap, "locations", d.Locations) - objectMap["serviceType"] = ServiceTypeDataTransfer - populate(objectMap, "status", d.Status) - if d.AdditionalProperties != nil { - for key, val := range d.AdditionalProperties { - objectMap[key] = val - } - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataTransferServiceResourceProperties. -func (d *DataTransferServiceResourceProperties) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &d.CreationTime) - delete(rawMsg, key) - case "instanceCount": - err = unpopulate(val, "InstanceCount", &d.InstanceCount) - delete(rawMsg, key) - case "instanceSize": - err = unpopulate(val, "InstanceSize", &d.InstanceSize) - delete(rawMsg, key) - case "locations": - err = unpopulate(val, "Locations", &d.Locations) - delete(rawMsg, key) - case "serviceType": - err = unpopulate(val, "ServiceType", &d.ServiceType) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &d.Status) - delete(rawMsg, key) - default: - if d.AdditionalProperties == nil { - d.AdditionalProperties = map[string]any{} - } - if val != nil { - var aux any - err = json.Unmarshal(val, &aux) - d.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountConnectionString. -func (d DatabaseAccountConnectionString) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "connectionString", d.ConnectionString) - populate(objectMap, "description", d.Description) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountConnectionString. -func (d *DatabaseAccountConnectionString) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "connectionString": - err = unpopulate(val, "ConnectionString", &d.ConnectionString) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &d.Description) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountCreateUpdateParameters. -func (d DatabaseAccountCreateUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", d.ID) - populate(objectMap, "identity", d.Identity) - populate(objectMap, "kind", d.Kind) - populate(objectMap, "location", d.Location) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "tags", d.Tags) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountCreateUpdateParameters. -func (d *DatabaseAccountCreateUpdateParameters) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &d.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &d.Identity) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &d.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &d.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &d.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountCreateUpdateProperties. -func (d DatabaseAccountCreateUpdateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "apiProperties", d.APIProperties) - populate(objectMap, "analyticalStorageConfiguration", d.AnalyticalStorageConfiguration) - populate(objectMap, "backupPolicy", d.BackupPolicy) - populate(objectMap, "capabilities", d.Capabilities) - populate(objectMap, "capacity", d.Capacity) - populate(objectMap, "connectorOffer", d.ConnectorOffer) - populate(objectMap, "consistencyPolicy", d.ConsistencyPolicy) - populate(objectMap, "cors", d.Cors) - populate(objectMap, "createMode", d.CreateMode) - objectMap["databaseAccountOfferType"] = "Standard" - populate(objectMap, "defaultIdentity", d.DefaultIdentity) - populate(objectMap, "diagnosticLogSettings", d.DiagnosticLogSettings) - populate(objectMap, "disableKeyBasedMetadataWriteAccess", d.DisableKeyBasedMetadataWriteAccess) - populate(objectMap, "disableLocalAuth", d.DisableLocalAuth) - populate(objectMap, "enableAnalyticalStorage", d.EnableAnalyticalStorage) - populate(objectMap, "enableAutomaticFailover", d.EnableAutomaticFailover) - populate(objectMap, "enableBurstCapacity", d.EnableBurstCapacity) - populate(objectMap, "enableCassandraConnector", d.EnableCassandraConnector) - populate(objectMap, "enableFreeTier", d.EnableFreeTier) - populate(objectMap, "enableMaterializedViews", d.EnableMaterializedViews) - populate(objectMap, "enableMultipleWriteLocations", d.EnableMultipleWriteLocations) - populate(objectMap, "enablePartitionMerge", d.EnablePartitionMerge) - populate(objectMap, "ipRules", d.IPRules) - populate(objectMap, "isVirtualNetworkFilterEnabled", d.IsVirtualNetworkFilterEnabled) - populate(objectMap, "keyVaultKeyUri", d.KeyVaultKeyURI) - populate(objectMap, "keysMetadata", d.KeysMetadata) - populate(objectMap, "locations", d.Locations) - populate(objectMap, "minimalTlsVersion", d.MinimalTLSVersion) - populate(objectMap, "networkAclBypass", d.NetworkACLBypass) - populate(objectMap, "networkAclBypassResourceIds", d.NetworkACLBypassResourceIDs) - populate(objectMap, "publicNetworkAccess", d.PublicNetworkAccess) - populate(objectMap, "restoreParameters", d.RestoreParameters) - populate(objectMap, "virtualNetworkRules", d.VirtualNetworkRules) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountCreateUpdateProperties. -func (d *DatabaseAccountCreateUpdateProperties) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "apiProperties": - err = unpopulate(val, "APIProperties", &d.APIProperties) - delete(rawMsg, key) - case "analyticalStorageConfiguration": - err = unpopulate(val, "AnalyticalStorageConfiguration", &d.AnalyticalStorageConfiguration) - delete(rawMsg, key) - case "backupPolicy": - d.BackupPolicy, err = unmarshalBackupPolicyClassification(val) - delete(rawMsg, key) - case "capabilities": - err = unpopulate(val, "Capabilities", &d.Capabilities) - delete(rawMsg, key) - case "capacity": - err = unpopulate(val, "Capacity", &d.Capacity) - delete(rawMsg, key) - case "connectorOffer": - err = unpopulate(val, "ConnectorOffer", &d.ConnectorOffer) - delete(rawMsg, key) - case "consistencyPolicy": - err = unpopulate(val, "ConsistencyPolicy", &d.ConsistencyPolicy) - delete(rawMsg, key) - case "cors": - err = unpopulate(val, "Cors", &d.Cors) - delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &d.CreateMode) - delete(rawMsg, key) - case "databaseAccountOfferType": - err = unpopulate(val, "DatabaseAccountOfferType", &d.DatabaseAccountOfferType) - delete(rawMsg, key) - case "defaultIdentity": - err = unpopulate(val, "DefaultIdentity", &d.DefaultIdentity) - delete(rawMsg, key) - case "diagnosticLogSettings": - err = unpopulate(val, "DiagnosticLogSettings", &d.DiagnosticLogSettings) - delete(rawMsg, key) - case "disableKeyBasedMetadataWriteAccess": - err = unpopulate(val, "DisableKeyBasedMetadataWriteAccess", &d.DisableKeyBasedMetadataWriteAccess) - delete(rawMsg, key) - case "disableLocalAuth": - err = unpopulate(val, "DisableLocalAuth", &d.DisableLocalAuth) - delete(rawMsg, key) - case "enableAnalyticalStorage": - err = unpopulate(val, "EnableAnalyticalStorage", &d.EnableAnalyticalStorage) - delete(rawMsg, key) - case "enableAutomaticFailover": - err = unpopulate(val, "EnableAutomaticFailover", &d.EnableAutomaticFailover) - delete(rawMsg, key) - case "enableBurstCapacity": - err = unpopulate(val, "EnableBurstCapacity", &d.EnableBurstCapacity) - delete(rawMsg, key) - case "enableCassandraConnector": - err = unpopulate(val, "EnableCassandraConnector", &d.EnableCassandraConnector) - delete(rawMsg, key) - case "enableFreeTier": - err = unpopulate(val, "EnableFreeTier", &d.EnableFreeTier) - delete(rawMsg, key) - case "enableMaterializedViews": - err = unpopulate(val, "EnableMaterializedViews", &d.EnableMaterializedViews) - delete(rawMsg, key) - case "enableMultipleWriteLocations": - err = unpopulate(val, "EnableMultipleWriteLocations", &d.EnableMultipleWriteLocations) - delete(rawMsg, key) - case "enablePartitionMerge": - err = unpopulate(val, "EnablePartitionMerge", &d.EnablePartitionMerge) - delete(rawMsg, key) - case "ipRules": - err = unpopulate(val, "IPRules", &d.IPRules) - delete(rawMsg, key) - case "isVirtualNetworkFilterEnabled": - err = unpopulate(val, "IsVirtualNetworkFilterEnabled", &d.IsVirtualNetworkFilterEnabled) - delete(rawMsg, key) - case "keyVaultKeyUri": - err = unpopulate(val, "KeyVaultKeyURI", &d.KeyVaultKeyURI) - delete(rawMsg, key) - case "keysMetadata": - err = unpopulate(val, "KeysMetadata", &d.KeysMetadata) - delete(rawMsg, key) - case "locations": - err = unpopulate(val, "Locations", &d.Locations) - delete(rawMsg, key) - case "minimalTlsVersion": - err = unpopulate(val, "MinimalTLSVersion", &d.MinimalTLSVersion) - delete(rawMsg, key) - case "networkAclBypass": - err = unpopulate(val, "NetworkACLBypass", &d.NetworkACLBypass) - delete(rawMsg, key) - case "networkAclBypassResourceIds": - err = unpopulate(val, "NetworkACLBypassResourceIDs", &d.NetworkACLBypassResourceIDs) - delete(rawMsg, key) - case "publicNetworkAccess": - err = unpopulate(val, "PublicNetworkAccess", &d.PublicNetworkAccess) - delete(rawMsg, key) - case "restoreParameters": - err = unpopulate(val, "RestoreParameters", &d.RestoreParameters) - delete(rawMsg, key) - case "virtualNetworkRules": - err = unpopulate(val, "VirtualNetworkRules", &d.VirtualNetworkRules) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountGetProperties. -func (d DatabaseAccountGetProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "apiProperties", d.APIProperties) - populate(objectMap, "analyticalStorageConfiguration", d.AnalyticalStorageConfiguration) - populate(objectMap, "backupPolicy", d.BackupPolicy) - populate(objectMap, "capabilities", d.Capabilities) - populate(objectMap, "capacity", d.Capacity) - populate(objectMap, "connectorOffer", d.ConnectorOffer) - populate(objectMap, "consistencyPolicy", d.ConsistencyPolicy) - populate(objectMap, "cors", d.Cors) - populate(objectMap, "createMode", d.CreateMode) - objectMap["databaseAccountOfferType"] = "Standard" - populate(objectMap, "defaultIdentity", d.DefaultIdentity) - populate(objectMap, "diagnosticLogSettings", d.DiagnosticLogSettings) - populate(objectMap, "disableKeyBasedMetadataWriteAccess", d.DisableKeyBasedMetadataWriteAccess) - populate(objectMap, "disableLocalAuth", d.DisableLocalAuth) - populate(objectMap, "documentEndpoint", d.DocumentEndpoint) - populate(objectMap, "enableAnalyticalStorage", d.EnableAnalyticalStorage) - populate(objectMap, "enableAutomaticFailover", d.EnableAutomaticFailover) - populate(objectMap, "enableBurstCapacity", d.EnableBurstCapacity) - populate(objectMap, "enableCassandraConnector", d.EnableCassandraConnector) - populate(objectMap, "enableFreeTier", d.EnableFreeTier) - populate(objectMap, "enableMaterializedViews", d.EnableMaterializedViews) - populate(objectMap, "enableMultipleWriteLocations", d.EnableMultipleWriteLocations) - populate(objectMap, "enablePartitionMerge", d.EnablePartitionMerge) - populate(objectMap, "failoverPolicies", d.FailoverPolicies) - populate(objectMap, "ipRules", d.IPRules) - populate(objectMap, "instanceId", d.InstanceID) - populate(objectMap, "isVirtualNetworkFilterEnabled", d.IsVirtualNetworkFilterEnabled) - populate(objectMap, "keyVaultKeyUri", d.KeyVaultKeyURI) - populate(objectMap, "keysMetadata", d.KeysMetadata) - populate(objectMap, "locations", d.Locations) - populate(objectMap, "minimalTlsVersion", d.MinimalTLSVersion) - populate(objectMap, "networkAclBypass", d.NetworkACLBypass) - populate(objectMap, "networkAclBypassResourceIds", d.NetworkACLBypassResourceIDs) - populate(objectMap, "privateEndpointConnections", d.PrivateEndpointConnections) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "publicNetworkAccess", d.PublicNetworkAccess) - populate(objectMap, "readLocations", d.ReadLocations) - populate(objectMap, "restoreParameters", d.RestoreParameters) - populate(objectMap, "virtualNetworkRules", d.VirtualNetworkRules) - populate(objectMap, "writeLocations", d.WriteLocations) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountGetProperties. -func (d *DatabaseAccountGetProperties) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "apiProperties": - err = unpopulate(val, "APIProperties", &d.APIProperties) - delete(rawMsg, key) - case "analyticalStorageConfiguration": - err = unpopulate(val, "AnalyticalStorageConfiguration", &d.AnalyticalStorageConfiguration) - delete(rawMsg, key) - case "backupPolicy": - d.BackupPolicy, err = unmarshalBackupPolicyClassification(val) - delete(rawMsg, key) - case "capabilities": - err = unpopulate(val, "Capabilities", &d.Capabilities) - delete(rawMsg, key) - case "capacity": - err = unpopulate(val, "Capacity", &d.Capacity) - delete(rawMsg, key) - case "connectorOffer": - err = unpopulate(val, "ConnectorOffer", &d.ConnectorOffer) - delete(rawMsg, key) - case "consistencyPolicy": - err = unpopulate(val, "ConsistencyPolicy", &d.ConsistencyPolicy) - delete(rawMsg, key) - case "cors": - err = unpopulate(val, "Cors", &d.Cors) - delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &d.CreateMode) - delete(rawMsg, key) - case "databaseAccountOfferType": - err = unpopulate(val, "DatabaseAccountOfferType", &d.DatabaseAccountOfferType) - delete(rawMsg, key) - case "defaultIdentity": - err = unpopulate(val, "DefaultIdentity", &d.DefaultIdentity) - delete(rawMsg, key) - case "diagnosticLogSettings": - err = unpopulate(val, "DiagnosticLogSettings", &d.DiagnosticLogSettings) - delete(rawMsg, key) - case "disableKeyBasedMetadataWriteAccess": - err = unpopulate(val, "DisableKeyBasedMetadataWriteAccess", &d.DisableKeyBasedMetadataWriteAccess) - delete(rawMsg, key) - case "disableLocalAuth": - err = unpopulate(val, "DisableLocalAuth", &d.DisableLocalAuth) - delete(rawMsg, key) - case "documentEndpoint": - err = unpopulate(val, "DocumentEndpoint", &d.DocumentEndpoint) - delete(rawMsg, key) - case "enableAnalyticalStorage": - err = unpopulate(val, "EnableAnalyticalStorage", &d.EnableAnalyticalStorage) - delete(rawMsg, key) - case "enableAutomaticFailover": - err = unpopulate(val, "EnableAutomaticFailover", &d.EnableAutomaticFailover) - delete(rawMsg, key) - case "enableBurstCapacity": - err = unpopulate(val, "EnableBurstCapacity", &d.EnableBurstCapacity) - delete(rawMsg, key) - case "enableCassandraConnector": - err = unpopulate(val, "EnableCassandraConnector", &d.EnableCassandraConnector) - delete(rawMsg, key) - case "enableFreeTier": - err = unpopulate(val, "EnableFreeTier", &d.EnableFreeTier) - delete(rawMsg, key) - case "enableMaterializedViews": - err = unpopulate(val, "EnableMaterializedViews", &d.EnableMaterializedViews) - delete(rawMsg, key) - case "enableMultipleWriteLocations": - err = unpopulate(val, "EnableMultipleWriteLocations", &d.EnableMultipleWriteLocations) - delete(rawMsg, key) - case "enablePartitionMerge": - err = unpopulate(val, "EnablePartitionMerge", &d.EnablePartitionMerge) - delete(rawMsg, key) - case "failoverPolicies": - err = unpopulate(val, "FailoverPolicies", &d.FailoverPolicies) - delete(rawMsg, key) - case "ipRules": - err = unpopulate(val, "IPRules", &d.IPRules) - delete(rawMsg, key) - case "instanceId": - err = unpopulate(val, "InstanceID", &d.InstanceID) - delete(rawMsg, key) - case "isVirtualNetworkFilterEnabled": - err = unpopulate(val, "IsVirtualNetworkFilterEnabled", &d.IsVirtualNetworkFilterEnabled) - delete(rawMsg, key) - case "keyVaultKeyUri": - err = unpopulate(val, "KeyVaultKeyURI", &d.KeyVaultKeyURI) - delete(rawMsg, key) - case "keysMetadata": - err = unpopulate(val, "KeysMetadata", &d.KeysMetadata) - delete(rawMsg, key) - case "locations": - err = unpopulate(val, "Locations", &d.Locations) - delete(rawMsg, key) - case "minimalTlsVersion": - err = unpopulate(val, "MinimalTLSVersion", &d.MinimalTLSVersion) - delete(rawMsg, key) - case "networkAclBypass": - err = unpopulate(val, "NetworkACLBypass", &d.NetworkACLBypass) - delete(rawMsg, key) - case "networkAclBypassResourceIds": - err = unpopulate(val, "NetworkACLBypassResourceIDs", &d.NetworkACLBypassResourceIDs) - delete(rawMsg, key) - case "privateEndpointConnections": - err = unpopulate(val, "PrivateEndpointConnections", &d.PrivateEndpointConnections) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) - delete(rawMsg, key) - case "publicNetworkAccess": - err = unpopulate(val, "PublicNetworkAccess", &d.PublicNetworkAccess) - delete(rawMsg, key) - case "readLocations": - err = unpopulate(val, "ReadLocations", &d.ReadLocations) - delete(rawMsg, key) - case "restoreParameters": - err = unpopulate(val, "RestoreParameters", &d.RestoreParameters) - delete(rawMsg, key) - case "virtualNetworkRules": - err = unpopulate(val, "VirtualNetworkRules", &d.VirtualNetworkRules) - delete(rawMsg, key) - case "writeLocations": - err = unpopulate(val, "WriteLocations", &d.WriteLocations) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountGetResults. -func (d DatabaseAccountGetResults) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", d.ID) - populate(objectMap, "identity", d.Identity) - populate(objectMap, "kind", d.Kind) - populate(objectMap, "location", d.Location) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "systemData", d.SystemData) - populate(objectMap, "tags", d.Tags) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountGetResults. -func (d *DatabaseAccountGetResults) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &d.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &d.Identity) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &d.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &d.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &d.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &d.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountKeysMetadata. -func (d DatabaseAccountKeysMetadata) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "primaryMasterKey", d.PrimaryMasterKey) - populate(objectMap, "primaryReadonlyMasterKey", d.PrimaryReadonlyMasterKey) - populate(objectMap, "secondaryMasterKey", d.SecondaryMasterKey) - populate(objectMap, "secondaryReadonlyMasterKey", d.SecondaryReadonlyMasterKey) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountKeysMetadata. -func (d *DatabaseAccountKeysMetadata) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "primaryMasterKey": - err = unpopulate(val, "PrimaryMasterKey", &d.PrimaryMasterKey) - delete(rawMsg, key) - case "primaryReadonlyMasterKey": - err = unpopulate(val, "PrimaryReadonlyMasterKey", &d.PrimaryReadonlyMasterKey) - delete(rawMsg, key) - case "secondaryMasterKey": - err = unpopulate(val, "SecondaryMasterKey", &d.SecondaryMasterKey) - delete(rawMsg, key) - case "secondaryReadonlyMasterKey": - err = unpopulate(val, "SecondaryReadonlyMasterKey", &d.SecondaryReadonlyMasterKey) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountListConnectionStringsResult. -func (d DatabaseAccountListConnectionStringsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "connectionStrings", d.ConnectionStrings) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountListConnectionStringsResult. -func (d *DatabaseAccountListConnectionStringsResult) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "connectionStrings": - err = unpopulate(val, "ConnectionStrings", &d.ConnectionStrings) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountListKeysResult. -func (d DatabaseAccountListKeysResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "primaryMasterKey", d.PrimaryMasterKey) - populate(objectMap, "primaryReadonlyMasterKey", d.PrimaryReadonlyMasterKey) - populate(objectMap, "secondaryMasterKey", d.SecondaryMasterKey) - populate(objectMap, "secondaryReadonlyMasterKey", d.SecondaryReadonlyMasterKey) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountListKeysResult. -func (d *DatabaseAccountListKeysResult) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "primaryMasterKey": - err = unpopulate(val, "PrimaryMasterKey", &d.PrimaryMasterKey) - delete(rawMsg, key) - case "primaryReadonlyMasterKey": - err = unpopulate(val, "PrimaryReadonlyMasterKey", &d.PrimaryReadonlyMasterKey) - delete(rawMsg, key) - case "secondaryMasterKey": - err = unpopulate(val, "SecondaryMasterKey", &d.SecondaryMasterKey) - delete(rawMsg, key) - case "secondaryReadonlyMasterKey": - err = unpopulate(val, "SecondaryReadonlyMasterKey", &d.SecondaryReadonlyMasterKey) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountListReadOnlyKeysResult. -func (d DatabaseAccountListReadOnlyKeysResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "primaryReadonlyMasterKey", d.PrimaryReadonlyMasterKey) - populate(objectMap, "secondaryReadonlyMasterKey", d.SecondaryReadonlyMasterKey) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountListReadOnlyKeysResult. -func (d *DatabaseAccountListReadOnlyKeysResult) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "primaryReadonlyMasterKey": - err = unpopulate(val, "PrimaryReadonlyMasterKey", &d.PrimaryReadonlyMasterKey) - delete(rawMsg, key) - case "secondaryReadonlyMasterKey": - err = unpopulate(val, "SecondaryReadonlyMasterKey", &d.SecondaryReadonlyMasterKey) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountRegenerateKeyParameters. -func (d DatabaseAccountRegenerateKeyParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "keyKind", d.KeyKind) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountRegenerateKeyParameters. -func (d *DatabaseAccountRegenerateKeyParameters) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "keyKind": - err = unpopulate(val, "KeyKind", &d.KeyKind) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountUpdateParameters. -func (d DatabaseAccountUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "identity", d.Identity) - populate(objectMap, "location", d.Location) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "tags", d.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountUpdateParameters. -func (d *DatabaseAccountUpdateParameters) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "identity": - err = unpopulate(val, "Identity", &d.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &d.Location) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &d.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountUpdateProperties. -func (d DatabaseAccountUpdateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "apiProperties", d.APIProperties) - populate(objectMap, "analyticalStorageConfiguration", d.AnalyticalStorageConfiguration) - populate(objectMap, "backupPolicy", d.BackupPolicy) - populate(objectMap, "capabilities", d.Capabilities) - populate(objectMap, "capacity", d.Capacity) - populate(objectMap, "connectorOffer", d.ConnectorOffer) - populate(objectMap, "consistencyPolicy", d.ConsistencyPolicy) - populate(objectMap, "cors", d.Cors) - populate(objectMap, "defaultIdentity", d.DefaultIdentity) - populate(objectMap, "diagnosticLogSettings", d.DiagnosticLogSettings) - populate(objectMap, "disableKeyBasedMetadataWriteAccess", d.DisableKeyBasedMetadataWriteAccess) - populate(objectMap, "disableLocalAuth", d.DisableLocalAuth) - populate(objectMap, "enableAnalyticalStorage", d.EnableAnalyticalStorage) - populate(objectMap, "enableAutomaticFailover", d.EnableAutomaticFailover) - populate(objectMap, "enableBurstCapacity", d.EnableBurstCapacity) - populate(objectMap, "enableCassandraConnector", d.EnableCassandraConnector) - populate(objectMap, "enableFreeTier", d.EnableFreeTier) - populate(objectMap, "enableMaterializedViews", d.EnableMaterializedViews) - populate(objectMap, "enableMultipleWriteLocations", d.EnableMultipleWriteLocations) - populate(objectMap, "enablePartitionMerge", d.EnablePartitionMerge) - populate(objectMap, "ipRules", d.IPRules) - populate(objectMap, "isVirtualNetworkFilterEnabled", d.IsVirtualNetworkFilterEnabled) - populate(objectMap, "keyVaultKeyUri", d.KeyVaultKeyURI) - populate(objectMap, "keysMetadata", d.KeysMetadata) - populate(objectMap, "locations", d.Locations) - populate(objectMap, "minimalTlsVersion", d.MinimalTLSVersion) - populate(objectMap, "networkAclBypass", d.NetworkACLBypass) - populate(objectMap, "networkAclBypassResourceIds", d.NetworkACLBypassResourceIDs) - populate(objectMap, "publicNetworkAccess", d.PublicNetworkAccess) - populate(objectMap, "virtualNetworkRules", d.VirtualNetworkRules) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountUpdateProperties. -func (d *DatabaseAccountUpdateProperties) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "apiProperties": - err = unpopulate(val, "APIProperties", &d.APIProperties) - delete(rawMsg, key) - case "analyticalStorageConfiguration": - err = unpopulate(val, "AnalyticalStorageConfiguration", &d.AnalyticalStorageConfiguration) - delete(rawMsg, key) - case "backupPolicy": - d.BackupPolicy, err = unmarshalBackupPolicyClassification(val) - delete(rawMsg, key) - case "capabilities": - err = unpopulate(val, "Capabilities", &d.Capabilities) - delete(rawMsg, key) - case "capacity": - err = unpopulate(val, "Capacity", &d.Capacity) - delete(rawMsg, key) - case "connectorOffer": - err = unpopulate(val, "ConnectorOffer", &d.ConnectorOffer) - delete(rawMsg, key) - case "consistencyPolicy": - err = unpopulate(val, "ConsistencyPolicy", &d.ConsistencyPolicy) - delete(rawMsg, key) - case "cors": - err = unpopulate(val, "Cors", &d.Cors) - delete(rawMsg, key) - case "defaultIdentity": - err = unpopulate(val, "DefaultIdentity", &d.DefaultIdentity) - delete(rawMsg, key) - case "diagnosticLogSettings": - err = unpopulate(val, "DiagnosticLogSettings", &d.DiagnosticLogSettings) - delete(rawMsg, key) - case "disableKeyBasedMetadataWriteAccess": - err = unpopulate(val, "DisableKeyBasedMetadataWriteAccess", &d.DisableKeyBasedMetadataWriteAccess) - delete(rawMsg, key) - case "disableLocalAuth": - err = unpopulate(val, "DisableLocalAuth", &d.DisableLocalAuth) - delete(rawMsg, key) - case "enableAnalyticalStorage": - err = unpopulate(val, "EnableAnalyticalStorage", &d.EnableAnalyticalStorage) - delete(rawMsg, key) - case "enableAutomaticFailover": - err = unpopulate(val, "EnableAutomaticFailover", &d.EnableAutomaticFailover) - delete(rawMsg, key) - case "enableBurstCapacity": - err = unpopulate(val, "EnableBurstCapacity", &d.EnableBurstCapacity) - delete(rawMsg, key) - case "enableCassandraConnector": - err = unpopulate(val, "EnableCassandraConnector", &d.EnableCassandraConnector) - delete(rawMsg, key) - case "enableFreeTier": - err = unpopulate(val, "EnableFreeTier", &d.EnableFreeTier) - delete(rawMsg, key) - case "enableMaterializedViews": - err = unpopulate(val, "EnableMaterializedViews", &d.EnableMaterializedViews) - delete(rawMsg, key) - case "enableMultipleWriteLocations": - err = unpopulate(val, "EnableMultipleWriteLocations", &d.EnableMultipleWriteLocations) - delete(rawMsg, key) - case "enablePartitionMerge": - err = unpopulate(val, "EnablePartitionMerge", &d.EnablePartitionMerge) - delete(rawMsg, key) - case "ipRules": - err = unpopulate(val, "IPRules", &d.IPRules) - delete(rawMsg, key) - case "isVirtualNetworkFilterEnabled": - err = unpopulate(val, "IsVirtualNetworkFilterEnabled", &d.IsVirtualNetworkFilterEnabled) - delete(rawMsg, key) - case "keyVaultKeyUri": - err = unpopulate(val, "KeyVaultKeyURI", &d.KeyVaultKeyURI) - delete(rawMsg, key) - case "keysMetadata": - err = unpopulate(val, "KeysMetadata", &d.KeysMetadata) - delete(rawMsg, key) - case "locations": - err = unpopulate(val, "Locations", &d.Locations) - delete(rawMsg, key) - case "minimalTlsVersion": - err = unpopulate(val, "MinimalTLSVersion", &d.MinimalTLSVersion) - delete(rawMsg, key) - case "networkAclBypass": - err = unpopulate(val, "NetworkACLBypass", &d.NetworkACLBypass) - delete(rawMsg, key) - case "networkAclBypassResourceIds": - err = unpopulate(val, "NetworkACLBypassResourceIDs", &d.NetworkACLBypassResourceIDs) - delete(rawMsg, key) - case "publicNetworkAccess": - err = unpopulate(val, "PublicNetworkAccess", &d.PublicNetworkAccess) - delete(rawMsg, key) - case "virtualNetworkRules": - err = unpopulate(val, "VirtualNetworkRules", &d.VirtualNetworkRules) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountsListResult. -func (d DatabaseAccountsListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", d.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountsListResult. -func (d *DatabaseAccountsListResult) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &d.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DatabaseRestoreResource. -func (d DatabaseRestoreResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "collectionNames", d.CollectionNames) - populate(objectMap, "databaseName", d.DatabaseName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseRestoreResource. -func (d *DatabaseRestoreResource) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "collectionNames": - err = unpopulate(val, "CollectionNames", &d.CollectionNames) - delete(rawMsg, key) - case "databaseName": - err = unpopulate(val, "DatabaseName", &d.DatabaseName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DiagnosticLogSettings. -func (d DiagnosticLogSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enableFullTextQuery", d.EnableFullTextQuery) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticLogSettings. -func (d *DiagnosticLogSettings) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enableFullTextQuery": - err = unpopulate(val, "EnableFullTextQuery", &d.EnableFullTextQuery) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ErrorResponse. -func (e ErrorResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "code", e.Code) - populate(objectMap, "message", e.Message) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse. -func (e *ErrorResponse) 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 "code": - err = unpopulate(val, "Code", &e.Code) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &e.Message) - 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 ExcludedPath. -func (e ExcludedPath) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "path", e.Path) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExcludedPath. -func (e *ExcludedPath) 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 "path": - err = unpopulate(val, "Path", &e.Path) - 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 ExtendedResourceProperties. -func (e ExtendedResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "_etag", e.Etag) - populate(objectMap, "_rid", e.Rid) - populate(objectMap, "_ts", e.Ts) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedResourceProperties. -func (e *ExtendedResourceProperties) 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 "_etag": - err = unpopulate(val, "Etag", &e.Etag) - delete(rawMsg, key) - case "_rid": - err = unpopulate(val, "Rid", &e.Rid) - delete(rawMsg, key) - case "_ts": - err = unpopulate(val, "Ts", &e.Ts) - 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 FailoverPolicies. -func (f FailoverPolicies) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "failoverPolicies", f.FailoverPolicies) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FailoverPolicies. -func (f *FailoverPolicies) 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", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "failoverPolicies": - err = unpopulate(val, "FailoverPolicies", &f.FailoverPolicies) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FailoverPolicy. -func (f FailoverPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "failoverPriority", f.FailoverPriority) - populate(objectMap, "id", f.ID) - populate(objectMap, "locationName", f.LocationName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FailoverPolicy. -func (f *FailoverPolicy) 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", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "failoverPriority": - err = unpopulate(val, "FailoverPriority", &f.FailoverPriority) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &f.ID) - delete(rawMsg, key) - case "locationName": - err = unpopulate(val, "LocationName", &f.LocationName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GraphAPIComputeRegionalServiceResource. -func (g GraphAPIComputeRegionalServiceResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "graphApiComputeEndpoint", g.GraphAPIComputeEndpoint) - populate(objectMap, "location", g.Location) - populate(objectMap, "name", g.Name) - populate(objectMap, "status", g.Status) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GraphAPIComputeRegionalServiceResource. -func (g *GraphAPIComputeRegionalServiceResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountGetResults. +func (d *DatabaseAccountGetResults) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "graphApiComputeEndpoint": - err = unpopulate(val, "GraphAPIComputeEndpoint", &g.GraphAPIComputeEndpoint) + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &d.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &g.Location) + err = unpopulate(val, "Location", &d.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &g.Name) + err = unpopulate(val, "Name", &d.Name) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &g.Status) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &d.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GraphAPIComputeServiceResource. -func (g GraphAPIComputeServiceResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountKeysMetadata. +func (d DatabaseAccountKeysMetadata) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "properties", g.Properties) + populate(objectMap, "primaryMasterKey", d.PrimaryMasterKey) + populate(objectMap, "primaryReadonlyMasterKey", d.PrimaryReadonlyMasterKey) + populate(objectMap, "secondaryMasterKey", d.SecondaryMasterKey) + populate(objectMap, "secondaryReadonlyMasterKey", d.SecondaryReadonlyMasterKey) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GraphAPIComputeServiceResource. -func (g *GraphAPIComputeServiceResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountKeysMetadata. +func (d *DatabaseAccountKeysMetadata) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "properties": - err = unpopulate(val, "Properties", &g.Properties) + case "primaryMasterKey": + err = unpopulate(val, "PrimaryMasterKey", &d.PrimaryMasterKey) + delete(rawMsg, key) + case "primaryReadonlyMasterKey": + err = unpopulate(val, "PrimaryReadonlyMasterKey", &d.PrimaryReadonlyMasterKey) + delete(rawMsg, key) + case "secondaryMasterKey": + err = unpopulate(val, "SecondaryMasterKey", &d.SecondaryMasterKey) + delete(rawMsg, key) + case "secondaryReadonlyMasterKey": + err = unpopulate(val, "SecondaryReadonlyMasterKey", &d.SecondaryReadonlyMasterKey) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GraphAPIComputeServiceResourceProperties. -func (g GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountListConnectionStringsResult. +func (d DatabaseAccountListConnectionStringsResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", g.CreationTime) - populate(objectMap, "graphApiComputeEndpoint", g.GraphAPIComputeEndpoint) - populate(objectMap, "instanceCount", g.InstanceCount) - populate(objectMap, "instanceSize", g.InstanceSize) - populate(objectMap, "locations", g.Locations) - objectMap["serviceType"] = ServiceTypeGraphAPICompute - populate(objectMap, "status", g.Status) - if g.AdditionalProperties != nil { - for key, val := range g.AdditionalProperties { - objectMap[key] = val - } - } + populate(objectMap, "connectionStrings", d.ConnectionStrings) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GraphAPIComputeServiceResourceProperties. -func (g *GraphAPIComputeServiceResourceProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountListConnectionStringsResult. +func (d *DatabaseAccountListConnectionStringsResult) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &g.CreationTime) - delete(rawMsg, key) - case "graphApiComputeEndpoint": - err = unpopulate(val, "GraphAPIComputeEndpoint", &g.GraphAPIComputeEndpoint) - delete(rawMsg, key) - case "instanceCount": - err = unpopulate(val, "InstanceCount", &g.InstanceCount) - delete(rawMsg, key) - case "instanceSize": - err = unpopulate(val, "InstanceSize", &g.InstanceSize) - delete(rawMsg, key) - case "locations": - err = unpopulate(val, "Locations", &g.Locations) - delete(rawMsg, key) - case "serviceType": - err = unpopulate(val, "ServiceType", &g.ServiceType) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &g.Status) - delete(rawMsg, key) - default: - if g.AdditionalProperties == nil { - g.AdditionalProperties = map[string]any{} - } - if val != nil { - var aux any - err = json.Unmarshal(val, &aux) - g.AdditionalProperties[key] = aux - } + case "connectionStrings": + err = unpopulate(val, "ConnectionStrings", &d.ConnectionStrings) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GraphResource. -func (g GraphResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountListKeysResult. +func (d DatabaseAccountListKeysResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", g.ID) + populate(objectMap, "primaryMasterKey", d.PrimaryMasterKey) + populate(objectMap, "primaryReadonlyMasterKey", d.PrimaryReadonlyMasterKey) + populate(objectMap, "secondaryMasterKey", d.SecondaryMasterKey) + populate(objectMap, "secondaryReadonlyMasterKey", d.SecondaryReadonlyMasterKey) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GraphResource. -func (g *GraphResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountListKeysResult. +func (d *DatabaseAccountListKeysResult) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &g.ID) + case "primaryMasterKey": + err = unpopulate(val, "PrimaryMasterKey", &d.PrimaryMasterKey) + delete(rawMsg, key) + case "primaryReadonlyMasterKey": + err = unpopulate(val, "PrimaryReadonlyMasterKey", &d.PrimaryReadonlyMasterKey) + delete(rawMsg, key) + case "secondaryMasterKey": + err = unpopulate(val, "SecondaryMasterKey", &d.SecondaryMasterKey) + delete(rawMsg, key) + case "secondaryReadonlyMasterKey": + err = unpopulate(val, "SecondaryReadonlyMasterKey", &d.SecondaryReadonlyMasterKey) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GraphResourceCreateUpdateParameters. -func (g GraphResourceCreateUpdateParameters) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountListReadOnlyKeysResult. +func (d DatabaseAccountListReadOnlyKeysResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", g.ID) - populate(objectMap, "identity", g.Identity) - populate(objectMap, "location", g.Location) - populate(objectMap, "name", g.Name) - populate(objectMap, "properties", g.Properties) - populate(objectMap, "tags", g.Tags) - populate(objectMap, "type", g.Type) + populate(objectMap, "primaryReadonlyMasterKey", d.PrimaryReadonlyMasterKey) + populate(objectMap, "secondaryReadonlyMasterKey", d.SecondaryReadonlyMasterKey) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GraphResourceCreateUpdateParameters. -func (g *GraphResourceCreateUpdateParameters) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountListReadOnlyKeysResult. +func (d *DatabaseAccountListReadOnlyKeysResult) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &g.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &g.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &g.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &g.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &g.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &g.Tags) + case "primaryReadonlyMasterKey": + err = unpopulate(val, "PrimaryReadonlyMasterKey", &d.PrimaryReadonlyMasterKey) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &g.Type) + case "secondaryReadonlyMasterKey": + err = unpopulate(val, "SecondaryReadonlyMasterKey", &d.SecondaryReadonlyMasterKey) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GraphResourceCreateUpdateProperties. -func (g GraphResourceCreateUpdateProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountRegenerateKeyParameters. +func (d DatabaseAccountRegenerateKeyParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "options", g.Options) - populate(objectMap, "resource", g.Resource) + populate(objectMap, "keyKind", d.KeyKind) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GraphResourceCreateUpdateProperties. -func (g *GraphResourceCreateUpdateProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountRegenerateKeyParameters. +func (d *DatabaseAccountRegenerateKeyParameters) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "options": - err = unpopulate(val, "Options", &g.Options) - delete(rawMsg, key) - case "resource": - err = unpopulate(val, "Resource", &g.Resource) + case "keyKind": + err = unpopulate(val, "KeyKind", &d.KeyKind) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GraphResourceGetProperties. -func (g GraphResourceGetProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountUpdateParameters. +func (d DatabaseAccountUpdateParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "options", g.Options) - populate(objectMap, "resource", g.Resource) + populate(objectMap, "identity", d.Identity) + populate(objectMap, "location", d.Location) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "tags", d.Tags) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GraphResourceGetProperties. -func (g *GraphResourceGetProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountUpdateParameters. +func (d *DatabaseAccountUpdateParameters) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "options": - err = unpopulate(val, "Options", &g.Options) + case "identity": + err = unpopulate(val, "Identity", &d.Identity) delete(rawMsg, key) - case "resource": - err = unpopulate(val, "Resource", &g.Resource) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GraphResourceGetPropertiesOptions. -func (g GraphResourceGetPropertiesOptions) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountUpdateProperties. +func (d DatabaseAccountUpdateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "autoscaleSettings", g.AutoscaleSettings) - populate(objectMap, "throughput", g.Throughput) + populate(objectMap, "apiProperties", d.APIProperties) + populate(objectMap, "analyticalStorageConfiguration", d.AnalyticalStorageConfiguration) + populate(objectMap, "backupPolicy", d.BackupPolicy) + populate(objectMap, "capabilities", d.Capabilities) + populate(objectMap, "capacity", d.Capacity) + populate(objectMap, "connectorOffer", d.ConnectorOffer) + populate(objectMap, "consistencyPolicy", d.ConsistencyPolicy) + populate(objectMap, "cors", d.Cors) + populate(objectMap, "defaultIdentity", d.DefaultIdentity) + populate(objectMap, "disableKeyBasedMetadataWriteAccess", d.DisableKeyBasedMetadataWriteAccess) + populate(objectMap, "disableLocalAuth", d.DisableLocalAuth) + populate(objectMap, "enableAnalyticalStorage", d.EnableAnalyticalStorage) + populate(objectMap, "enableAutomaticFailover", d.EnableAutomaticFailover) + populate(objectMap, "enableCassandraConnector", d.EnableCassandraConnector) + populate(objectMap, "enableFreeTier", d.EnableFreeTier) + populate(objectMap, "enableMultipleWriteLocations", d.EnableMultipleWriteLocations) + populate(objectMap, "enablePartitionMerge", d.EnablePartitionMerge) + populate(objectMap, "ipRules", d.IPRules) + populate(objectMap, "isVirtualNetworkFilterEnabled", d.IsVirtualNetworkFilterEnabled) + populate(objectMap, "keyVaultKeyUri", d.KeyVaultKeyURI) + populate(objectMap, "keysMetadata", d.KeysMetadata) + populate(objectMap, "locations", d.Locations) + populate(objectMap, "minimalTlsVersion", d.MinimalTLSVersion) + populate(objectMap, "networkAclBypass", d.NetworkACLBypass) + populate(objectMap, "networkAclBypassResourceIds", d.NetworkACLBypassResourceIDs) + populate(objectMap, "publicNetworkAccess", d.PublicNetworkAccess) + populate(objectMap, "virtualNetworkRules", d.VirtualNetworkRules) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GraphResourceGetPropertiesOptions. -func (g *GraphResourceGetPropertiesOptions) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountUpdateProperties. +func (d *DatabaseAccountUpdateProperties) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "autoscaleSettings": - err = unpopulate(val, "AutoscaleSettings", &g.AutoscaleSettings) + case "apiProperties": + err = unpopulate(val, "APIProperties", &d.APIProperties) delete(rawMsg, key) - case "throughput": - err = unpopulate(val, "Throughput", &g.Throughput) + case "analyticalStorageConfiguration": + err = unpopulate(val, "AnalyticalStorageConfiguration", &d.AnalyticalStorageConfiguration) delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GraphResourceGetPropertiesResource. -func (g GraphResourceGetPropertiesResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", g.ID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GraphResourceGetPropertiesResource. -func (g *GraphResourceGetPropertiesResource) 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", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &g.ID) + case "backupPolicy": + d.BackupPolicy, err = unmarshalBackupPolicyClassification(val) + delete(rawMsg, key) + case "capabilities": + err = unpopulate(val, "Capabilities", &d.Capabilities) + delete(rawMsg, key) + case "capacity": + err = unpopulate(val, "Capacity", &d.Capacity) + delete(rawMsg, key) + case "connectorOffer": + err = unpopulate(val, "ConnectorOffer", &d.ConnectorOffer) + delete(rawMsg, key) + case "consistencyPolicy": + err = unpopulate(val, "ConsistencyPolicy", &d.ConsistencyPolicy) + delete(rawMsg, key) + case "cors": + err = unpopulate(val, "Cors", &d.Cors) + delete(rawMsg, key) + case "defaultIdentity": + err = unpopulate(val, "DefaultIdentity", &d.DefaultIdentity) + delete(rawMsg, key) + case "disableKeyBasedMetadataWriteAccess": + err = unpopulate(val, "DisableKeyBasedMetadataWriteAccess", &d.DisableKeyBasedMetadataWriteAccess) + delete(rawMsg, key) + case "disableLocalAuth": + err = unpopulate(val, "DisableLocalAuth", &d.DisableLocalAuth) + delete(rawMsg, key) + case "enableAnalyticalStorage": + err = unpopulate(val, "EnableAnalyticalStorage", &d.EnableAnalyticalStorage) + delete(rawMsg, key) + case "enableAutomaticFailover": + err = unpopulate(val, "EnableAutomaticFailover", &d.EnableAutomaticFailover) + delete(rawMsg, key) + case "enableCassandraConnector": + err = unpopulate(val, "EnableCassandraConnector", &d.EnableCassandraConnector) + delete(rawMsg, key) + case "enableFreeTier": + err = unpopulate(val, "EnableFreeTier", &d.EnableFreeTier) + delete(rawMsg, key) + case "enableMultipleWriteLocations": + err = unpopulate(val, "EnableMultipleWriteLocations", &d.EnableMultipleWriteLocations) + delete(rawMsg, key) + case "enablePartitionMerge": + err = unpopulate(val, "EnablePartitionMerge", &d.EnablePartitionMerge) + delete(rawMsg, key) + case "ipRules": + err = unpopulate(val, "IPRules", &d.IPRules) + delete(rawMsg, key) + case "isVirtualNetworkFilterEnabled": + err = unpopulate(val, "IsVirtualNetworkFilterEnabled", &d.IsVirtualNetworkFilterEnabled) + delete(rawMsg, key) + case "keyVaultKeyUri": + err = unpopulate(val, "KeyVaultKeyURI", &d.KeyVaultKeyURI) + delete(rawMsg, key) + case "keysMetadata": + err = unpopulate(val, "KeysMetadata", &d.KeysMetadata) + delete(rawMsg, key) + case "locations": + err = unpopulate(val, "Locations", &d.Locations) + delete(rawMsg, key) + case "minimalTlsVersion": + err = unpopulate(val, "MinimalTLSVersion", &d.MinimalTLSVersion) + delete(rawMsg, key) + case "networkAclBypass": + err = unpopulate(val, "NetworkACLBypass", &d.NetworkACLBypass) + delete(rawMsg, key) + case "networkAclBypassResourceIds": + err = unpopulate(val, "NetworkACLBypassResourceIDs", &d.NetworkACLBypassResourceIDs) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &d.PublicNetworkAccess) + delete(rawMsg, key) + case "virtualNetworkRules": + err = unpopulate(val, "VirtualNetworkRules", &d.VirtualNetworkRules) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GraphResourceGetResults. -func (g GraphResourceGetResults) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DatabaseAccountsListResult. +func (d DatabaseAccountsListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", g.ID) - populate(objectMap, "identity", g.Identity) - populate(objectMap, "location", g.Location) - populate(objectMap, "name", g.Name) - populate(objectMap, "properties", g.Properties) - populate(objectMap, "tags", g.Tags) - populate(objectMap, "type", g.Type) + populate(objectMap, "value", d.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GraphResourceGetResults. -func (g *GraphResourceGetResults) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountsListResult. +func (d *DatabaseAccountsListResult) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &g.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &g.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &g.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &g.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &g.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &g.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &g.Type) + case "value": + err = unpopulate(val, "Value", &d.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GraphResourcesListResult. -func (g GraphResourcesListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DatabaseRestoreResource. +func (d DatabaseRestoreResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", g.Value) + populate(objectMap, "collectionNames", d.CollectionNames) + populate(objectMap, "databaseName", d.DatabaseName) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GraphResourcesListResult. -func (g *GraphResourcesListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseRestoreResource. +func (d *DatabaseRestoreResource) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &g.Value) + case "collectionNames": + err = unpopulate(val, "CollectionNames", &d.CollectionNames) + delete(rawMsg, key) + case "databaseName": + err = unpopulate(val, "DatabaseName", &d.DatabaseName) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseCreateUpdateParameters. -func (g GremlinDatabaseCreateUpdateParameters) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ErrorResponse. +func (e ErrorResponse) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", g.ID) - populate(objectMap, "identity", g.Identity) - populate(objectMap, "location", g.Location) - populate(objectMap, "name", g.Name) - populate(objectMap, "properties", g.Properties) - populate(objectMap, "tags", g.Tags) - populate(objectMap, "type", g.Type) + populate(objectMap, "code", e.Code) + populate(objectMap, "message", e.Message) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseCreateUpdateParameters. -func (g *GremlinDatabaseCreateUpdateParameters) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse. +func (e *ErrorResponse) 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", g, err) + 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", &g.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &g.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &g.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &g.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &g.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &g.Tags) + case "code": + err = unpopulate(val, "Code", &e.Code) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &g.Type) + case "message": + err = unpopulate(val, "Message", &e.Message) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", e, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseCreateUpdateProperties. -func (g GremlinDatabaseCreateUpdateProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ExcludedPath. +func (e ExcludedPath) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "options", g.Options) - populate(objectMap, "resource", g.Resource) + populate(objectMap, "path", e.Path) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseCreateUpdateProperties. -func (g *GremlinDatabaseCreateUpdateProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ExcludedPath. +func (e *ExcludedPath) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", e, err) } for key, val := range rawMsg { var err error switch key { - case "options": - err = unpopulate(val, "Options", &g.Options) - delete(rawMsg, key) - case "resource": - err = unpopulate(val, "Resource", &g.Resource) + case "path": + err = unpopulate(val, "Path", &e.Path) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", e, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseGetProperties. -func (g GremlinDatabaseGetProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ExtendedResourceProperties. +func (e ExtendedResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "options", g.Options) - populate(objectMap, "resource", g.Resource) + populate(objectMap, "_etag", e.Etag) + populate(objectMap, "_rid", e.Rid) + populate(objectMap, "_ts", e.Ts) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseGetProperties. -func (g *GremlinDatabaseGetProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedResourceProperties. +func (e *ExtendedResourceProperties) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", e, err) } for key, val := range rawMsg { var err error switch key { - case "options": - err = unpopulate(val, "Options", &g.Options) + case "_etag": + err = unpopulate(val, "Etag", &e.Etag) delete(rawMsg, key) - case "resource": - err = unpopulate(val, "Resource", &g.Resource) + case "_rid": + err = unpopulate(val, "Rid", &e.Rid) + delete(rawMsg, key) + case "_ts": + err = unpopulate(val, "Ts", &e.Ts) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", e, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseGetPropertiesOptions. -func (g GremlinDatabaseGetPropertiesOptions) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type FailoverPolicies. +func (f FailoverPolicies) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "autoscaleSettings", g.AutoscaleSettings) - populate(objectMap, "throughput", g.Throughput) + populate(objectMap, "failoverPolicies", f.FailoverPolicies) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseGetPropertiesOptions. -func (g *GremlinDatabaseGetPropertiesOptions) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FailoverPolicies. +func (f *FailoverPolicies) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } for key, val := range rawMsg { var err error switch key { - case "autoscaleSettings": - err = unpopulate(val, "AutoscaleSettings", &g.AutoscaleSettings) - delete(rawMsg, key) - case "throughput": - err = unpopulate(val, "Throughput", &g.Throughput) + case "failoverPolicies": + err = unpopulate(val, "FailoverPolicies", &f.FailoverPolicies) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseGetPropertiesResource. -func (g GremlinDatabaseGetPropertiesResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type FailoverPolicy. +func (f FailoverPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "createMode", g.CreateMode) - populate(objectMap, "_etag", g.Etag) - populate(objectMap, "id", g.ID) - populate(objectMap, "restoreParameters", g.RestoreParameters) - populate(objectMap, "_rid", g.Rid) - populate(objectMap, "_ts", g.Ts) + populate(objectMap, "failoverPriority", f.FailoverPriority) + populate(objectMap, "id", f.ID) + populate(objectMap, "locationName", f.LocationName) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseGetPropertiesResource. -func (g *GremlinDatabaseGetPropertiesResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FailoverPolicy. +func (f *FailoverPolicy) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } for key, val := range rawMsg { var err error switch key { - case "createMode": - err = unpopulate(val, "CreateMode", &g.CreateMode) - delete(rawMsg, key) - case "_etag": - err = unpopulate(val, "Etag", &g.Etag) + case "failoverPriority": + err = unpopulate(val, "FailoverPriority", &f.FailoverPriority) delete(rawMsg, key) case "id": - err = unpopulate(val, "ID", &g.ID) - delete(rawMsg, key) - case "restoreParameters": - err = unpopulate(val, "RestoreParameters", &g.RestoreParameters) - delete(rawMsg, key) - case "_rid": - err = unpopulate(val, "Rid", &g.Rid) + err = unpopulate(val, "ID", &f.ID) delete(rawMsg, key) - case "_ts": - err = unpopulate(val, "Ts", &g.Ts) + case "locationName": + err = unpopulate(val, "LocationName", &f.LocationName) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseGetResults. -func (g GremlinDatabaseGetResults) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GraphAPIComputeRegionalServiceResource. +func (g GraphAPIComputeRegionalServiceResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", g.ID) - populate(objectMap, "identity", g.Identity) + populate(objectMap, "graphApiComputeEndpoint", g.GraphAPIComputeEndpoint) populate(objectMap, "location", g.Location) populate(objectMap, "name", g.Name) - populate(objectMap, "properties", g.Properties) - populate(objectMap, "tags", g.Tags) - populate(objectMap, "type", g.Type) + populate(objectMap, "status", g.Status) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseGetResults. -func (g *GremlinDatabaseGetResults) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GraphAPIComputeRegionalServiceResource. +func (g *GraphAPIComputeRegionalServiceResource) 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", g, err) @@ -4856,11 +3458,8 @@ func (g *GremlinDatabaseGetResults) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &g.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &g.Identity) + case "graphApiComputeEndpoint": + err = unpopulate(val, "GraphAPIComputeEndpoint", &g.GraphAPIComputeEndpoint) delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &g.Location) @@ -4868,14 +3467,8 @@ func (g *GremlinDatabaseGetResults) UnmarshalJSON(data []byte) error { case "name": err = unpopulate(val, "Name", &g.Name) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &g.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &g.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &g.Type) + case "status": + err = unpopulate(val, "Status", &g.Status) delete(rawMsg, key) } if err != nil { @@ -4885,15 +3478,15 @@ func (g *GremlinDatabaseGetResults) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseListResult. -func (g GremlinDatabaseListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GraphAPIComputeServiceResource. +func (g GraphAPIComputeServiceResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", g.Value) + populate(objectMap, "properties", g.Properties) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseListResult. -func (g *GremlinDatabaseListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GraphAPIComputeServiceResource. +func (g *GraphAPIComputeServiceResource) 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", g, err) @@ -4901,8 +3494,8 @@ func (g *GremlinDatabaseListResult) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &g.Value) + case "properties": + err = unpopulate(val, "Properties", &g.Properties) delete(rawMsg, key) } if err != nil { @@ -4912,17 +3505,26 @@ func (g *GremlinDatabaseListResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseResource. -func (g GremlinDatabaseResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GraphAPIComputeServiceResourceProperties. +func (g GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "createMode", g.CreateMode) - populate(objectMap, "id", g.ID) - populate(objectMap, "restoreParameters", g.RestoreParameters) + populateTimeRFC3339(objectMap, "creationTime", g.CreationTime) + populate(objectMap, "graphApiComputeEndpoint", g.GraphAPIComputeEndpoint) + populate(objectMap, "instanceCount", g.InstanceCount) + populate(objectMap, "instanceSize", g.InstanceSize) + populate(objectMap, "locations", g.Locations) + objectMap["serviceType"] = ServiceTypeGraphAPICompute + populate(objectMap, "status", g.Status) + if g.AdditionalProperties != nil { + for key, val := range g.AdditionalProperties { + objectMap[key] = val + } + } return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseResource. -func (g *GremlinDatabaseResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GraphAPIComputeServiceResourceProperties. +func (g *GraphAPIComputeServiceResourceProperties) 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", g, err) @@ -4930,45 +3532,36 @@ func (g *GremlinDatabaseResource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "createMode": - err = unpopulate(val, "CreateMode", &g.CreateMode) + case "creationTime": + err = unpopulateTimeRFC3339(val, "CreationTime", &g.CreationTime) delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &g.ID) + case "graphApiComputeEndpoint": + err = unpopulate(val, "GraphAPIComputeEndpoint", &g.GraphAPIComputeEndpoint) delete(rawMsg, key) - case "restoreParameters": - err = unpopulate(val, "RestoreParameters", &g.RestoreParameters) + case "instanceCount": + err = unpopulate(val, "InstanceCount", &g.InstanceCount) delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseRestoreResource. -func (g GremlinDatabaseRestoreResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "databaseName", g.DatabaseName) - populate(objectMap, "graphNames", g.GraphNames) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseRestoreResource. -func (g *GremlinDatabaseRestoreResource) 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", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "databaseName": - err = unpopulate(val, "DatabaseName", &g.DatabaseName) + case "instanceSize": + err = unpopulate(val, "InstanceSize", &g.InstanceSize) delete(rawMsg, key) - case "graphNames": - err = unpopulate(val, "GraphNames", &g.GraphNames) + case "locations": + err = unpopulate(val, "Locations", &g.Locations) + delete(rawMsg, key) + case "serviceType": + err = unpopulate(val, "ServiceType", &g.ServiceType) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &g.Status) + delete(rawMsg, key) + default: + if g.AdditionalProperties == nil { + g.AdditionalProperties = map[string]any{} + } + if val != nil { + var aux any + err = json.Unmarshal(val, &aux) + g.AdditionalProperties[key] = aux + } delete(rawMsg, key) } if err != nil { @@ -4978,11 +3571,10 @@ func (g *GremlinDatabaseRestoreResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type GremlinGraphCreateUpdateParameters. -func (g GremlinGraphCreateUpdateParameters) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseCreateUpdateParameters. +func (g GremlinDatabaseCreateUpdateParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", g.ID) - populate(objectMap, "identity", g.Identity) populate(objectMap, "location", g.Location) populate(objectMap, "name", g.Name) populate(objectMap, "properties", g.Properties) @@ -4991,8 +3583,8 @@ func (g GremlinGraphCreateUpdateParameters) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinGraphCreateUpdateParameters. -func (g *GremlinGraphCreateUpdateParameters) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseCreateUpdateParameters. +func (g *GremlinDatabaseCreateUpdateParameters) 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", g, err) @@ -5003,9 +3595,6 @@ func (g *GremlinGraphCreateUpdateParameters) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &g.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &g.Identity) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &g.Location) delete(rawMsg, key) @@ -5029,16 +3618,16 @@ func (g *GremlinGraphCreateUpdateParameters) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type GremlinGraphCreateUpdateProperties. -func (g GremlinGraphCreateUpdateProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseCreateUpdateProperties. +func (g GremlinDatabaseCreateUpdateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "options", g.Options) populate(objectMap, "resource", g.Resource) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinGraphCreateUpdateProperties. -func (g *GremlinGraphCreateUpdateProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseCreateUpdateProperties. +func (g *GremlinDatabaseCreateUpdateProperties) 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", g, err) @@ -5060,16 +3649,16 @@ func (g *GremlinGraphCreateUpdateProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type GremlinGraphGetProperties. -func (g GremlinGraphGetProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseGetProperties. +func (g GremlinDatabaseGetProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "options", g.Options) populate(objectMap, "resource", g.Resource) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinGraphGetProperties. -func (g *GremlinGraphGetProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseGetProperties. +func (g *GremlinDatabaseGetProperties) 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", g, err) @@ -5091,16 +3680,16 @@ func (g *GremlinGraphGetProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type GremlinGraphGetPropertiesOptions. -func (g GremlinGraphGetPropertiesOptions) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseGetPropertiesOptions. +func (g GremlinDatabaseGetPropertiesOptions) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "autoscaleSettings", g.AutoscaleSettings) populate(objectMap, "throughput", g.Throughput) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinGraphGetPropertiesOptions. -func (g *GremlinGraphGetPropertiesOptions) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseGetPropertiesOptions. +func (g *GremlinDatabaseGetPropertiesOptions) 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", g, err) @@ -5122,26 +3711,18 @@ func (g *GremlinGraphGetPropertiesOptions) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type GremlinGraphGetPropertiesResource. -func (g GremlinGraphGetPropertiesResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseGetPropertiesResource. +func (g GremlinDatabaseGetPropertiesResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "analyticalStorageTtl", g.AnalyticalStorageTTL) - populate(objectMap, "conflictResolutionPolicy", g.ConflictResolutionPolicy) - populate(objectMap, "createMode", g.CreateMode) - populate(objectMap, "defaultTtl", g.DefaultTTL) populate(objectMap, "_etag", g.Etag) populate(objectMap, "id", g.ID) - populate(objectMap, "indexingPolicy", g.IndexingPolicy) - populate(objectMap, "partitionKey", g.PartitionKey) - populate(objectMap, "restoreParameters", g.RestoreParameters) populate(objectMap, "_rid", g.Rid) populate(objectMap, "_ts", g.Ts) - populate(objectMap, "uniqueKeyPolicy", g.UniqueKeyPolicy) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinGraphGetPropertiesResource. -func (g *GremlinGraphGetPropertiesResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseGetPropertiesResource. +func (g *GremlinDatabaseGetPropertiesResource) 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", g, err) @@ -5149,32 +3730,11 @@ func (g *GremlinGraphGetPropertiesResource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "analyticalStorageTtl": - err = unpopulate(val, "AnalyticalStorageTTL", &g.AnalyticalStorageTTL) - delete(rawMsg, key) - case "conflictResolutionPolicy": - err = unpopulate(val, "ConflictResolutionPolicy", &g.ConflictResolutionPolicy) - delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &g.CreateMode) - delete(rawMsg, key) - case "defaultTtl": - err = unpopulate(val, "DefaultTTL", &g.DefaultTTL) - delete(rawMsg, key) - case "_etag": - err = unpopulate(val, "Etag", &g.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &g.ID) - delete(rawMsg, key) - case "indexingPolicy": - err = unpopulate(val, "IndexingPolicy", &g.IndexingPolicy) - delete(rawMsg, key) - case "partitionKey": - err = unpopulate(val, "PartitionKey", &g.PartitionKey) + case "_etag": + err = unpopulate(val, "Etag", &g.Etag) delete(rawMsg, key) - case "restoreParameters": - err = unpopulate(val, "RestoreParameters", &g.RestoreParameters) + case "id": + err = unpopulate(val, "ID", &g.ID) delete(rawMsg, key) case "_rid": err = unpopulate(val, "Rid", &g.Rid) @@ -5182,9 +3742,6 @@ func (g *GremlinGraphGetPropertiesResource) UnmarshalJSON(data []byte) error { case "_ts": err = unpopulate(val, "Ts", &g.Ts) delete(rawMsg, key) - case "uniqueKeyPolicy": - err = unpopulate(val, "UniqueKeyPolicy", &g.UniqueKeyPolicy) - delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", g, err) @@ -5193,11 +3750,10 @@ func (g *GremlinGraphGetPropertiesResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type GremlinGraphGetResults. -func (g GremlinGraphGetResults) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseGetResults. +func (g GremlinDatabaseGetResults) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", g.ID) - populate(objectMap, "identity", g.Identity) populate(objectMap, "location", g.Location) populate(objectMap, "name", g.Name) populate(objectMap, "properties", g.Properties) @@ -5206,8 +3762,8 @@ func (g GremlinGraphGetResults) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinGraphGetResults. -func (g *GremlinGraphGetResults) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseGetResults. +func (g *GremlinDatabaseGetResults) 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", g, err) @@ -5218,9 +3774,6 @@ func (g *GremlinGraphGetResults) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &g.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &g.Identity) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &g.Location) delete(rawMsg, key) @@ -5244,15 +3797,15 @@ func (g *GremlinGraphGetResults) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type GremlinGraphListResult. -func (g GremlinGraphListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseListResult. +func (g GremlinDatabaseListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "value", g.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinGraphListResult. -func (g *GremlinGraphListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseListResult. +func (g *GremlinDatabaseListResult) 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", g, err) @@ -5271,23 +3824,15 @@ func (g *GremlinGraphListResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type GremlinGraphResource. -func (g GremlinGraphResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseResource. +func (g GremlinDatabaseResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "analyticalStorageTtl", g.AnalyticalStorageTTL) - populate(objectMap, "conflictResolutionPolicy", g.ConflictResolutionPolicy) - populate(objectMap, "createMode", g.CreateMode) - populate(objectMap, "defaultTtl", g.DefaultTTL) populate(objectMap, "id", g.ID) - populate(objectMap, "indexingPolicy", g.IndexingPolicy) - populate(objectMap, "partitionKey", g.PartitionKey) - populate(objectMap, "restoreParameters", g.RestoreParameters) - populate(objectMap, "uniqueKeyPolicy", g.UniqueKeyPolicy) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinGraphResource. -func (g *GremlinGraphResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseResource. +func (g *GremlinDatabaseResource) 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", g, err) @@ -5295,33 +3840,9 @@ func (g *GremlinGraphResource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "analyticalStorageTtl": - err = unpopulate(val, "AnalyticalStorageTTL", &g.AnalyticalStorageTTL) - delete(rawMsg, key) - case "conflictResolutionPolicy": - err = unpopulate(val, "ConflictResolutionPolicy", &g.ConflictResolutionPolicy) - delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &g.CreateMode) - delete(rawMsg, key) - case "defaultTtl": - err = unpopulate(val, "DefaultTTL", &g.DefaultTTL) - delete(rawMsg, key) case "id": err = unpopulate(val, "ID", &g.ID) delete(rawMsg, key) - case "indexingPolicy": - err = unpopulate(val, "IndexingPolicy", &g.IndexingPolicy) - delete(rawMsg, key) - case "partitionKey": - err = unpopulate(val, "PartitionKey", &g.PartitionKey) - delete(rawMsg, key) - case "restoreParameters": - err = unpopulate(val, "RestoreParameters", &g.RestoreParameters) - delete(rawMsg, key) - case "uniqueKeyPolicy": - err = unpopulate(val, "UniqueKeyPolicy", &g.UniqueKeyPolicy) - delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", g, err) @@ -5330,782 +3851,760 @@ func (g *GremlinGraphResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type IPAddressOrRange. -func (i IPAddressOrRange) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseRestoreResource. +func (g GremlinDatabaseRestoreResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "ipAddressOrRange", i.IPAddressOrRange) + populate(objectMap, "databaseName", g.DatabaseName) + populate(objectMap, "graphNames", g.GraphNames) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type IPAddressOrRange. -func (i *IPAddressOrRange) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseRestoreResource. +func (g *GremlinDatabaseRestoreResource) 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", i, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } for key, val := range rawMsg { var err error switch key { - case "ipAddressOrRange": - err = unpopulate(val, "IPAddressOrRange", &i.IPAddressOrRange) + case "databaseName": + err = unpopulate(val, "DatabaseName", &g.DatabaseName) + delete(rawMsg, key) + case "graphNames": + err = unpopulate(val, "GraphNames", &g.GraphNames) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type IncludedPath. -func (i IncludedPath) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GremlinGraphCreateUpdateParameters. +func (g GremlinGraphCreateUpdateParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "indexes", i.Indexes) - populate(objectMap, "path", i.Path) + populate(objectMap, "id", g.ID) + populate(objectMap, "location", g.Location) + populate(objectMap, "name", g.Name) + populate(objectMap, "properties", g.Properties) + populate(objectMap, "tags", g.Tags) + populate(objectMap, "type", g.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type IncludedPath. -func (i *IncludedPath) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinGraphCreateUpdateParameters. +func (g *GremlinGraphCreateUpdateParameters) 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", i, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } for key, val := range rawMsg { var err error switch key { - case "indexes": - err = unpopulate(val, "Indexes", &i.Indexes) + case "id": + err = unpopulate(val, "ID", &g.ID) delete(rawMsg, key) - case "path": - err = unpopulate(val, "Path", &i.Path) + case "location": + err = unpopulate(val, "Location", &g.Location) delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Indexes. -func (i Indexes) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "dataType", i.DataType) - populate(objectMap, "kind", i.Kind) - populate(objectMap, "precision", i.Precision) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Indexes. -func (i *Indexes) 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", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dataType": - err = unpopulate(val, "DataType", &i.DataType) + case "name": + err = unpopulate(val, "Name", &g.Name) delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &i.Kind) + case "properties": + err = unpopulate(val, "Properties", &g.Properties) delete(rawMsg, key) - case "precision": - err = unpopulate(val, "Precision", &i.Precision) + case "tags": + err = unpopulate(val, "Tags", &g.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &g.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type IndexingPolicy. -func (i IndexingPolicy) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GremlinGraphCreateUpdateProperties. +func (g GremlinGraphCreateUpdateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "automatic", i.Automatic) - populate(objectMap, "compositeIndexes", i.CompositeIndexes) - populate(objectMap, "excludedPaths", i.ExcludedPaths) - populate(objectMap, "includedPaths", i.IncludedPaths) - populate(objectMap, "indexingMode", i.IndexingMode) - populate(objectMap, "spatialIndexes", i.SpatialIndexes) + populate(objectMap, "options", g.Options) + populate(objectMap, "resource", g.Resource) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type IndexingPolicy. -func (i *IndexingPolicy) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinGraphCreateUpdateProperties. +func (g *GremlinGraphCreateUpdateProperties) 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", i, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } for key, val := range rawMsg { var err error switch key { - case "automatic": - err = unpopulate(val, "Automatic", &i.Automatic) - delete(rawMsg, key) - case "compositeIndexes": - err = unpopulate(val, "CompositeIndexes", &i.CompositeIndexes) - delete(rawMsg, key) - case "excludedPaths": - err = unpopulate(val, "ExcludedPaths", &i.ExcludedPaths) - delete(rawMsg, key) - case "includedPaths": - err = unpopulate(val, "IncludedPaths", &i.IncludedPaths) - delete(rawMsg, key) - case "indexingMode": - err = unpopulate(val, "IndexingMode", &i.IndexingMode) + case "options": + err = unpopulate(val, "Options", &g.Options) delete(rawMsg, key) - case "spatialIndexes": - err = unpopulate(val, "SpatialIndexes", &i.SpatialIndexes) + case "resource": + err = unpopulate(val, "Resource", &g.Resource) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type KeyWrapMetadata. -func (k KeyWrapMetadata) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GremlinGraphGetProperties. +func (g GremlinGraphGetProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "algorithm", k.Algorithm) - populate(objectMap, "name", k.Name) - populate(objectMap, "type", k.Type) - populate(objectMap, "value", k.Value) + populate(objectMap, "options", g.Options) + populate(objectMap, "resource", g.Resource) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type KeyWrapMetadata. -func (k *KeyWrapMetadata) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinGraphGetProperties. +func (g *GremlinGraphGetProperties) 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", k, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } for key, val := range rawMsg { var err error switch key { - case "algorithm": - err = unpopulate(val, "Algorithm", &k.Algorithm) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &k.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &k.Type) + case "options": + err = unpopulate(val, "Options", &g.Options) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &k.Value) + case "resource": + err = unpopulate(val, "Resource", &g.Resource) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ListBackups. -func (l ListBackups) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GremlinGraphGetPropertiesOptions. +func (g GremlinGraphGetPropertiesOptions) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", l.Value) + populate(objectMap, "autoscaleSettings", g.AutoscaleSettings) + populate(objectMap, "throughput", g.Throughput) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ListBackups. -func (l *ListBackups) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinGraphGetPropertiesOptions. +func (g *GremlinGraphGetPropertiesOptions) 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", l, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &l.Value) + case "autoscaleSettings": + err = unpopulate(val, "AutoscaleSettings", &g.AutoscaleSettings) + delete(rawMsg, key) + case "throughput": + err = unpopulate(val, "Throughput", &g.Throughput) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ListClusters. -func (l ListClusters) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GremlinGraphGetPropertiesResource. +func (g GremlinGraphGetPropertiesResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", l.Value) + populate(objectMap, "analyticalStorageTtl", g.AnalyticalStorageTTL) + populate(objectMap, "conflictResolutionPolicy", g.ConflictResolutionPolicy) + populate(objectMap, "defaultTtl", g.DefaultTTL) + populate(objectMap, "_etag", g.Etag) + populate(objectMap, "id", g.ID) + populate(objectMap, "indexingPolicy", g.IndexingPolicy) + populate(objectMap, "partitionKey", g.PartitionKey) + populate(objectMap, "_rid", g.Rid) + populate(objectMap, "_ts", g.Ts) + populate(objectMap, "uniqueKeyPolicy", g.UniqueKeyPolicy) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ListClusters. -func (l *ListClusters) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinGraphGetPropertiesResource. +func (g *GremlinGraphGetPropertiesResource) 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", l, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &l.Value) + case "analyticalStorageTtl": + err = unpopulate(val, "AnalyticalStorageTTL", &g.AnalyticalStorageTTL) + delete(rawMsg, key) + case "conflictResolutionPolicy": + err = unpopulate(val, "ConflictResolutionPolicy", &g.ConflictResolutionPolicy) + delete(rawMsg, key) + case "defaultTtl": + err = unpopulate(val, "DefaultTTL", &g.DefaultTTL) + delete(rawMsg, key) + case "_etag": + err = unpopulate(val, "Etag", &g.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &g.ID) + delete(rawMsg, key) + case "indexingPolicy": + err = unpopulate(val, "IndexingPolicy", &g.IndexingPolicy) + delete(rawMsg, key) + case "partitionKey": + err = unpopulate(val, "PartitionKey", &g.PartitionKey) + delete(rawMsg, key) + case "_rid": + err = unpopulate(val, "Rid", &g.Rid) + delete(rawMsg, key) + case "_ts": + err = unpopulate(val, "Ts", &g.Ts) + delete(rawMsg, key) + case "uniqueKeyPolicy": + err = unpopulate(val, "UniqueKeyPolicy", &g.UniqueKeyPolicy) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ListDataCenters. -func (l ListDataCenters) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GremlinGraphGetResults. +func (g GremlinGraphGetResults) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", l.Value) + populate(objectMap, "id", g.ID) + populate(objectMap, "location", g.Location) + populate(objectMap, "name", g.Name) + populate(objectMap, "properties", g.Properties) + populate(objectMap, "tags", g.Tags) + populate(objectMap, "type", g.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ListDataCenters. -func (l *ListDataCenters) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinGraphGetResults. +func (g *GremlinGraphGetResults) 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", l, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &l.Value) + case "id": + err = unpopulate(val, "ID", &g.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &g.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &g.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &g.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &g.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type Location. -func (l Location) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GremlinGraphListResult. +func (g GremlinGraphListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "documentEndpoint", l.DocumentEndpoint) - populate(objectMap, "failoverPriority", l.FailoverPriority) - populate(objectMap, "id", l.ID) - populate(objectMap, "isZoneRedundant", l.IsZoneRedundant) - populate(objectMap, "locationName", l.LocationName) - populate(objectMap, "provisioningState", l.ProvisioningState) + populate(objectMap, "value", g.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Location. -func (l *Location) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinGraphListResult. +func (g *GremlinGraphListResult) 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", l, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } for key, val := range rawMsg { var err error switch key { - case "documentEndpoint": - err = unpopulate(val, "DocumentEndpoint", &l.DocumentEndpoint) - delete(rawMsg, key) - case "failoverPriority": - err = unpopulate(val, "FailoverPriority", &l.FailoverPriority) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &l.ID) - delete(rawMsg, key) - case "isZoneRedundant": - err = unpopulate(val, "IsZoneRedundant", &l.IsZoneRedundant) - delete(rawMsg, key) - case "locationName": - err = unpopulate(val, "LocationName", &l.LocationName) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &l.ProvisioningState) + case "value": + err = unpopulate(val, "Value", &g.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type LocationGetResult. -func (l LocationGetResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GremlinGraphResource. +func (g GremlinGraphResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", l.ID) - populate(objectMap, "name", l.Name) - populate(objectMap, "properties", l.Properties) - populate(objectMap, "type", l.Type) + populate(objectMap, "analyticalStorageTtl", g.AnalyticalStorageTTL) + populate(objectMap, "conflictResolutionPolicy", g.ConflictResolutionPolicy) + populate(objectMap, "defaultTtl", g.DefaultTTL) + populate(objectMap, "id", g.ID) + populate(objectMap, "indexingPolicy", g.IndexingPolicy) + populate(objectMap, "partitionKey", g.PartitionKey) + populate(objectMap, "uniqueKeyPolicy", g.UniqueKeyPolicy) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type LocationGetResult. -func (l *LocationGetResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GremlinGraphResource. +func (g *GremlinGraphResource) 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", l, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } for key, val := range rawMsg { var err error switch key { + case "analyticalStorageTtl": + err = unpopulate(val, "AnalyticalStorageTTL", &g.AnalyticalStorageTTL) + delete(rawMsg, key) + case "conflictResolutionPolicy": + err = unpopulate(val, "ConflictResolutionPolicy", &g.ConflictResolutionPolicy) + delete(rawMsg, key) + case "defaultTtl": + err = unpopulate(val, "DefaultTTL", &g.DefaultTTL) + delete(rawMsg, key) case "id": - err = unpopulate(val, "ID", &l.ID) + err = unpopulate(val, "ID", &g.ID) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &l.Name) + case "indexingPolicy": + err = unpopulate(val, "IndexingPolicy", &g.IndexingPolicy) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &l.Properties) + case "partitionKey": + err = unpopulate(val, "PartitionKey", &g.PartitionKey) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &l.Type) + case "uniqueKeyPolicy": + err = unpopulate(val, "UniqueKeyPolicy", &g.UniqueKeyPolicy) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type LocationListResult. -func (l LocationListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type IPAddressOrRange. +func (i IPAddressOrRange) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", l.Value) + populate(objectMap, "ipAddressOrRange", i.IPAddressOrRange) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type LocationListResult. -func (l *LocationListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type IPAddressOrRange. +func (i *IPAddressOrRange) 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", l, err) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &l.Value) + case "ipAddressOrRange": + err = unpopulate(val, "IPAddressOrRange", &i.IPAddressOrRange) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type LocationProperties. -func (l LocationProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type IncludedPath. +func (i IncludedPath) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "backupStorageRedundancies", l.BackupStorageRedundancies) - populate(objectMap, "isResidencyRestricted", l.IsResidencyRestricted) - populate(objectMap, "status", l.Status) - populate(objectMap, "supportsAvailabilityZone", l.SupportsAvailabilityZone) + populate(objectMap, "indexes", i.Indexes) + populate(objectMap, "path", i.Path) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type LocationProperties. -func (l *LocationProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type IncludedPath. +func (i *IncludedPath) 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", l, err) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } for key, val := range rawMsg { var err error switch key { - case "backupStorageRedundancies": - err = unpopulate(val, "BackupStorageRedundancies", &l.BackupStorageRedundancies) - delete(rawMsg, key) - case "isResidencyRestricted": - err = unpopulate(val, "IsResidencyRestricted", &l.IsResidencyRestricted) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &l.Status) + case "indexes": + err = unpopulate(val, "Indexes", &i.Indexes) delete(rawMsg, key) - case "supportsAvailabilityZone": - err = unpopulate(val, "SupportsAvailabilityZone", &l.SupportsAvailabilityZone) + case "path": + err = unpopulate(val, "Path", &i.Path) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedCassandraARMResourceProperties. -func (m ManagedCassandraARMResourceProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Indexes. +func (i Indexes) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", m.ID) - populate(objectMap, "identity", m.Identity) - populate(objectMap, "location", m.Location) - populate(objectMap, "name", m.Name) - populate(objectMap, "tags", m.Tags) - populate(objectMap, "type", m.Type) + populate(objectMap, "dataType", i.DataType) + populate(objectMap, "kind", i.Kind) + populate(objectMap, "precision", i.Precision) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedCassandraARMResourceProperties. -func (m *ManagedCassandraARMResourceProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Indexes. +func (i *Indexes) 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) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &m.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &m.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &m.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) + case "dataType": + err = unpopulate(val, "DataType", &i.DataType) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &m.Tags) + case "kind": + err = unpopulate(val, "Kind", &i.Kind) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) + case "precision": + err = unpopulate(val, "Precision", &i.Precision) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedCassandraManagedServiceIdentity. -func (m ManagedCassandraManagedServiceIdentity) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type IndexingPolicy. +func (i IndexingPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "principalId", m.PrincipalID) - populate(objectMap, "tenantId", m.TenantID) - populate(objectMap, "type", m.Type) + populate(objectMap, "automatic", i.Automatic) + populate(objectMap, "compositeIndexes", i.CompositeIndexes) + populate(objectMap, "excludedPaths", i.ExcludedPaths) + populate(objectMap, "includedPaths", i.IncludedPaths) + populate(objectMap, "indexingMode", i.IndexingMode) + populate(objectMap, "spatialIndexes", i.SpatialIndexes) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedCassandraManagedServiceIdentity. -func (m *ManagedCassandraManagedServiceIdentity) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type IndexingPolicy. +func (i *IndexingPolicy) 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) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } for key, val := range rawMsg { var err error switch key { - case "principalId": - err = unpopulate(val, "PrincipalID", &m.PrincipalID) + case "automatic": + err = unpopulate(val, "Automatic", &i.Automatic) delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &m.TenantID) + case "compositeIndexes": + err = unpopulate(val, "CompositeIndexes", &i.CompositeIndexes) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) + case "excludedPaths": + err = unpopulate(val, "ExcludedPaths", &i.ExcludedPaths) + delete(rawMsg, key) + case "includedPaths": + err = unpopulate(val, "IncludedPaths", &i.IncludedPaths) + delete(rawMsg, key) + case "indexingMode": + err = unpopulate(val, "IndexingMode", &i.IndexingMode) + delete(rawMsg, key) + case "spatialIndexes": + err = unpopulate(val, "SpatialIndexes", &i.SpatialIndexes) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedCassandraReaperStatus. -func (m ManagedCassandraReaperStatus) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type KeyWrapMetadata. +func (k KeyWrapMetadata) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "healthy", m.Healthy) - populate(objectMap, "repairRunIds", m.RepairRunIDs) - populate(objectMap, "repairSchedules", m.RepairSchedules) + populate(objectMap, "algorithm", k.Algorithm) + populate(objectMap, "name", k.Name) + populate(objectMap, "type", k.Type) + populate(objectMap, "value", k.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedCassandraReaperStatus. -func (m *ManagedCassandraReaperStatus) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyWrapMetadata. +func (k *KeyWrapMetadata) 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) + return fmt.Errorf("unmarshalling type %T: %v", k, err) } for key, val := range rawMsg { var err error switch key { - case "healthy": - err = unpopulate(val, "Healthy", &m.Healthy) + case "algorithm": + err = unpopulate(val, "Algorithm", &k.Algorithm) delete(rawMsg, key) - case "repairRunIds": - err = unpopulate(val, "RepairRunIDs", &m.RepairRunIDs) + case "name": + err = unpopulate(val, "Name", &k.Name) delete(rawMsg, key) - case "repairSchedules": - err = unpopulate(val, "RepairSchedules", &m.RepairSchedules) + case "type": + err = unpopulate(val, "Type", &k.Type) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &k.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", k, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. -func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ListClusters. +func (l ListClusters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "principalId", m.PrincipalID) - populate(objectMap, "tenantId", m.TenantID) - populate(objectMap, "type", m.Type) - populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) + populate(objectMap, "value", l.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity. -func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ListClusters. +func (l *ListClusters) 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) + return fmt.Errorf("unmarshalling type %T: %v", l, err) } for key, val := range rawMsg { var err error switch key { - case "principalId": - err = unpopulate(val, "PrincipalID", &m.PrincipalID) - delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &m.TenantID) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) - delete(rawMsg, key) - case "userAssignedIdentities": - err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) + case "value": + err = unpopulate(val, "Value", &l.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", l, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type MaterializedViewsBuilderRegionalServiceResource. -func (m MaterializedViewsBuilderRegionalServiceResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ListDataCenters. +func (l ListDataCenters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "location", m.Location) - populate(objectMap, "name", m.Name) - populate(objectMap, "status", m.Status) + populate(objectMap, "value", l.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MaterializedViewsBuilderRegionalServiceResource. -func (m *MaterializedViewsBuilderRegionalServiceResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ListDataCenters. +func (l *ListDataCenters) 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) + return fmt.Errorf("unmarshalling type %T: %v", l, err) } for key, val := range rawMsg { var err error switch key { - case "location": - err = unpopulate(val, "Location", &m.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &m.Status) + case "value": + err = unpopulate(val, "Value", &l.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", l, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type MaterializedViewsBuilderServiceResource. -func (m MaterializedViewsBuilderServiceResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Location. +func (l Location) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "properties", m.Properties) + populate(objectMap, "documentEndpoint", l.DocumentEndpoint) + populate(objectMap, "failoverPriority", l.FailoverPriority) + populate(objectMap, "id", l.ID) + populate(objectMap, "isZoneRedundant", l.IsZoneRedundant) + populate(objectMap, "locationName", l.LocationName) + populate(objectMap, "provisioningState", l.ProvisioningState) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MaterializedViewsBuilderServiceResource. -func (m *MaterializedViewsBuilderServiceResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Location. +func (l *Location) 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) + return fmt.Errorf("unmarshalling type %T: %v", l, err) } for key, val := range rawMsg { var err error switch key { - case "properties": - err = unpopulate(val, "Properties", &m.Properties) + case "documentEndpoint": + err = unpopulate(val, "DocumentEndpoint", &l.DocumentEndpoint) + delete(rawMsg, key) + case "failoverPriority": + err = unpopulate(val, "FailoverPriority", &l.FailoverPriority) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &l.ID) + delete(rawMsg, key) + case "isZoneRedundant": + err = unpopulate(val, "IsZoneRedundant", &l.IsZoneRedundant) + delete(rawMsg, key) + case "locationName": + err = unpopulate(val, "LocationName", &l.LocationName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &l.ProvisioningState) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", l, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type MaterializedViewsBuilderServiceResourceProperties. -func (m MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type LocationGetResult. +func (l LocationGetResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", m.CreationTime) - populate(objectMap, "instanceCount", m.InstanceCount) - populate(objectMap, "instanceSize", m.InstanceSize) - populate(objectMap, "locations", m.Locations) - objectMap["serviceType"] = ServiceTypeMaterializedViewsBuilder - populate(objectMap, "status", m.Status) - if m.AdditionalProperties != nil { - for key, val := range m.AdditionalProperties { - objectMap[key] = val - } - } + populate(objectMap, "id", l.ID) + populate(objectMap, "name", l.Name) + populate(objectMap, "properties", l.Properties) + populate(objectMap, "type", l.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MaterializedViewsBuilderServiceResourceProperties. -func (m *MaterializedViewsBuilderServiceResourceProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type LocationGetResult. +func (l *LocationGetResult) 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) + return fmt.Errorf("unmarshalling type %T: %v", l, err) } for key, val := range rawMsg { var err error switch key { - case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &m.CreationTime) - delete(rawMsg, key) - case "instanceCount": - err = unpopulate(val, "InstanceCount", &m.InstanceCount) - delete(rawMsg, key) - case "instanceSize": - err = unpopulate(val, "InstanceSize", &m.InstanceSize) - delete(rawMsg, key) - case "locations": - err = unpopulate(val, "Locations", &m.Locations) + case "id": + err = unpopulate(val, "ID", &l.ID) delete(rawMsg, key) - case "serviceType": - err = unpopulate(val, "ServiceType", &m.ServiceType) + case "name": + err = unpopulate(val, "Name", &l.Name) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &m.Status) + case "properties": + err = unpopulate(val, "Properties", &l.Properties) delete(rawMsg, key) - default: - if m.AdditionalProperties == nil { - m.AdditionalProperties = map[string]any{} - } - if val != nil { - var aux any - err = json.Unmarshal(val, &aux) - m.AdditionalProperties[key] = aux - } + case "type": + err = unpopulate(val, "Type", &l.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", l, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type MergeParameters. -func (m MergeParameters) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type LocationListResult. +func (l LocationListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "isDryRun", m.IsDryRun) + populate(objectMap, "value", l.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MergeParameters. -func (m *MergeParameters) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type LocationListResult. +func (l *LocationListResult) 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) + return fmt.Errorf("unmarshalling type %T: %v", l, err) } for key, val := range rawMsg { var err error switch key { - case "isDryRun": - err = unpopulate(val, "IsDryRun", &m.IsDryRun) + case "value": + err = unpopulate(val, "Value", &l.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", l, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type Metric. -func (m Metric) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type LocationProperties. +func (l LocationProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "endTime", m.EndTime) - populate(objectMap, "metricValues", m.MetricValues) - populate(objectMap, "name", m.Name) - populateTimeRFC3339(objectMap, "startTime", m.StartTime) - populate(objectMap, "timeGrain", m.TimeGrain) - populate(objectMap, "unit", m.Unit) + populate(objectMap, "backupStorageRedundancies", l.BackupStorageRedundancies) + populate(objectMap, "isResidencyRestricted", l.IsResidencyRestricted) + populate(objectMap, "supportsAvailabilityZone", l.SupportsAvailabilityZone) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Metric. -func (m *Metric) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type LocationProperties. +func (l *LocationProperties) 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) + return fmt.Errorf("unmarshalling type %T: %v", l, err) } for key, val := range rawMsg { var err error switch key { - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &m.EndTime) - delete(rawMsg, key) - case "metricValues": - err = unpopulate(val, "MetricValues", &m.MetricValues) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &m.StartTime) + case "backupStorageRedundancies": + err = unpopulate(val, "BackupStorageRedundancies", &l.BackupStorageRedundancies) delete(rawMsg, key) - case "timeGrain": - err = unpopulate(val, "TimeGrain", &m.TimeGrain) + case "isResidencyRestricted": + err = unpopulate(val, "IsResidencyRestricted", &l.IsResidencyRestricted) delete(rawMsg, key) - case "unit": - err = unpopulate(val, "Unit", &m.Unit) + case "supportsAvailabilityZone": + err = unpopulate(val, "SupportsAvailabilityZone", &l.SupportsAvailabilityZone) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", l, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type MetricAvailability. -func (m MetricAvailability) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedCassandraARMResourceProperties. +func (m ManagedCassandraARMResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "retention", m.Retention) - populate(objectMap, "timeGrain", m.TimeGrain) + populate(objectMap, "id", m.ID) + populate(objectMap, "identity", m.Identity) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MetricAvailability. -func (m *MetricAvailability) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedCassandraARMResourceProperties. +func (m *ManagedCassandraARMResourceProperties) 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) @@ -6113,11 +4612,23 @@ func (m *MetricAvailability) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "retention": - err = unpopulate(val, "Retention", &m.Retention) + case "id": + err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) - case "timeGrain": - err = unpopulate(val, "TimeGrain", &m.TimeGrain) + case "identity": + err = unpopulate(val, "Identity", &m.Identity) + 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 "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) } if err != nil { @@ -6127,19 +4638,17 @@ func (m *MetricAvailability) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MetricDefinition. -func (m MetricDefinition) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedCassandraManagedServiceIdentity. +func (m ManagedCassandraManagedServiceIdentity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "metricAvailabilities", m.MetricAvailabilities) - populate(objectMap, "name", m.Name) - populate(objectMap, "primaryAggregationType", m.PrimaryAggregationType) - populate(objectMap, "resourceUri", m.ResourceURI) - populate(objectMap, "unit", m.Unit) + populate(objectMap, "principalId", m.PrincipalID) + populate(objectMap, "tenantId", m.TenantID) + populate(objectMap, "type", m.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MetricDefinition. -func (m *MetricDefinition) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedCassandraManagedServiceIdentity. +func (m *ManagedCassandraManagedServiceIdentity) 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) @@ -6147,20 +4656,14 @@ func (m *MetricDefinition) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "metricAvailabilities": - err = unpopulate(val, "MetricAvailabilities", &m.MetricAvailabilities) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "primaryAggregationType": - err = unpopulate(val, "PrimaryAggregationType", &m.PrimaryAggregationType) + case "principalId": + err = unpopulate(val, "PrincipalID", &m.PrincipalID) delete(rawMsg, key) - case "resourceUri": - err = unpopulate(val, "ResourceURI", &m.ResourceURI) + case "tenantId": + err = unpopulate(val, "TenantID", &m.TenantID) delete(rawMsg, key) - case "unit": - err = unpopulate(val, "Unit", &m.Unit) + case "type": + err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) } if err != nil { @@ -6170,15 +4673,17 @@ func (m *MetricDefinition) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MetricDefinitionsListResult. -func (m MetricDefinitionsListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedCassandraReaperStatus. +func (m ManagedCassandraReaperStatus) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", m.Value) + populate(objectMap, "healthy", m.Healthy) + populate(objectMap, "repairRunIds", m.RepairRunIDs) + populate(objectMap, "repairSchedules", m.RepairSchedules) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MetricDefinitionsListResult. -func (m *MetricDefinitionsListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedCassandraReaperStatus. +func (m *ManagedCassandraReaperStatus) 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) @@ -6186,8 +4691,14 @@ func (m *MetricDefinitionsListResult) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &m.Value) + case "healthy": + err = unpopulate(val, "Healthy", &m.Healthy) + delete(rawMsg, key) + case "repairRunIds": + err = unpopulate(val, "RepairRunIDs", &m.RepairRunIDs) + delete(rawMsg, key) + case "repairSchedules": + err = unpopulate(val, "RepairSchedules", &m.RepairSchedules) delete(rawMsg, key) } if err != nil { @@ -6197,15 +4708,18 @@ func (m *MetricDefinitionsListResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MetricListResult. -func (m MetricListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. +func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", m.Value) + populate(objectMap, "principalId", m.PrincipalID) + populate(objectMap, "tenantId", m.TenantID) + populate(objectMap, "type", m.Type) + populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MetricListResult. -func (m *MetricListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity. +func (m *ManagedServiceIdentity) 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) @@ -6213,8 +4727,17 @@ func (m *MetricListResult) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &m.Value) + case "principalId": + err = unpopulate(val, "PrincipalID", &m.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &m.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) delete(rawMsg, key) } if err != nil { @@ -6224,16 +4747,17 @@ func (m *MetricListResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MetricName. -func (m MetricName) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MaterializedViewsBuilderRegionalServiceResource. +func (m MaterializedViewsBuilderRegionalServiceResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "localizedValue", m.LocalizedValue) - populate(objectMap, "value", m.Value) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "status", m.Status) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MetricName. -func (m *MetricName) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MaterializedViewsBuilderRegionalServiceResource. +func (m *MaterializedViewsBuilderRegionalServiceResource) 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) @@ -6241,11 +4765,14 @@ func (m *MetricName) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "localizedValue": - err = unpopulate(val, "LocalizedValue", &m.LocalizedValue) + case "location": + err = unpopulate(val, "Location", &m.Location) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &m.Value) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &m.Status) delete(rawMsg, key) } if err != nil { @@ -6255,20 +4782,15 @@ func (m *MetricName) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MetricValue. -func (m MetricValue) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MaterializedViewsBuilderServiceResource. +func (m MaterializedViewsBuilderServiceResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "average", m.Average) - populate(objectMap, "_count", m.Count) - populate(objectMap, "maximum", m.Maximum) - populate(objectMap, "minimum", m.Minimum) - populateTimeRFC3339(objectMap, "timestamp", m.Timestamp) - populate(objectMap, "total", m.Total) + populate(objectMap, "properties", m.Properties) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MetricValue. -func (m *MetricValue) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MaterializedViewsBuilderServiceResource. +func (m *MaterializedViewsBuilderServiceResource) 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) @@ -6276,23 +4798,8 @@ func (m *MetricValue) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "average": - err = unpopulate(val, "Average", &m.Average) - delete(rawMsg, key) - case "_count": - err = unpopulate(val, "Count", &m.Count) - delete(rawMsg, key) - case "maximum": - err = unpopulate(val, "Maximum", &m.Maximum) - delete(rawMsg, key) - case "minimum": - err = unpopulate(val, "Minimum", &m.Minimum) - delete(rawMsg, key) - case "timestamp": - err = unpopulateTimeRFC3339(val, "Timestamp", &m.Timestamp) - delete(rawMsg, key) - case "total": - err = unpopulate(val, "Total", &m.Total) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) delete(rawMsg, key) } if err != nil { @@ -6302,21 +4809,25 @@ func (m *MetricValue) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionCreateUpdateParameters. -func (m MongoDBCollectionCreateUpdateParameters) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MaterializedViewsBuilderServiceResourceProperties. +func (m MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", m.ID) - populate(objectMap, "identity", m.Identity) - populate(objectMap, "location", m.Location) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "tags", m.Tags) - populate(objectMap, "type", m.Type) + populateTimeRFC3339(objectMap, "creationTime", m.CreationTime) + populate(objectMap, "instanceCount", m.InstanceCount) + populate(objectMap, "instanceSize", m.InstanceSize) + populate(objectMap, "locations", m.Locations) + objectMap["serviceType"] = ServiceTypeMaterializedViewsBuilder + populate(objectMap, "status", m.Status) + if m.AdditionalProperties != nil { + for key, val := range m.AdditionalProperties { + objectMap[key] = val + } + } return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBCollectionCreateUpdateParameters. -func (m *MongoDBCollectionCreateUpdateParameters) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MaterializedViewsBuilderServiceResourceProperties. +func (m *MaterializedViewsBuilderServiceResourceProperties) 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) @@ -6324,26 +4835,33 @@ func (m *MongoDBCollectionCreateUpdateParameters) UnmarshalJSON(data []byte) err for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &m.ID) + case "creationTime": + err = unpopulateTimeRFC3339(val, "CreationTime", &m.CreationTime) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &m.Identity) + case "instanceCount": + err = unpopulate(val, "InstanceCount", &m.InstanceCount) delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &m.Location) + case "instanceSize": + err = unpopulate(val, "InstanceSize", &m.InstanceSize) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) + case "locations": + err = unpopulate(val, "Locations", &m.Locations) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) + case "serviceType": + err = unpopulate(val, "ServiceType", &m.ServiceType) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &m.Tags) + case "status": + err = unpopulate(val, "Status", &m.Status) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) + default: + if m.AdditionalProperties == nil { + m.AdditionalProperties = map[string]any{} + } + if val != nil { + var aux any + err = json.Unmarshal(val, &aux) + m.AdditionalProperties[key] = aux + } delete(rawMsg, key) } if err != nil { @@ -6353,16 +4871,20 @@ func (m *MongoDBCollectionCreateUpdateParameters) UnmarshalJSON(data []byte) err return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionCreateUpdateProperties. -func (m MongoDBCollectionCreateUpdateProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Metric. +func (m Metric) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "options", m.Options) - populate(objectMap, "resource", m.Resource) + populateTimeRFC3339(objectMap, "endTime", m.EndTime) + populate(objectMap, "metricValues", m.MetricValues) + populate(objectMap, "name", m.Name) + populateTimeRFC3339(objectMap, "startTime", m.StartTime) + populate(objectMap, "timeGrain", m.TimeGrain) + populate(objectMap, "unit", m.Unit) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBCollectionCreateUpdateProperties. -func (m *MongoDBCollectionCreateUpdateProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Metric. +func (m *Metric) 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) @@ -6370,11 +4892,23 @@ func (m *MongoDBCollectionCreateUpdateProperties) UnmarshalJSON(data []byte) err for key, val := range rawMsg { var err error switch key { - case "options": - err = unpopulate(val, "Options", &m.Options) + case "endTime": + err = unpopulateTimeRFC3339(val, "EndTime", &m.EndTime) delete(rawMsg, key) - case "resource": - err = unpopulate(val, "Resource", &m.Resource) + case "metricValues": + err = unpopulate(val, "MetricValues", &m.MetricValues) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, "StartTime", &m.StartTime) + delete(rawMsg, key) + case "timeGrain": + err = unpopulate(val, "TimeGrain", &m.TimeGrain) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &m.Unit) delete(rawMsg, key) } if err != nil { @@ -6384,16 +4918,16 @@ func (m *MongoDBCollectionCreateUpdateProperties) UnmarshalJSON(data []byte) err return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionGetProperties. -func (m MongoDBCollectionGetProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MetricAvailability. +func (m MetricAvailability) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "options", m.Options) - populate(objectMap, "resource", m.Resource) + populate(objectMap, "retention", m.Retention) + populate(objectMap, "timeGrain", m.TimeGrain) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBCollectionGetProperties. -func (m *MongoDBCollectionGetProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricAvailability. +func (m *MetricAvailability) 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) @@ -6401,11 +4935,11 @@ func (m *MongoDBCollectionGetProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "options": - err = unpopulate(val, "Options", &m.Options) + case "retention": + err = unpopulate(val, "Retention", &m.Retention) delete(rawMsg, key) - case "resource": - err = unpopulate(val, "Resource", &m.Resource) + case "timeGrain": + err = unpopulate(val, "TimeGrain", &m.TimeGrain) delete(rawMsg, key) } if err != nil { @@ -6415,16 +4949,19 @@ func (m *MongoDBCollectionGetProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionGetPropertiesOptions. -func (m MongoDBCollectionGetPropertiesOptions) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MetricDefinition. +func (m MetricDefinition) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "autoscaleSettings", m.AutoscaleSettings) - populate(objectMap, "throughput", m.Throughput) + populate(objectMap, "metricAvailabilities", m.MetricAvailabilities) + populate(objectMap, "name", m.Name) + populate(objectMap, "primaryAggregationType", m.PrimaryAggregationType) + populate(objectMap, "resourceUri", m.ResourceURI) + populate(objectMap, "unit", m.Unit) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBCollectionGetPropertiesOptions. -func (m *MongoDBCollectionGetPropertiesOptions) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricDefinition. +func (m *MetricDefinition) 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) @@ -6432,11 +4969,20 @@ func (m *MongoDBCollectionGetPropertiesOptions) UnmarshalJSON(data []byte) error for key, val := range rawMsg { var err error switch key { - case "autoscaleSettings": - err = unpopulate(val, "AutoscaleSettings", &m.AutoscaleSettings) + case "metricAvailabilities": + err = unpopulate(val, "MetricAvailabilities", &m.MetricAvailabilities) delete(rawMsg, key) - case "throughput": - err = unpopulate(val, "Throughput", &m.Throughput) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "primaryAggregationType": + err = unpopulate(val, "PrimaryAggregationType", &m.PrimaryAggregationType) + delete(rawMsg, key) + case "resourceUri": + err = unpopulate(val, "ResourceURI", &m.ResourceURI) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &m.Unit) delete(rawMsg, key) } if err != nil { @@ -6446,23 +4992,15 @@ func (m *MongoDBCollectionGetPropertiesOptions) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionGetPropertiesResource. -func (m MongoDBCollectionGetPropertiesResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MetricDefinitionsListResult. +func (m MetricDefinitionsListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "analyticalStorageTtl", m.AnalyticalStorageTTL) - populate(objectMap, "createMode", m.CreateMode) - populate(objectMap, "_etag", m.Etag) - populate(objectMap, "id", m.ID) - populate(objectMap, "indexes", m.Indexes) - populate(objectMap, "restoreParameters", m.RestoreParameters) - populate(objectMap, "_rid", m.Rid) - populate(objectMap, "shardKey", m.ShardKey) - populate(objectMap, "_ts", m.Ts) + populate(objectMap, "value", m.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBCollectionGetPropertiesResource. -func (m *MongoDBCollectionGetPropertiesResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricDefinitionsListResult. +func (m *MetricDefinitionsListResult) 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) @@ -6470,32 +5008,8 @@ func (m *MongoDBCollectionGetPropertiesResource) UnmarshalJSON(data []byte) erro for key, val := range rawMsg { var err error switch key { - case "analyticalStorageTtl": - err = unpopulate(val, "AnalyticalStorageTTL", &m.AnalyticalStorageTTL) - delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &m.CreateMode) - delete(rawMsg, key) - case "_etag": - err = unpopulate(val, "Etag", &m.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &m.ID) - delete(rawMsg, key) - case "indexes": - err = unpopulate(val, "Indexes", &m.Indexes) - delete(rawMsg, key) - case "restoreParameters": - err = unpopulate(val, "RestoreParameters", &m.RestoreParameters) - delete(rawMsg, key) - case "_rid": - err = unpopulate(val, "Rid", &m.Rid) - delete(rawMsg, key) - case "shardKey": - err = unpopulate(val, "ShardKey", &m.ShardKey) - delete(rawMsg, key) - case "_ts": - err = unpopulate(val, "Ts", &m.Ts) + case "value": + err = unpopulate(val, "Value", &m.Value) delete(rawMsg, key) } if err != nil { @@ -6505,21 +5019,15 @@ func (m *MongoDBCollectionGetPropertiesResource) UnmarshalJSON(data []byte) erro return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionGetResults. -func (m MongoDBCollectionGetResults) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MetricListResult. +func (m MetricListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", m.ID) - populate(objectMap, "identity", m.Identity) - populate(objectMap, "location", m.Location) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "tags", m.Tags) - populate(objectMap, "type", m.Type) + populate(objectMap, "value", m.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBCollectionGetResults. -func (m *MongoDBCollectionGetResults) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricListResult. +func (m *MetricListResult) 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) @@ -6527,26 +5035,8 @@ func (m *MongoDBCollectionGetResults) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &m.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &m.Identity) - 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 "tags": - err = unpopulate(val, "Tags", &m.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) + case "value": + err = unpopulate(val, "Value", &m.Value) delete(rawMsg, key) } if err != nil { @@ -6556,15 +5046,16 @@ func (m *MongoDBCollectionGetResults) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionListResult. -func (m MongoDBCollectionListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MetricName. +func (m MetricName) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "localizedValue", m.LocalizedValue) populate(objectMap, "value", m.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBCollectionListResult. -func (m *MongoDBCollectionListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricName. +func (m *MetricName) 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) @@ -6572,6 +5063,9 @@ func (m *MongoDBCollectionListResult) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "localizedValue": + err = unpopulate(val, "LocalizedValue", &m.LocalizedValue) + delete(rawMsg, key) case "value": err = unpopulate(val, "Value", &m.Value) delete(rawMsg, key) @@ -6583,20 +5077,20 @@ func (m *MongoDBCollectionListResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionResource. -func (m MongoDBCollectionResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MetricValue. +func (m MetricValue) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "analyticalStorageTtl", m.AnalyticalStorageTTL) - populate(objectMap, "createMode", m.CreateMode) - populate(objectMap, "id", m.ID) - populate(objectMap, "indexes", m.Indexes) - populate(objectMap, "restoreParameters", m.RestoreParameters) - populate(objectMap, "shardKey", m.ShardKey) + populate(objectMap, "average", m.Average) + populate(objectMap, "_count", m.Count) + populate(objectMap, "maximum", m.Maximum) + populate(objectMap, "minimum", m.Minimum) + populateTimeRFC3339(objectMap, "timestamp", m.Timestamp) + populate(objectMap, "total", m.Total) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBCollectionResource. -func (m *MongoDBCollectionResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricValue. +func (m *MetricValue) 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) @@ -6604,23 +5098,23 @@ func (m *MongoDBCollectionResource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "analyticalStorageTtl": - err = unpopulate(val, "AnalyticalStorageTTL", &m.AnalyticalStorageTTL) + case "average": + err = unpopulate(val, "Average", &m.Average) delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &m.CreateMode) + case "_count": + err = unpopulate(val, "Count", &m.Count) delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &m.ID) + case "maximum": + err = unpopulate(val, "Maximum", &m.Maximum) delete(rawMsg, key) - case "indexes": - err = unpopulate(val, "Indexes", &m.Indexes) + case "minimum": + err = unpopulate(val, "Minimum", &m.Minimum) delete(rawMsg, key) - case "restoreParameters": - err = unpopulate(val, "RestoreParameters", &m.RestoreParameters) + case "timestamp": + err = unpopulateTimeRFC3339(val, "Timestamp", &m.Timestamp) delete(rawMsg, key) - case "shardKey": - err = unpopulate(val, "ShardKey", &m.ShardKey) + case "total": + err = unpopulate(val, "Total", &m.Total) delete(rawMsg, key) } if err != nil { @@ -6630,11 +5124,10 @@ func (m *MongoDBCollectionResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoDBDatabaseCreateUpdateParameters. -func (m MongoDBDatabaseCreateUpdateParameters) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionCreateUpdateParameters. +func (m MongoDBCollectionCreateUpdateParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", m.ID) - populate(objectMap, "identity", m.Identity) populate(objectMap, "location", m.Location) populate(objectMap, "name", m.Name) populate(objectMap, "properties", m.Properties) @@ -6643,8 +5136,8 @@ func (m MongoDBDatabaseCreateUpdateParameters) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBDatabaseCreateUpdateParameters. -func (m *MongoDBDatabaseCreateUpdateParameters) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBCollectionCreateUpdateParameters. +func (m *MongoDBCollectionCreateUpdateParameters) 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) @@ -6655,9 +5148,6 @@ func (m *MongoDBDatabaseCreateUpdateParameters) UnmarshalJSON(data []byte) error case "id": err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &m.Identity) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &m.Location) delete(rawMsg, key) @@ -6681,16 +5171,16 @@ func (m *MongoDBDatabaseCreateUpdateParameters) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoDBDatabaseCreateUpdateProperties. -func (m MongoDBDatabaseCreateUpdateProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionCreateUpdateProperties. +func (m MongoDBCollectionCreateUpdateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "options", m.Options) populate(objectMap, "resource", m.Resource) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBDatabaseCreateUpdateProperties. -func (m *MongoDBDatabaseCreateUpdateProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBCollectionCreateUpdateProperties. +func (m *MongoDBCollectionCreateUpdateProperties) 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) @@ -6712,16 +5202,16 @@ func (m *MongoDBDatabaseCreateUpdateProperties) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoDBDatabaseGetProperties. -func (m MongoDBDatabaseGetProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionGetProperties. +func (m MongoDBCollectionGetProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "options", m.Options) populate(objectMap, "resource", m.Resource) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBDatabaseGetProperties. -func (m *MongoDBDatabaseGetProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBCollectionGetProperties. +func (m *MongoDBCollectionGetProperties) 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) @@ -6743,16 +5233,16 @@ func (m *MongoDBDatabaseGetProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoDBDatabaseGetPropertiesOptions. -func (m MongoDBDatabaseGetPropertiesOptions) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionGetPropertiesOptions. +func (m MongoDBCollectionGetPropertiesOptions) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "autoscaleSettings", m.AutoscaleSettings) populate(objectMap, "throughput", m.Throughput) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBDatabaseGetPropertiesOptions. -func (m *MongoDBDatabaseGetPropertiesOptions) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBCollectionGetPropertiesOptions. +func (m *MongoDBCollectionGetPropertiesOptions) 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) @@ -6774,20 +5264,21 @@ func (m *MongoDBDatabaseGetPropertiesOptions) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoDBDatabaseGetPropertiesResource. -func (m MongoDBDatabaseGetPropertiesResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionGetPropertiesResource. +func (m MongoDBCollectionGetPropertiesResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "createMode", m.CreateMode) + populate(objectMap, "analyticalStorageTtl", m.AnalyticalStorageTTL) populate(objectMap, "_etag", m.Etag) populate(objectMap, "id", m.ID) - populate(objectMap, "restoreParameters", m.RestoreParameters) + populate(objectMap, "indexes", m.Indexes) populate(objectMap, "_rid", m.Rid) + populate(objectMap, "shardKey", m.ShardKey) populate(objectMap, "_ts", m.Ts) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBDatabaseGetPropertiesResource. -func (m *MongoDBDatabaseGetPropertiesResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBCollectionGetPropertiesResource. +func (m *MongoDBCollectionGetPropertiesResource) 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) @@ -6795,8 +5286,8 @@ func (m *MongoDBDatabaseGetPropertiesResource) UnmarshalJSON(data []byte) error for key, val := range rawMsg { var err error switch key { - case "createMode": - err = unpopulate(val, "CreateMode", &m.CreateMode) + case "analyticalStorageTtl": + err = unpopulate(val, "AnalyticalStorageTTL", &m.AnalyticalStorageTTL) delete(rawMsg, key) case "_etag": err = unpopulate(val, "Etag", &m.Etag) @@ -6804,12 +5295,15 @@ func (m *MongoDBDatabaseGetPropertiesResource) UnmarshalJSON(data []byte) error case "id": err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) - case "restoreParameters": - err = unpopulate(val, "RestoreParameters", &m.RestoreParameters) + case "indexes": + err = unpopulate(val, "Indexes", &m.Indexes) delete(rawMsg, key) case "_rid": err = unpopulate(val, "Rid", &m.Rid) delete(rawMsg, key) + case "shardKey": + err = unpopulate(val, "ShardKey", &m.ShardKey) + delete(rawMsg, key) case "_ts": err = unpopulate(val, "Ts", &m.Ts) delete(rawMsg, key) @@ -6821,11 +5315,10 @@ func (m *MongoDBDatabaseGetPropertiesResource) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoDBDatabaseGetResults. -func (m MongoDBDatabaseGetResults) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionGetResults. +func (m MongoDBCollectionGetResults) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", m.ID) - populate(objectMap, "identity", m.Identity) populate(objectMap, "location", m.Location) populate(objectMap, "name", m.Name) populate(objectMap, "properties", m.Properties) @@ -6834,8 +5327,8 @@ func (m MongoDBDatabaseGetResults) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBDatabaseGetResults. -func (m *MongoDBDatabaseGetResults) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBCollectionGetResults. +func (m *MongoDBCollectionGetResults) 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) @@ -6846,9 +5339,6 @@ func (m *MongoDBDatabaseGetResults) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &m.Identity) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &m.Location) delete(rawMsg, key) @@ -6872,15 +5362,15 @@ func (m *MongoDBDatabaseGetResults) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoDBDatabaseListResult. -func (m MongoDBDatabaseListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionListResult. +func (m MongoDBCollectionListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "value", m.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBDatabaseListResult. -func (m *MongoDBDatabaseListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBCollectionListResult. +func (m *MongoDBCollectionListResult) 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) @@ -6899,17 +5389,18 @@ func (m *MongoDBDatabaseListResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoDBDatabaseResource. -func (m MongoDBDatabaseResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionResource. +func (m MongoDBCollectionResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "createMode", m.CreateMode) + populate(objectMap, "analyticalStorageTtl", m.AnalyticalStorageTTL) populate(objectMap, "id", m.ID) - populate(objectMap, "restoreParameters", m.RestoreParameters) + populate(objectMap, "indexes", m.Indexes) + populate(objectMap, "shardKey", m.ShardKey) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBDatabaseResource. -func (m *MongoDBDatabaseResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBCollectionResource. +func (m *MongoDBCollectionResource) 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) @@ -6917,14 +5408,17 @@ func (m *MongoDBDatabaseResource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "createMode": - err = unpopulate(val, "CreateMode", &m.CreateMode) + case "analyticalStorageTtl": + err = unpopulate(val, "AnalyticalStorageTTL", &m.AnalyticalStorageTTL) delete(rawMsg, key) case "id": err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) - case "restoreParameters": - err = unpopulate(val, "RestoreParameters", &m.RestoreParameters) + case "indexes": + err = unpopulate(val, "Indexes", &m.Indexes) + delete(rawMsg, key) + case "shardKey": + err = unpopulate(val, "ShardKey", &m.ShardKey) delete(rawMsg, key) } if err != nil { @@ -6934,16 +5428,20 @@ func (m *MongoDBDatabaseResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoIndex. -func (m MongoIndex) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoDBDatabaseCreateUpdateParameters. +func (m MongoDBDatabaseCreateUpdateParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "key", m.Key) - populate(objectMap, "options", m.Options) + populate(objectMap, "id", m.ID) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoIndex. -func (m *MongoIndex) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBDatabaseCreateUpdateParameters. +func (m *MongoDBDatabaseCreateUpdateParameters) 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) @@ -6951,11 +5449,23 @@ func (m *MongoIndex) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "key": - err = unpopulate(val, "Key", &m.Key) + case "id": + err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) - case "options": - err = unpopulate(val, "Options", &m.Options) + 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 "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) } if err != nil { @@ -6965,15 +5475,16 @@ func (m *MongoIndex) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoIndexKeys. -func (m MongoIndexKeys) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoDBDatabaseCreateUpdateProperties. +func (m MongoDBDatabaseCreateUpdateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "keys", m.Keys) + populate(objectMap, "options", m.Options) + populate(objectMap, "resource", m.Resource) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoIndexKeys. -func (m *MongoIndexKeys) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBDatabaseCreateUpdateProperties. +func (m *MongoDBDatabaseCreateUpdateProperties) 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) @@ -6981,8 +5492,11 @@ func (m *MongoIndexKeys) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "keys": - err = unpopulate(val, "Keys", &m.Keys) + case "options": + err = unpopulate(val, "Options", &m.Options) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &m.Resource) delete(rawMsg, key) } if err != nil { @@ -6992,16 +5506,16 @@ func (m *MongoIndexKeys) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoIndexOptions. -func (m MongoIndexOptions) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoDBDatabaseGetProperties. +func (m MongoDBDatabaseGetProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "expireAfterSeconds", m.ExpireAfterSeconds) - populate(objectMap, "unique", m.Unique) + populate(objectMap, "options", m.Options) + populate(objectMap, "resource", m.Resource) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoIndexOptions. -func (m *MongoIndexOptions) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBDatabaseGetProperties. +func (m *MongoDBDatabaseGetProperties) 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) @@ -7009,11 +5523,11 @@ func (m *MongoIndexOptions) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "expireAfterSeconds": - err = unpopulate(val, "ExpireAfterSeconds", &m.ExpireAfterSeconds) + case "options": + err = unpopulate(val, "Options", &m.Options) delete(rawMsg, key) - case "unique": - err = unpopulate(val, "Unique", &m.Unique) + case "resource": + err = unpopulate(val, "Resource", &m.Resource) delete(rawMsg, key) } if err != nil { @@ -7023,15 +5537,16 @@ func (m *MongoIndexOptions) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoRoleDefinitionCreateUpdateParameters. -func (m MongoRoleDefinitionCreateUpdateParameters) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoDBDatabaseGetPropertiesOptions. +func (m MongoDBDatabaseGetPropertiesOptions) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "properties", m.Properties) + populate(objectMap, "autoscaleSettings", m.AutoscaleSettings) + populate(objectMap, "throughput", m.Throughput) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoRoleDefinitionCreateUpdateParameters. -func (m *MongoRoleDefinitionCreateUpdateParameters) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBDatabaseGetPropertiesOptions. +func (m *MongoDBDatabaseGetPropertiesOptions) 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) @@ -7039,8 +5554,11 @@ func (m *MongoRoleDefinitionCreateUpdateParameters) UnmarshalJSON(data []byte) e for key, val := range rawMsg { var err error switch key { - case "properties": - err = unpopulate(val, "Properties", &m.Properties) + case "autoscaleSettings": + err = unpopulate(val, "AutoscaleSettings", &m.AutoscaleSettings) + delete(rawMsg, key) + case "throughput": + err = unpopulate(val, "Throughput", &m.Throughput) delete(rawMsg, key) } if err != nil { @@ -7050,18 +5568,18 @@ func (m *MongoRoleDefinitionCreateUpdateParameters) UnmarshalJSON(data []byte) e return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoRoleDefinitionGetResults. -func (m MongoRoleDefinitionGetResults) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoDBDatabaseGetPropertiesResource. +func (m MongoDBDatabaseGetPropertiesResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "_etag", m.Etag) populate(objectMap, "id", m.ID) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "type", m.Type) + populate(objectMap, "_rid", m.Rid) + populate(objectMap, "_ts", m.Ts) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoRoleDefinitionGetResults. -func (m *MongoRoleDefinitionGetResults) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBDatabaseGetPropertiesResource. +func (m *MongoDBDatabaseGetPropertiesResource) 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) @@ -7069,17 +5587,17 @@ func (m *MongoRoleDefinitionGetResults) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "_etag": + err = unpopulate(val, "Etag", &m.Etag) + delete(rawMsg, key) case "id": err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) + case "_rid": + err = unpopulate(val, "Rid", &m.Rid) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) + case "_ts": + err = unpopulate(val, "Ts", &m.Ts) delete(rawMsg, key) } if err != nil { @@ -7089,15 +5607,20 @@ func (m *MongoRoleDefinitionGetResults) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoRoleDefinitionListResult. -func (m MongoRoleDefinitionListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoDBDatabaseGetResults. +func (m MongoDBDatabaseGetResults) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", m.Value) + populate(objectMap, "id", m.ID) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoRoleDefinitionListResult. -func (m *MongoRoleDefinitionListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBDatabaseGetResults. +func (m *MongoDBDatabaseGetResults) 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) @@ -7105,8 +5628,23 @@ func (m *MongoRoleDefinitionListResult) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &m.Value) + 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 "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) } if err != nil { @@ -7116,19 +5654,15 @@ func (m *MongoRoleDefinitionListResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoRoleDefinitionResource. -func (m MongoRoleDefinitionResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoDBDatabaseListResult. +func (m MongoDBDatabaseListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "databaseName", m.DatabaseName) - populate(objectMap, "privileges", m.Privileges) - populate(objectMap, "roleName", m.RoleName) - populate(objectMap, "roles", m.Roles) - populate(objectMap, "type", m.Type) + populate(objectMap, "value", m.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoRoleDefinitionResource. -func (m *MongoRoleDefinitionResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBDatabaseListResult. +func (m *MongoDBDatabaseListResult) 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) @@ -7136,20 +5670,8 @@ func (m *MongoRoleDefinitionResource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "databaseName": - err = unpopulate(val, "DatabaseName", &m.DatabaseName) - delete(rawMsg, key) - case "privileges": - err = unpopulate(val, "Privileges", &m.Privileges) - delete(rawMsg, key) - case "roleName": - err = unpopulate(val, "RoleName", &m.RoleName) - delete(rawMsg, key) - case "roles": - err = unpopulate(val, "Roles", &m.Roles) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) + case "value": + err = unpopulate(val, "Value", &m.Value) delete(rawMsg, key) } if err != nil { @@ -7159,15 +5681,15 @@ func (m *MongoRoleDefinitionResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoUserDefinitionCreateUpdateParameters. -func (m MongoUserDefinitionCreateUpdateParameters) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoDBDatabaseResource. +func (m MongoDBDatabaseResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "properties", m.Properties) + populate(objectMap, "id", m.ID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoUserDefinitionCreateUpdateParameters. -func (m *MongoUserDefinitionCreateUpdateParameters) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBDatabaseResource. +func (m *MongoDBDatabaseResource) 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) @@ -7175,8 +5697,8 @@ func (m *MongoUserDefinitionCreateUpdateParameters) UnmarshalJSON(data []byte) e for key, val := range rawMsg { var err error switch key { - case "properties": - err = unpopulate(val, "Properties", &m.Properties) + case "id": + err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) } if err != nil { @@ -7186,18 +5708,16 @@ func (m *MongoUserDefinitionCreateUpdateParameters) UnmarshalJSON(data []byte) e return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoUserDefinitionGetResults. -func (m MongoUserDefinitionGetResults) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoIndex. +func (m MongoIndex) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", m.ID) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "type", m.Type) + populate(objectMap, "key", m.Key) + populate(objectMap, "options", m.Options) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoUserDefinitionGetResults. -func (m *MongoUserDefinitionGetResults) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoIndex. +func (m *MongoIndex) 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) @@ -7205,17 +5725,11 @@ func (m *MongoUserDefinitionGetResults) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &m.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) + case "key": + err = unpopulate(val, "Key", &m.Key) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) + case "options": + err = unpopulate(val, "Options", &m.Options) delete(rawMsg, key) } if err != nil { @@ -7225,15 +5739,15 @@ func (m *MongoUserDefinitionGetResults) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoUserDefinitionListResult. -func (m MongoUserDefinitionListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoIndexKeys. +func (m MongoIndexKeys) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", m.Value) + populate(objectMap, "keys", m.Keys) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoUserDefinitionListResult. -func (m *MongoUserDefinitionListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoIndexKeys. +func (m *MongoIndexKeys) 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) @@ -7241,8 +5755,8 @@ func (m *MongoUserDefinitionListResult) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &m.Value) + case "keys": + err = unpopulate(val, "Keys", &m.Keys) delete(rawMsg, key) } if err != nil { @@ -7252,20 +5766,16 @@ func (m *MongoUserDefinitionListResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoUserDefinitionResource. -func (m MongoUserDefinitionResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoIndexOptions. +func (m MongoIndexOptions) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "customData", m.CustomData) - populate(objectMap, "databaseName", m.DatabaseName) - populate(objectMap, "mechanisms", m.Mechanisms) - populate(objectMap, "password", m.Password) - populate(objectMap, "roles", m.Roles) - populate(objectMap, "userName", m.UserName) + populate(objectMap, "expireAfterSeconds", m.ExpireAfterSeconds) + populate(objectMap, "unique", m.Unique) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoUserDefinitionResource. -func (m *MongoUserDefinitionResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoIndexOptions. +func (m *MongoIndexOptions) 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) @@ -7273,23 +5783,11 @@ func (m *MongoUserDefinitionResource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "customData": - err = unpopulate(val, "CustomData", &m.CustomData) - delete(rawMsg, key) - case "databaseName": - err = unpopulate(val, "DatabaseName", &m.DatabaseName) - delete(rawMsg, key) - case "mechanisms": - err = unpopulate(val, "Mechanisms", &m.Mechanisms) - delete(rawMsg, key) - case "password": - err = unpopulate(val, "Password", &m.Password) - delete(rawMsg, key) - case "roles": - err = unpopulate(val, "Roles", &m.Roles) + case "expireAfterSeconds": + err = unpopulate(val, "ExpireAfterSeconds", &m.ExpireAfterSeconds) delete(rawMsg, key) - case "userName": - err = unpopulate(val, "UserName", &m.UserName) + case "unique": + err = unpopulate(val, "Unique", &m.Unique) delete(rawMsg, key) } if err != nil { @@ -7299,656 +5797,593 @@ func (m *MongoUserDefinitionResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type NotebookWorkspace. -func (n NotebookWorkspace) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoRoleDefinitionCreateUpdateParameters. +func (m MongoRoleDefinitionCreateUpdateParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", n.ID) - populate(objectMap, "name", n.Name) - populate(objectMap, "properties", n.Properties) - populate(objectMap, "type", n.Type) + populate(objectMap, "properties", m.Properties) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NotebookWorkspace. -func (n *NotebookWorkspace) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoRoleDefinitionCreateUpdateParameters. +func (m *MongoRoleDefinitionCreateUpdateParameters) 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", n, err) + 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", &n.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &n.Name) - delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &n.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &n.Type) + err = unpopulate(val, "Properties", &m.Properties) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type NotebookWorkspaceConnectionInfoResult. -func (n NotebookWorkspaceConnectionInfoResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoRoleDefinitionGetResults. +func (m MongoRoleDefinitionGetResults) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "authToken", n.AuthToken) - populate(objectMap, "notebookServerEndpoint", n.NotebookServerEndpoint) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NotebookWorkspaceConnectionInfoResult. -func (n *NotebookWorkspaceConnectionInfoResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoRoleDefinitionGetResults. +func (m *MongoRoleDefinitionGetResults) 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", n, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "authToken": - err = unpopulate(val, "AuthToken", &n.AuthToken) + case "id": + err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) - case "notebookServerEndpoint": - err = unpopulate(val, "NotebookServerEndpoint", &n.NotebookServerEndpoint) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type NotebookWorkspaceCreateUpdateParameters. -func (n NotebookWorkspaceCreateUpdateParameters) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoRoleDefinitionListResult. +func (m MongoRoleDefinitionListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", n.ID) - populate(objectMap, "name", n.Name) - populate(objectMap, "type", n.Type) + populate(objectMap, "value", m.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NotebookWorkspaceCreateUpdateParameters. -func (n *NotebookWorkspaceCreateUpdateParameters) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoRoleDefinitionListResult. +func (m *MongoRoleDefinitionListResult) 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", n, err) + 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", &n.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &n.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &n.Type) + case "value": + err = unpopulate(val, "Value", &m.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type NotebookWorkspaceListResult. -func (n NotebookWorkspaceListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoRoleDefinitionResource. +func (m MongoRoleDefinitionResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", n.Value) + populate(objectMap, "databaseName", m.DatabaseName) + populate(objectMap, "privileges", m.Privileges) + populate(objectMap, "roleName", m.RoleName) + populate(objectMap, "roles", m.Roles) + populate(objectMap, "type", m.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NotebookWorkspaceListResult. -func (n *NotebookWorkspaceListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoRoleDefinitionResource. +func (m *MongoRoleDefinitionResource) 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", n, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &n.Value) + case "databaseName": + err = unpopulate(val, "DatabaseName", &m.DatabaseName) + delete(rawMsg, key) + case "privileges": + err = unpopulate(val, "Privileges", &m.Privileges) + delete(rawMsg, key) + case "roleName": + err = unpopulate(val, "RoleName", &m.RoleName) + delete(rawMsg, key) + case "roles": + err = unpopulate(val, "Roles", &m.Roles) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type NotebookWorkspaceProperties. -func (n NotebookWorkspaceProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoUserDefinitionCreateUpdateParameters. +func (m MongoUserDefinitionCreateUpdateParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "notebookServerEndpoint", n.NotebookServerEndpoint) - populate(objectMap, "status", n.Status) + populate(objectMap, "properties", m.Properties) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NotebookWorkspaceProperties. -func (n *NotebookWorkspaceProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoUserDefinitionCreateUpdateParameters. +func (m *MongoUserDefinitionCreateUpdateParameters) 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", n, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "notebookServerEndpoint": - err = unpopulate(val, "NotebookServerEndpoint", &n.NotebookServerEndpoint) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &n.Status) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + 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) { +// MarshalJSON implements the json.Marshaller interface for type MongoUserDefinitionGetResults. +func (m MongoUserDefinitionGetResults) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "display", o.Display) - populate(objectMap, "name", o.Name) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Operation. -func (o *Operation) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoUserDefinitionGetResults. +func (m *MongoUserDefinitionGetResults) 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", o, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "display": - err = unpopulate(val, "Display", &o.Display) + case "id": + err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &o.Name) + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type OperationDisplay. -func (o OperationDisplay) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoUserDefinitionListResult. +func (m MongoUserDefinitionListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "Description", o.Description) - populate(objectMap, "Operation", o.Operation) - populate(objectMap, "Provider", o.Provider) - populate(objectMap, "Resource", o.Resource) + populate(objectMap, "value", m.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay. -func (o *OperationDisplay) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoUserDefinitionListResult. +func (m *MongoUserDefinitionListResult) 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", o, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "Description": - err = unpopulate(val, "Description", &o.Description) - delete(rawMsg, key) - case "Operation": - err = unpopulate(val, "Operation", &o.Operation) - delete(rawMsg, key) - case "Provider": - err = unpopulate(val, "Provider", &o.Provider) - delete(rawMsg, key) - case "Resource": - err = unpopulate(val, "Resource", &o.Resource) + case "value": + err = unpopulate(val, "Value", &m.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type OperationListResult. -func (o OperationListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MongoUserDefinitionResource. +func (m MongoUserDefinitionResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", o.NextLink) - populate(objectMap, "value", o.Value) + populate(objectMap, "customData", m.CustomData) + populate(objectMap, "databaseName", m.DatabaseName) + populate(objectMap, "mechanisms", m.Mechanisms) + populate(objectMap, "password", m.Password) + populate(objectMap, "roles", m.Roles) + populate(objectMap, "userName", m.UserName) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult. -func (o *OperationListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MongoUserDefinitionResource. +func (m *MongoUserDefinitionResource) 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", o, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &o.NextLink) + case "customData": + err = unpopulate(val, "CustomData", &m.CustomData) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &o.Value) + case "databaseName": + err = unpopulate(val, "DatabaseName", &m.DatabaseName) + delete(rawMsg, key) + case "mechanisms": + err = unpopulate(val, "Mechanisms", &m.Mechanisms) + delete(rawMsg, key) + case "password": + err = unpopulate(val, "Password", &m.Password) + delete(rawMsg, key) + case "roles": + err = unpopulate(val, "Roles", &m.Roles) + delete(rawMsg, key) + case "userName": + err = unpopulate(val, "UserName", &m.UserName) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type OptionsResource. -func (o OptionsResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NotebookWorkspace. +func (n NotebookWorkspace) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "autoscaleSettings", o.AutoscaleSettings) - populate(objectMap, "throughput", o.Throughput) + populate(objectMap, "id", n.ID) + populate(objectMap, "name", n.Name) + populate(objectMap, "properties", n.Properties) + populate(objectMap, "type", n.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type OptionsResource. -func (o *OptionsResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NotebookWorkspace. +func (n *NotebookWorkspace) 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", o, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } for key, val := range rawMsg { var err error switch key { - case "autoscaleSettings": - err = unpopulate(val, "AutoscaleSettings", &o.AutoscaleSettings) + case "id": + err = unpopulate(val, "ID", &n.ID) delete(rawMsg, key) - case "throughput": - err = unpopulate(val, "Throughput", &o.Throughput) + case "name": + err = unpopulate(val, "Name", &n.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &n.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &n.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PartitionMetric. -func (p PartitionMetric) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NotebookWorkspaceConnectionInfoResult. +func (n NotebookWorkspaceConnectionInfoResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "endTime", p.EndTime) - populate(objectMap, "metricValues", p.MetricValues) - populate(objectMap, "name", p.Name) - populate(objectMap, "partitionId", p.PartitionID) - populate(objectMap, "partitionKeyRangeId", p.PartitionKeyRangeID) - populateTimeRFC3339(objectMap, "startTime", p.StartTime) - populate(objectMap, "timeGrain", p.TimeGrain) - populate(objectMap, "unit", p.Unit) + populate(objectMap, "authToken", n.AuthToken) + populate(objectMap, "notebookServerEndpoint", n.NotebookServerEndpoint) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PartitionMetric. -func (p *PartitionMetric) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NotebookWorkspaceConnectionInfoResult. +func (n *NotebookWorkspaceConnectionInfoResult) 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", p, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } for key, val := range rawMsg { var err error switch key { - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &p.EndTime) - delete(rawMsg, key) - case "metricValues": - err = unpopulate(val, "MetricValues", &p.MetricValues) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "partitionId": - err = unpopulate(val, "PartitionID", &p.PartitionID) - delete(rawMsg, key) - case "partitionKeyRangeId": - err = unpopulate(val, "PartitionKeyRangeID", &p.PartitionKeyRangeID) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &p.StartTime) - delete(rawMsg, key) - case "timeGrain": - err = unpopulate(val, "TimeGrain", &p.TimeGrain) + case "authToken": + err = unpopulate(val, "AuthToken", &n.AuthToken) delete(rawMsg, key) - case "unit": - err = unpopulate(val, "Unit", &p.Unit) + case "notebookServerEndpoint": + err = unpopulate(val, "NotebookServerEndpoint", &n.NotebookServerEndpoint) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PartitionMetricListResult. -func (p PartitionMetricListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NotebookWorkspaceCreateUpdateParameters. +func (n NotebookWorkspaceCreateUpdateParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", p.Value) + populate(objectMap, "id", n.ID) + populate(objectMap, "name", n.Name) + populate(objectMap, "type", n.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PartitionMetricListResult. -func (p *PartitionMetricListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NotebookWorkspaceCreateUpdateParameters. +func (n *NotebookWorkspaceCreateUpdateParameters) 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", p, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &p.Value) + case "id": + err = unpopulate(val, "ID", &n.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &n.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &n.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PartitionUsage. -func (p PartitionUsage) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NotebookWorkspaceListResult. +func (n NotebookWorkspaceListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "currentValue", p.CurrentValue) - populate(objectMap, "limit", p.Limit) - populate(objectMap, "name", p.Name) - populate(objectMap, "partitionId", p.PartitionID) - populate(objectMap, "partitionKeyRangeId", p.PartitionKeyRangeID) - populate(objectMap, "quotaPeriod", p.QuotaPeriod) - populate(objectMap, "unit", p.Unit) + populate(objectMap, "value", n.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PartitionUsage. -func (p *PartitionUsage) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NotebookWorkspaceListResult. +func (n *NotebookWorkspaceListResult) 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", p, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } for key, val := range rawMsg { var err error switch key { - case "currentValue": - err = unpopulate(val, "CurrentValue", &p.CurrentValue) - delete(rawMsg, key) - case "limit": - err = unpopulate(val, "Limit", &p.Limit) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "partitionId": - err = unpopulate(val, "PartitionID", &p.PartitionID) - delete(rawMsg, key) - case "partitionKeyRangeId": - err = unpopulate(val, "PartitionKeyRangeID", &p.PartitionKeyRangeID) - delete(rawMsg, key) - case "quotaPeriod": - err = unpopulate(val, "QuotaPeriod", &p.QuotaPeriod) - delete(rawMsg, key) - case "unit": - err = unpopulate(val, "Unit", &p.Unit) + case "value": + err = unpopulate(val, "Value", &n.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PartitionUsagesResult. -func (p PartitionUsagesResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NotebookWorkspaceProperties. +func (n NotebookWorkspaceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", p.Value) + populate(objectMap, "notebookServerEndpoint", n.NotebookServerEndpoint) + populate(objectMap, "status", n.Status) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PartitionUsagesResult. -func (p *PartitionUsagesResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NotebookWorkspaceProperties. +func (n *NotebookWorkspaceProperties) 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", p, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &p.Value) + case "notebookServerEndpoint": + err = unpopulate(val, "NotebookServerEndpoint", &n.NotebookServerEndpoint) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &n.Status) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PercentileMetric. -func (p PercentileMetric) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Operation. +func (o Operation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "endTime", p.EndTime) - populate(objectMap, "metricValues", p.MetricValues) - populate(objectMap, "name", p.Name) - populateTimeRFC3339(objectMap, "startTime", p.StartTime) - populate(objectMap, "timeGrain", p.TimeGrain) - populate(objectMap, "unit", p.Unit) + populate(objectMap, "display", o.Display) + populate(objectMap, "name", o.Name) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PercentileMetric. -func (p *PercentileMetric) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Operation. +func (o *Operation) 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", p, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &p.EndTime) - delete(rawMsg, key) - case "metricValues": - err = unpopulate(val, "MetricValues", &p.MetricValues) + case "display": + err = unpopulate(val, "Display", &o.Display) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &p.StartTime) - delete(rawMsg, key) - case "timeGrain": - err = unpopulate(val, "TimeGrain", &p.TimeGrain) - delete(rawMsg, key) - case "unit": - err = unpopulate(val, "Unit", &p.Unit) + err = unpopulate(val, "Name", &o.Name) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PercentileMetricListResult. -func (p PercentileMetricListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type OperationDisplay. +func (o OperationDisplay) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", p.Value) + populate(objectMap, "Description", o.Description) + populate(objectMap, "Operation", o.Operation) + populate(objectMap, "Provider", o.Provider) + populate(objectMap, "Resource", o.Resource) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PercentileMetricListResult. -func (p *PercentileMetricListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay. +func (o *OperationDisplay) 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", p, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &p.Value) + case "Description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) + case "Operation": + err = unpopulate(val, "Operation", &o.Operation) + delete(rawMsg, key) + case "Provider": + err = unpopulate(val, "Provider", &o.Provider) + delete(rawMsg, key) + case "Resource": + err = unpopulate(val, "Resource", &o.Resource) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PercentileMetricValue. -func (p PercentileMetricValue) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type OperationListResult. +func (o OperationListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "average", p.Average) - populate(objectMap, "_count", p.Count) - populate(objectMap, "maximum", p.Maximum) - populate(objectMap, "minimum", p.Minimum) - populate(objectMap, "P10", p.P10) - populate(objectMap, "P25", p.P25) - populate(objectMap, "P50", p.P50) - populate(objectMap, "P75", p.P75) - populate(objectMap, "P90", p.P90) - populate(objectMap, "P95", p.P95) - populate(objectMap, "P99", p.P99) - populateTimeRFC3339(objectMap, "timestamp", p.Timestamp) - populate(objectMap, "total", p.Total) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PercentileMetricValue. -func (p *PercentileMetricValue) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult. +func (o *OperationListResult) 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", p, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { - case "average": - err = unpopulate(val, "Average", &p.Average) - delete(rawMsg, key) - case "_count": - err = unpopulate(val, "Count", &p.Count) - delete(rawMsg, key) - case "maximum": - err = unpopulate(val, "Maximum", &p.Maximum) - delete(rawMsg, key) - case "minimum": - err = unpopulate(val, "Minimum", &p.Minimum) - delete(rawMsg, key) - case "P10": - err = unpopulate(val, "P10", &p.P10) - delete(rawMsg, key) - case "P25": - err = unpopulate(val, "P25", &p.P25) - delete(rawMsg, key) - case "P50": - err = unpopulate(val, "P50", &p.P50) - delete(rawMsg, key) - case "P75": - err = unpopulate(val, "P75", &p.P75) - delete(rawMsg, key) - case "P90": - err = unpopulate(val, "P90", &p.P90) - delete(rawMsg, key) - case "P95": - err = unpopulate(val, "P95", &p.P95) - delete(rawMsg, key) - case "P99": - err = unpopulate(val, "P99", &p.P99) - delete(rawMsg, key) - case "timestamp": - err = unpopulateTimeRFC3339(val, "Timestamp", &p.Timestamp) + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) delete(rawMsg, key) - case "total": - err = unpopulate(val, "Total", &p.Total) + case "value": + err = unpopulate(val, "Value", &o.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PeriodicModeBackupPolicy. -func (p PeriodicModeBackupPolicy) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type OptionsResource. +func (o OptionsResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "migrationState", p.MigrationState) - populate(objectMap, "periodicModeProperties", p.PeriodicModeProperties) - objectMap["type"] = BackupPolicyTypePeriodic + populate(objectMap, "autoscaleSettings", o.AutoscaleSettings) + populate(objectMap, "throughput", o.Throughput) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PeriodicModeBackupPolicy. -func (p *PeriodicModeBackupPolicy) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type OptionsResource. +func (o *OptionsResource) 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", p, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { - case "migrationState": - err = unpopulate(val, "MigrationState", &p.MigrationState) - delete(rawMsg, key) - case "periodicModeProperties": - err = unpopulate(val, "PeriodicModeProperties", &p.PeriodicModeProperties) + case "autoscaleSettings": + err = unpopulate(val, "AutoscaleSettings", &o.AutoscaleSettings) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) + case "throughput": + err = unpopulate(val, "Throughput", &o.Throughput) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PeriodicModeProperties. -func (p PeriodicModeProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PartitionMetric. +func (p PartitionMetric) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "backupIntervalInMinutes", p.BackupIntervalInMinutes) - populate(objectMap, "backupRetentionIntervalInHours", p.BackupRetentionIntervalInHours) - populate(objectMap, "backupStorageRedundancy", p.BackupStorageRedundancy) + populateTimeRFC3339(objectMap, "endTime", p.EndTime) + populate(objectMap, "metricValues", p.MetricValues) + populate(objectMap, "name", p.Name) + populate(objectMap, "partitionId", p.PartitionID) + populate(objectMap, "partitionKeyRangeId", p.PartitionKeyRangeID) + populateTimeRFC3339(objectMap, "startTime", p.StartTime) + populate(objectMap, "timeGrain", p.TimeGrain) + populate(objectMap, "unit", p.Unit) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PeriodicModeProperties. -func (p *PeriodicModeProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PartitionMetric. +func (p *PartitionMetric) 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", p, err) @@ -7956,14 +6391,29 @@ func (p *PeriodicModeProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "backupIntervalInMinutes": - err = unpopulate(val, "BackupIntervalInMinutes", &p.BackupIntervalInMinutes) + case "endTime": + err = unpopulateTimeRFC3339(val, "EndTime", &p.EndTime) delete(rawMsg, key) - case "backupRetentionIntervalInHours": - err = unpopulate(val, "BackupRetentionIntervalInHours", &p.BackupRetentionIntervalInHours) + case "metricValues": + err = unpopulate(val, "MetricValues", &p.MetricValues) delete(rawMsg, key) - case "backupStorageRedundancy": - err = unpopulate(val, "BackupStorageRedundancy", &p.BackupStorageRedundancy) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "partitionId": + err = unpopulate(val, "PartitionID", &p.PartitionID) + delete(rawMsg, key) + case "partitionKeyRangeId": + err = unpopulate(val, "PartitionKeyRangeID", &p.PartitionKeyRangeID) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, "StartTime", &p.StartTime) + delete(rawMsg, key) + case "timeGrain": + err = unpopulate(val, "TimeGrain", &p.TimeGrain) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &p.Unit) delete(rawMsg, key) } if err != nil { @@ -7973,16 +6423,15 @@ func (p *PeriodicModeProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type Permission. -func (p Permission) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PartitionMetricListResult. +func (p PartitionMetricListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "dataActions", p.DataActions) - populate(objectMap, "notDataActions", p.NotDataActions) + populate(objectMap, "value", p.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Permission. -func (p *Permission) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PartitionMetricListResult. +func (p *PartitionMetricListResult) 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", p, err) @@ -7990,11 +6439,8 @@ func (p *Permission) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "dataActions": - err = unpopulate(val, "DataActions", &p.DataActions) - delete(rawMsg, key) - case "notDataActions": - err = unpopulate(val, "NotDataActions", &p.NotDataActions) + case "value": + err = unpopulate(val, "Value", &p.Value) delete(rawMsg, key) } if err != nil { @@ -8004,15 +6450,21 @@ func (p *Permission) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type PhysicalPartitionID. -func (p PhysicalPartitionID) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PartitionUsage. +func (p PartitionUsage) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) + populate(objectMap, "currentValue", p.CurrentValue) + populate(objectMap, "limit", p.Limit) + populate(objectMap, "name", p.Name) + populate(objectMap, "partitionId", p.PartitionID) + populate(objectMap, "partitionKeyRangeId", p.PartitionKeyRangeID) + populate(objectMap, "quotaPeriod", p.QuotaPeriod) + populate(objectMap, "unit", p.Unit) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PhysicalPartitionID. -func (p *PhysicalPartitionID) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PartitionUsage. +func (p *PartitionUsage) 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", p, err) @@ -8020,8 +6472,26 @@ func (p *PhysicalPartitionID) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) + case "currentValue": + err = unpopulate(val, "CurrentValue", &p.CurrentValue) + delete(rawMsg, key) + case "limit": + err = unpopulate(val, "Limit", &p.Limit) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "partitionId": + err = unpopulate(val, "PartitionID", &p.PartitionID) + delete(rawMsg, key) + case "partitionKeyRangeId": + err = unpopulate(val, "PartitionKeyRangeID", &p.PartitionKeyRangeID) + delete(rawMsg, key) + case "quotaPeriod": + err = unpopulate(val, "QuotaPeriod", &p.QuotaPeriod) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &p.Unit) delete(rawMsg, key) } if err != nil { @@ -8031,16 +6501,15 @@ func (p *PhysicalPartitionID) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type PhysicalPartitionStorageInfo. -func (p PhysicalPartitionStorageInfo) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PartitionUsagesResult. +func (p PartitionUsagesResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "storageInKB", p.StorageInKB) + populate(objectMap, "value", p.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PhysicalPartitionStorageInfo. -func (p *PhysicalPartitionStorageInfo) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PartitionUsagesResult. +func (p *PartitionUsagesResult) 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", p, err) @@ -8048,11 +6517,8 @@ func (p *PhysicalPartitionStorageInfo) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "storageInKB": - err = unpopulate(val, "StorageInKB", &p.StorageInKB) + case "value": + err = unpopulate(val, "Value", &p.Value) delete(rawMsg, key) } if err != nil { @@ -8062,15 +6528,20 @@ func (p *PhysicalPartitionStorageInfo) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type PhysicalPartitionStorageInfoCollection. -func (p PhysicalPartitionStorageInfoCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PercentileMetric. +func (p PercentileMetric) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "physicalPartitionStorageInfoCollection", p.PhysicalPartitionStorageInfoCollection) + populateTimeRFC3339(objectMap, "endTime", p.EndTime) + populate(objectMap, "metricValues", p.MetricValues) + populate(objectMap, "name", p.Name) + populateTimeRFC3339(objectMap, "startTime", p.StartTime) + populate(objectMap, "timeGrain", p.TimeGrain) + populate(objectMap, "unit", p.Unit) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PhysicalPartitionStorageInfoCollection. -func (p *PhysicalPartitionStorageInfoCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PercentileMetric. +func (p *PercentileMetric) 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", p, err) @@ -8078,8 +6549,23 @@ func (p *PhysicalPartitionStorageInfoCollection) UnmarshalJSON(data []byte) erro for key, val := range rawMsg { var err error switch key { - case "physicalPartitionStorageInfoCollection": - err = unpopulate(val, "PhysicalPartitionStorageInfoCollection", &p.PhysicalPartitionStorageInfoCollection) + case "endTime": + err = unpopulateTimeRFC3339(val, "EndTime", &p.EndTime) + delete(rawMsg, key) + case "metricValues": + err = unpopulate(val, "MetricValues", &p.MetricValues) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, "StartTime", &p.StartTime) + delete(rawMsg, key) + case "timeGrain": + err = unpopulate(val, "TimeGrain", &p.TimeGrain) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &p.Unit) delete(rawMsg, key) } if err != nil { @@ -8089,15 +6575,15 @@ func (p *PhysicalPartitionStorageInfoCollection) UnmarshalJSON(data []byte) erro return nil } -// MarshalJSON implements the json.Marshaller interface for type PhysicalPartitionThroughputInfoProperties. -func (p PhysicalPartitionThroughputInfoProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PercentileMetricListResult. +func (p PercentileMetricListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "physicalPartitionThroughputInfo", p.PhysicalPartitionThroughputInfo) + populate(objectMap, "value", p.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PhysicalPartitionThroughputInfoProperties. -func (p *PhysicalPartitionThroughputInfoProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PercentileMetricListResult. +func (p *PercentileMetricListResult) 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", p, err) @@ -8105,8 +6591,8 @@ func (p *PhysicalPartitionThroughputInfoProperties) UnmarshalJSON(data []byte) e for key, val := range rawMsg { var err error switch key { - case "physicalPartitionThroughputInfo": - err = unpopulate(val, "PhysicalPartitionThroughputInfo", &p.PhysicalPartitionThroughputInfo) + case "value": + err = unpopulate(val, "Value", &p.Value) delete(rawMsg, key) } if err != nil { @@ -8116,16 +6602,27 @@ func (p *PhysicalPartitionThroughputInfoProperties) UnmarshalJSON(data []byte) e return nil } -// MarshalJSON implements the json.Marshaller interface for type PhysicalPartitionThroughputInfoResource. -func (p PhysicalPartitionThroughputInfoResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PercentileMetricValue. +func (p PercentileMetricValue) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "throughput", p.Throughput) + populate(objectMap, "average", p.Average) + populate(objectMap, "_count", p.Count) + populate(objectMap, "maximum", p.Maximum) + populate(objectMap, "minimum", p.Minimum) + populate(objectMap, "P10", p.P10) + populate(objectMap, "P25", p.P25) + populate(objectMap, "P50", p.P50) + populate(objectMap, "P75", p.P75) + populate(objectMap, "P90", p.P90) + populate(objectMap, "P95", p.P95) + populate(objectMap, "P99", p.P99) + populateTimeRFC3339(objectMap, "timestamp", p.Timestamp) + populate(objectMap, "total", p.Total) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PhysicalPartitionThroughputInfoResource. -func (p *PhysicalPartitionThroughputInfoResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PercentileMetricValue. +func (p *PercentileMetricValue) 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", p, err) @@ -8133,11 +6630,44 @@ func (p *PhysicalPartitionThroughputInfoResource) UnmarshalJSON(data []byte) err for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) + case "average": + err = unpopulate(val, "Average", &p.Average) delete(rawMsg, key) - case "throughput": - err = unpopulate(val, "Throughput", &p.Throughput) + case "_count": + err = unpopulate(val, "Count", &p.Count) + delete(rawMsg, key) + case "maximum": + err = unpopulate(val, "Maximum", &p.Maximum) + delete(rawMsg, key) + case "minimum": + err = unpopulate(val, "Minimum", &p.Minimum) + delete(rawMsg, key) + case "P10": + err = unpopulate(val, "P10", &p.P10) + delete(rawMsg, key) + case "P25": + err = unpopulate(val, "P25", &p.P25) + delete(rawMsg, key) + case "P50": + err = unpopulate(val, "P50", &p.P50) + delete(rawMsg, key) + case "P75": + err = unpopulate(val, "P75", &p.P75) + delete(rawMsg, key) + case "P90": + err = unpopulate(val, "P90", &p.P90) + delete(rawMsg, key) + case "P95": + err = unpopulate(val, "P95", &p.P95) + delete(rawMsg, key) + case "P99": + err = unpopulate(val, "P99", &p.P99) + delete(rawMsg, key) + case "timestamp": + err = unpopulateTimeRFC3339(val, "Timestamp", &p.Timestamp) + delete(rawMsg, key) + case "total": + err = unpopulate(val, "Total", &p.Total) delete(rawMsg, key) } if err != nil { @@ -8147,21 +6677,17 @@ func (p *PhysicalPartitionThroughputInfoResource) UnmarshalJSON(data []byte) err return nil } -// MarshalJSON implements the json.Marshaller interface for type PhysicalPartitionThroughputInfoResult. -func (p PhysicalPartitionThroughputInfoResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PeriodicModeBackupPolicy. +func (p PeriodicModeBackupPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "identity", p.Identity) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) + populate(objectMap, "migrationState", p.MigrationState) + populate(objectMap, "periodicModeProperties", p.PeriodicModeProperties) + objectMap["type"] = BackupPolicyTypePeriodic return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PhysicalPartitionThroughputInfoResult. -func (p *PhysicalPartitionThroughputInfoResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PeriodicModeBackupPolicy. +func (p *PeriodicModeBackupPolicy) 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", p, err) @@ -8169,23 +6695,11 @@ func (p *PhysicalPartitionThroughputInfoResult) UnmarshalJSON(data []byte) error for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &p.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &p.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) + case "migrationState": + err = unpopulate(val, "MigrationState", &p.MigrationState) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &p.Tags) + case "periodicModeProperties": + err = unpopulate(val, "PeriodicModeProperties", &p.PeriodicModeProperties) delete(rawMsg, key) case "type": err = unpopulate(val, "Type", &p.Type) @@ -8198,15 +6712,17 @@ func (p *PhysicalPartitionThroughputInfoResult) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type PhysicalPartitionThroughputInfoResultProperties. -func (p PhysicalPartitionThroughputInfoResultProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PeriodicModeProperties. +func (p PeriodicModeProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "resource", p.Resource) + populate(objectMap, "backupIntervalInMinutes", p.BackupIntervalInMinutes) + populate(objectMap, "backupRetentionIntervalInHours", p.BackupRetentionIntervalInHours) + populate(objectMap, "backupStorageRedundancy", p.BackupStorageRedundancy) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PhysicalPartitionThroughputInfoResultProperties. -func (p *PhysicalPartitionThroughputInfoResultProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PeriodicModeProperties. +func (p *PeriodicModeProperties) 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", p, err) @@ -8214,8 +6730,14 @@ func (p *PhysicalPartitionThroughputInfoResultProperties) UnmarshalJSON(data []b for key, val := range rawMsg { var err error switch key { - case "resource": - err = unpopulate(val, "Resource", &p.Resource) + case "backupIntervalInMinutes": + err = unpopulate(val, "BackupIntervalInMinutes", &p.BackupIntervalInMinutes) + delete(rawMsg, key) + case "backupRetentionIntervalInHours": + err = unpopulate(val, "BackupRetentionIntervalInHours", &p.BackupRetentionIntervalInHours) + delete(rawMsg, key) + case "backupStorageRedundancy": + err = unpopulate(val, "BackupStorageRedundancy", &p.BackupStorageRedundancy) delete(rawMsg, key) } if err != nil { @@ -8225,15 +6747,16 @@ func (p *PhysicalPartitionThroughputInfoResultProperties) UnmarshalJSON(data []b return nil } -// MarshalJSON implements the json.Marshaller interface for type PhysicalPartitionThroughputInfoResultPropertiesResource. -func (p PhysicalPartitionThroughputInfoResultPropertiesResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Permission. +func (p Permission) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "physicalPartitionThroughputInfo", p.PhysicalPartitionThroughputInfo) + populate(objectMap, "dataActions", p.DataActions) + populate(objectMap, "notDataActions", p.NotDataActions) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PhysicalPartitionThroughputInfoResultPropertiesResource. -func (p *PhysicalPartitionThroughputInfoResultPropertiesResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Permission. +func (p *Permission) 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", p, err) @@ -8241,8 +6764,11 @@ func (p *PhysicalPartitionThroughputInfoResultPropertiesResource) UnmarshalJSON( for key, val := range rawMsg { var err error switch key { - case "physicalPartitionThroughputInfo": - err = unpopulate(val, "PhysicalPartitionThroughputInfo", &p.PhysicalPartitionThroughputInfo) + case "dataActions": + err = unpopulate(val, "DataActions", &p.DataActions) + delete(rawMsg, key) + case "notDataActions": + err = unpopulate(val, "NotDataActions", &p.NotDataActions) delete(rawMsg, key) } if err != nil { @@ -8559,172 +7085,59 @@ func (p PrivilegeResource) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivilegeResource. -func (p *PrivilegeResource) 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", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "collection": - err = unpopulate(val, "Collection", &p.Collection) - delete(rawMsg, key) - case "db": - err = unpopulate(val, "Db", &p.Db) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProxyResource. -func (p ProxyResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource. -func (p *ProxyResource) 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", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RedistributeThroughputParameters. -func (r RedistributeThroughputParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", r.ID) - populate(objectMap, "identity", r.Identity) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "tags", r.Tags) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RedistributeThroughputParameters. -func (r *RedistributeThroughputParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &r.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &r.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &r.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RedistributeThroughputProperties. -func (r RedistributeThroughputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "resource", r.Resource) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RedistributeThroughputProperties. -func (r *RedistributeThroughputProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivilegeResource. +func (p *PrivilegeResource) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "resource": - err = unpopulate(val, "Resource", &r.Resource) + case "collection": + err = unpopulate(val, "Collection", &p.Collection) + delete(rawMsg, key) + case "db": + err = unpopulate(val, "Db", &p.Db) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type RedistributeThroughputPropertiesResource. -func (r RedistributeThroughputPropertiesResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ProxyResource. +func (p ProxyResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "sourcePhysicalPartitionThroughputInfo", r.SourcePhysicalPartitionThroughputInfo) - populate(objectMap, "targetPhysicalPartitionThroughputInfo", r.TargetPhysicalPartitionThroughputInfo) - populate(objectMap, "throughputPolicy", r.ThroughputPolicy) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "type", p.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type RedistributeThroughputPropertiesResource. -func (r *RedistributeThroughputPropertiesResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource. +func (p *ProxyResource) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "sourcePhysicalPartitionThroughputInfo": - err = unpopulate(val, "SourcePhysicalPartitionThroughputInfo", &r.SourcePhysicalPartitionThroughputInfo) + case "id": + err = unpopulate(val, "ID", &p.ID) delete(rawMsg, key) - case "targetPhysicalPartitionThroughputInfo": - err = unpopulate(val, "TargetPhysicalPartitionThroughputInfo", &r.TargetPhysicalPartitionThroughputInfo) + case "name": + err = unpopulate(val, "Name", &p.Name) delete(rawMsg, key) - case "throughputPolicy": - err = unpopulate(val, "ThroughputPolicy", &r.ThroughputPolicy) + case "type": + err = unpopulate(val, "Type", &p.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil @@ -8827,37 +7240,6 @@ func (r *Resource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ResourceRestoreParameters. -func (r ResourceRestoreParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "restoreSource", r.RestoreSource) - populateTimeRFC3339(objectMap, "restoreTimestampInUtc", r.RestoreTimestampInUTC) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceRestoreParameters. -func (r *ResourceRestoreParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "restoreSource": - err = unpopulate(val, "RestoreSource", &r.RestoreSource) - delete(rawMsg, key) - case "restoreTimestampInUtc": - err = unpopulateTimeRFC3339(val, "RestoreTimestampInUTC", &r.RestoreTimestampInUTC) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type RestorableDatabaseAccountGetResult. func (r RestorableDatabaseAccountGetResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -8908,7 +7290,6 @@ func (r RestorableDatabaseAccountProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "accountName", r.AccountName) populateTimeRFC3339(objectMap, "creationTime", r.CreationTime) populateTimeRFC3339(objectMap, "deletionTime", r.DeletionTime) - populateTimeRFC3339(objectMap, "oldestRestorableTime", r.OldestRestorableTime) populate(objectMap, "restorableLocations", r.RestorableLocations) return json.Marshal(objectMap) } @@ -8934,9 +7315,6 @@ func (r *RestorableDatabaseAccountProperties) UnmarshalJSON(data []byte) error { case "deletionTime": err = unpopulateTimeRFC3339(val, "DeletionTime", &r.DeletionTime) delete(rawMsg, key) - case "oldestRestorableTime": - err = unpopulateTimeRFC3339(val, "OldestRestorableTime", &r.OldestRestorableTime) - delete(rawMsg, key) case "restorableLocations": err = unpopulate(val, "RestorableLocations", &r.RestorableLocations) delete(rawMsg, key) @@ -9817,13 +8195,11 @@ func (r RestorableSQLContainerPropertiesResourceContainer) MarshalJSON() ([]byte populate(objectMap, "analyticalStorageTtl", r.AnalyticalStorageTTL) populate(objectMap, "clientEncryptionPolicy", r.ClientEncryptionPolicy) populate(objectMap, "conflictResolutionPolicy", r.ConflictResolutionPolicy) - populate(objectMap, "createMode", r.CreateMode) populate(objectMap, "defaultTtl", r.DefaultTTL) populate(objectMap, "_etag", r.Etag) populate(objectMap, "id", r.ID) populate(objectMap, "indexingPolicy", r.IndexingPolicy) populate(objectMap, "partitionKey", r.PartitionKey) - populate(objectMap, "restoreParameters", r.RestoreParameters) populate(objectMap, "_rid", r.Rid) populate(objectMap, "_self", r.Self) populate(objectMap, "_ts", r.Ts) @@ -9849,9 +8225,6 @@ func (r *RestorableSQLContainerPropertiesResourceContainer) UnmarshalJSON(data [ case "conflictResolutionPolicy": err = unpopulate(val, "ConflictResolutionPolicy", &r.ConflictResolutionPolicy) delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &r.CreateMode) - delete(rawMsg, key) case "defaultTtl": err = unpopulate(val, "DefaultTTL", &r.DefaultTTL) delete(rawMsg, key) @@ -9867,9 +8240,6 @@ func (r *RestorableSQLContainerPropertiesResourceContainer) UnmarshalJSON(data [ case "partitionKey": err = unpopulate(val, "PartitionKey", &r.PartitionKey) delete(rawMsg, key) - case "restoreParameters": - err = unpopulate(val, "RestoreParameters", &r.RestoreParameters) - delete(rawMsg, key) case "_rid": err = unpopulate(val, "Rid", &r.Rid) delete(rawMsg, key) @@ -10034,10 +8404,8 @@ func (r *RestorableSQLDatabasePropertiesResource) UnmarshalJSON(data []byte) err func (r RestorableSQLDatabasePropertiesResourceDatabase) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "_colls", r.Colls) - populate(objectMap, "createMode", r.CreateMode) populate(objectMap, "_etag", r.Etag) populate(objectMap, "id", r.ID) - populate(objectMap, "restoreParameters", r.RestoreParameters) populate(objectMap, "_rid", r.Rid) populate(objectMap, "_self", r.Self) populate(objectMap, "_ts", r.Ts) @@ -10057,18 +8425,12 @@ func (r *RestorableSQLDatabasePropertiesResourceDatabase) UnmarshalJSON(data []b case "_colls": err = unpopulate(val, "Colls", &r.Colls) delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &r.CreateMode) - delete(rawMsg, key) case "_etag": err = unpopulate(val, "Etag", &r.Etag) delete(rawMsg, key) case "id": err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) - case "restoreParameters": - err = unpopulate(val, "RestoreParameters", &r.RestoreParameters) - delete(rawMsg, key) case "_rid": err = unpopulate(val, "Rid", &r.Rid) delete(rawMsg, key) @@ -10392,7 +8754,6 @@ func (r RestoreParameters) MarshalJSON() ([]byte, error) { populate(objectMap, "restoreMode", r.RestoreMode) populate(objectMap, "restoreSource", r.RestoreSource) populateTimeRFC3339(objectMap, "restoreTimestampInUtc", r.RestoreTimestampInUTC) - populate(objectMap, "sourceBackupLocation", r.SourceBackupLocation) populate(objectMap, "tablesToRestore", r.TablesToRestore) return json.Marshal(objectMap) } @@ -10421,9 +8782,6 @@ func (r *RestoreParameters) UnmarshalJSON(data []byte) error { case "restoreTimestampInUtc": err = unpopulateTimeRFC3339(val, "RestoreTimestampInUTC", &r.RestoreTimestampInUTC) delete(rawMsg, key) - case "sourceBackupLocation": - err = unpopulate(val, "SourceBackupLocation", &r.SourceBackupLocation) - delete(rawMsg, key) case "tablesToRestore": err = unpopulate(val, "TablesToRestore", &r.TablesToRestore) delete(rawMsg, key) @@ -10435,142 +8793,6 @@ func (r *RestoreParameters) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type RestoreParametersBase. -func (r RestoreParametersBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "restoreSource", r.RestoreSource) - populateTimeRFC3339(objectMap, "restoreTimestampInUtc", r.RestoreTimestampInUTC) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RestoreParametersBase. -func (r *RestoreParametersBase) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "restoreSource": - err = unpopulate(val, "RestoreSource", &r.RestoreSource) - delete(rawMsg, key) - case "restoreTimestampInUtc": - err = unpopulateTimeRFC3339(val, "RestoreTimestampInUTC", &r.RestoreTimestampInUTC) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RetrieveThroughputParameters. -func (r RetrieveThroughputParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", r.ID) - populate(objectMap, "identity", r.Identity) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "tags", r.Tags) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RetrieveThroughputParameters. -func (r *RetrieveThroughputParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &r.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &r.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &r.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RetrieveThroughputProperties. -func (r RetrieveThroughputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "resource", r.Resource) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RetrieveThroughputProperties. -func (r *RetrieveThroughputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "resource": - err = unpopulate(val, "Resource", &r.Resource) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RetrieveThroughputPropertiesResource. -func (r RetrieveThroughputPropertiesResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "physicalPartitionIds", r.PhysicalPartitionIDs) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RetrieveThroughputPropertiesResource. -func (r *RetrieveThroughputPropertiesResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "physicalPartitionIds": - err = unpopulate(val, "PhysicalPartitionIDs", &r.PhysicalPartitionIDs) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type Role. func (r Role) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -10606,7 +8828,6 @@ func (r *Role) UnmarshalJSON(data []byte) error { func (s SQLContainerCreateUpdateParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", s.ID) - populate(objectMap, "identity", s.Identity) populate(objectMap, "location", s.Location) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) @@ -10627,9 +8848,6 @@ func (s *SQLContainerCreateUpdateParameters) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &s.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &s.Identity) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &s.Location) delete(rawMsg, key) @@ -10752,13 +8970,11 @@ func (s SQLContainerGetPropertiesResource) MarshalJSON() ([]byte, error) { populate(objectMap, "analyticalStorageTtl", s.AnalyticalStorageTTL) populate(objectMap, "clientEncryptionPolicy", s.ClientEncryptionPolicy) populate(objectMap, "conflictResolutionPolicy", s.ConflictResolutionPolicy) - populate(objectMap, "createMode", s.CreateMode) populate(objectMap, "defaultTtl", s.DefaultTTL) populate(objectMap, "_etag", s.Etag) populate(objectMap, "id", s.ID) populate(objectMap, "indexingPolicy", s.IndexingPolicy) populate(objectMap, "partitionKey", s.PartitionKey) - populate(objectMap, "restoreParameters", s.RestoreParameters) populate(objectMap, "_rid", s.Rid) populate(objectMap, "_ts", s.Ts) populate(objectMap, "uniqueKeyPolicy", s.UniqueKeyPolicy) @@ -10783,9 +8999,6 @@ func (s *SQLContainerGetPropertiesResource) UnmarshalJSON(data []byte) error { case "conflictResolutionPolicy": err = unpopulate(val, "ConflictResolutionPolicy", &s.ConflictResolutionPolicy) delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &s.CreateMode) - delete(rawMsg, key) case "defaultTtl": err = unpopulate(val, "DefaultTTL", &s.DefaultTTL) delete(rawMsg, key) @@ -10801,9 +9014,6 @@ func (s *SQLContainerGetPropertiesResource) UnmarshalJSON(data []byte) error { case "partitionKey": err = unpopulate(val, "PartitionKey", &s.PartitionKey) delete(rawMsg, key) - case "restoreParameters": - err = unpopulate(val, "RestoreParameters", &s.RestoreParameters) - delete(rawMsg, key) case "_rid": err = unpopulate(val, "Rid", &s.Rid) delete(rawMsg, key) @@ -10825,7 +9035,6 @@ func (s *SQLContainerGetPropertiesResource) UnmarshalJSON(data []byte) error { func (s SQLContainerGetResults) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", s.ID) - populate(objectMap, "identity", s.Identity) populate(objectMap, "location", s.Location) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) @@ -10846,9 +9055,6 @@ func (s *SQLContainerGetResults) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &s.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &s.Identity) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &s.Location) delete(rawMsg, key) @@ -10905,12 +9111,10 @@ func (s SQLContainerResource) MarshalJSON() ([]byte, error) { populate(objectMap, "analyticalStorageTtl", s.AnalyticalStorageTTL) populate(objectMap, "clientEncryptionPolicy", s.ClientEncryptionPolicy) populate(objectMap, "conflictResolutionPolicy", s.ConflictResolutionPolicy) - populate(objectMap, "createMode", s.CreateMode) populate(objectMap, "defaultTtl", s.DefaultTTL) populate(objectMap, "id", s.ID) populate(objectMap, "indexingPolicy", s.IndexingPolicy) populate(objectMap, "partitionKey", s.PartitionKey) - populate(objectMap, "restoreParameters", s.RestoreParameters) populate(objectMap, "uniqueKeyPolicy", s.UniqueKeyPolicy) return json.Marshal(objectMap) } @@ -10933,9 +9137,6 @@ func (s *SQLContainerResource) UnmarshalJSON(data []byte) error { case "conflictResolutionPolicy": err = unpopulate(val, "ConflictResolutionPolicy", &s.ConflictResolutionPolicy) delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &s.CreateMode) - delete(rawMsg, key) case "defaultTtl": err = unpopulate(val, "DefaultTTL", &s.DefaultTTL) delete(rawMsg, key) @@ -10948,9 +9149,6 @@ func (s *SQLContainerResource) UnmarshalJSON(data []byte) error { case "partitionKey": err = unpopulate(val, "PartitionKey", &s.PartitionKey) delete(rawMsg, key) - case "restoreParameters": - err = unpopulate(val, "RestoreParameters", &s.RestoreParameters) - delete(rawMsg, key) case "uniqueKeyPolicy": err = unpopulate(val, "UniqueKeyPolicy", &s.UniqueKeyPolicy) delete(rawMsg, key) @@ -10962,46 +9160,10 @@ func (s *SQLContainerResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type SQLDataTransferDataSourceSink. -func (s SQLDataTransferDataSourceSink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["component"] = DataTransferComponentCosmosDBSQL - populate(objectMap, "containerName", s.ContainerName) - populate(objectMap, "databaseName", s.DatabaseName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SQLDataTransferDataSourceSink. -func (s *SQLDataTransferDataSourceSink) 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", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "component": - err = unpopulate(val, "Component", &s.Component) - delete(rawMsg, key) - case "containerName": - err = unpopulate(val, "ContainerName", &s.ContainerName) - delete(rawMsg, key) - case "databaseName": - err = unpopulate(val, "DatabaseName", &s.DatabaseName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type SQLDatabaseCreateUpdateParameters. func (s SQLDatabaseCreateUpdateParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", s.ID) - populate(objectMap, "identity", s.Identity) populate(objectMap, "location", s.Location) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) @@ -11022,9 +9184,6 @@ func (s *SQLDatabaseCreateUpdateParameters) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &s.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &s.Identity) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &s.Location) delete(rawMsg, key) @@ -11145,10 +9304,8 @@ func (s *SQLDatabaseGetPropertiesOptions) UnmarshalJSON(data []byte) error { func (s SQLDatabaseGetPropertiesResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "_colls", s.Colls) - populate(objectMap, "createMode", s.CreateMode) populate(objectMap, "_etag", s.Etag) populate(objectMap, "id", s.ID) - populate(objectMap, "restoreParameters", s.RestoreParameters) populate(objectMap, "_rid", s.Rid) populate(objectMap, "_ts", s.Ts) populate(objectMap, "_users", s.Users) @@ -11167,18 +9324,12 @@ func (s *SQLDatabaseGetPropertiesResource) UnmarshalJSON(data []byte) error { case "_colls": err = unpopulate(val, "Colls", &s.Colls) delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &s.CreateMode) - delete(rawMsg, key) case "_etag": err = unpopulate(val, "Etag", &s.Etag) delete(rawMsg, key) case "id": err = unpopulate(val, "ID", &s.ID) delete(rawMsg, key) - case "restoreParameters": - err = unpopulate(val, "RestoreParameters", &s.RestoreParameters) - delete(rawMsg, key) case "_rid": err = unpopulate(val, "Rid", &s.Rid) delete(rawMsg, key) @@ -11200,7 +9351,6 @@ func (s *SQLDatabaseGetPropertiesResource) UnmarshalJSON(data []byte) error { func (s SQLDatabaseGetResults) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", s.ID) - populate(objectMap, "identity", s.Identity) populate(objectMap, "location", s.Location) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) @@ -11221,9 +9371,6 @@ func (s *SQLDatabaseGetResults) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &s.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &s.Identity) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &s.Location) delete(rawMsg, key) @@ -11277,9 +9424,7 @@ func (s *SQLDatabaseListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SQLDatabaseResource. func (s SQLDatabaseResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "createMode", s.CreateMode) populate(objectMap, "id", s.ID) - populate(objectMap, "restoreParameters", s.RestoreParameters) return json.Marshal(objectMap) } @@ -11292,15 +9437,9 @@ func (s *SQLDatabaseResource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "createMode": - err = unpopulate(val, "CreateMode", &s.CreateMode) - delete(rawMsg, key) case "id": err = unpopulate(val, "ID", &s.ID) delete(rawMsg, key) - case "restoreParameters": - err = unpopulate(val, "RestoreParameters", &s.RestoreParameters) - delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -11705,7 +9844,6 @@ func (s *SQLRoleDefinitionResource) UnmarshalJSON(data []byte) error { func (s SQLStoredProcedureCreateUpdateParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", s.ID) - populate(objectMap, "identity", s.Identity) populate(objectMap, "location", s.Location) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) @@ -11726,9 +9864,6 @@ func (s *SQLStoredProcedureCreateUpdateParameters) UnmarshalJSON(data []byte) er case "id": err = unpopulate(val, "ID", &s.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &s.Identity) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &s.Location) delete(rawMsg, key) @@ -11857,7 +9992,6 @@ func (s *SQLStoredProcedureGetPropertiesResource) UnmarshalJSON(data []byte) err func (s SQLStoredProcedureGetResults) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", s.ID) - populate(objectMap, "identity", s.Identity) populate(objectMap, "location", s.Location) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) @@ -11878,9 +10012,6 @@ func (s *SQLStoredProcedureGetResults) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &s.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &s.Identity) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &s.Location) delete(rawMsg, key) @@ -11966,7 +10097,6 @@ func (s *SQLStoredProcedureResource) UnmarshalJSON(data []byte) error { func (s SQLTriggerCreateUpdateParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", s.ID) - populate(objectMap, "identity", s.Identity) populate(objectMap, "location", s.Location) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) @@ -11987,9 +10117,6 @@ func (s *SQLTriggerCreateUpdateParameters) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &s.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &s.Identity) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &s.Location) delete(rawMsg, key) @@ -12126,7 +10253,6 @@ func (s *SQLTriggerGetPropertiesResource) UnmarshalJSON(data []byte) error { func (s SQLTriggerGetResults) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", s.ID) - populate(objectMap, "identity", s.Identity) populate(objectMap, "location", s.Location) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) @@ -12147,9 +10273,6 @@ func (s *SQLTriggerGetResults) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &s.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &s.Identity) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &s.Location) delete(rawMsg, key) @@ -12243,7 +10366,6 @@ func (s *SQLTriggerResource) UnmarshalJSON(data []byte) error { func (s SQLUserDefinedFunctionCreateUpdateParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", s.ID) - populate(objectMap, "identity", s.Identity) populate(objectMap, "location", s.Location) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) @@ -12264,9 +10386,6 @@ func (s *SQLUserDefinedFunctionCreateUpdateParameters) UnmarshalJSON(data []byte case "id": err = unpopulate(val, "ID", &s.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &s.Identity) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &s.Location) delete(rawMsg, key) @@ -12395,7 +10514,6 @@ func (s *SQLUserDefinedFunctionGetPropertiesResource) UnmarshalJSON(data []byte) func (s SQLUserDefinedFunctionGetResults) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", s.ID) - populate(objectMap, "identity", s.Identity) populate(objectMap, "location", s.Location) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) @@ -12416,9 +10534,6 @@ func (s *SQLUserDefinedFunctionGetResults) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &s.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &s.Identity) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &s.Location) delete(rawMsg, key) @@ -12795,7 +10910,6 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { func (t TableCreateUpdateParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", t.ID) - populate(objectMap, "identity", t.Identity) populate(objectMap, "location", t.Location) populate(objectMap, "name", t.Name) populate(objectMap, "properties", t.Properties) @@ -12816,9 +10930,6 @@ func (t *TableCreateUpdateParameters) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &t.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &t.Identity) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &t.Location) delete(rawMsg, key) @@ -12938,10 +11049,8 @@ func (t *TableGetPropertiesOptions) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TableGetPropertiesResource. func (t TableGetPropertiesResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "createMode", t.CreateMode) populate(objectMap, "_etag", t.Etag) populate(objectMap, "id", t.ID) - populate(objectMap, "restoreParameters", t.RestoreParameters) populate(objectMap, "_rid", t.Rid) populate(objectMap, "_ts", t.Ts) return json.Marshal(objectMap) @@ -12956,18 +11065,12 @@ func (t *TableGetPropertiesResource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "createMode": - err = unpopulate(val, "CreateMode", &t.CreateMode) - delete(rawMsg, key) case "_etag": err = unpopulate(val, "Etag", &t.Etag) delete(rawMsg, key) case "id": err = unpopulate(val, "ID", &t.ID) delete(rawMsg, key) - case "restoreParameters": - err = unpopulate(val, "RestoreParameters", &t.RestoreParameters) - delete(rawMsg, key) case "_rid": err = unpopulate(val, "Rid", &t.Rid) delete(rawMsg, key) @@ -12986,7 +11089,6 @@ func (t *TableGetPropertiesResource) UnmarshalJSON(data []byte) error { func (t TableGetResults) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", t.ID) - populate(objectMap, "identity", t.Identity) populate(objectMap, "location", t.Location) populate(objectMap, "name", t.Name) populate(objectMap, "properties", t.Properties) @@ -13007,9 +11109,6 @@ func (t *TableGetResults) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &t.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &t.Identity) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &t.Location) delete(rawMsg, key) @@ -13063,9 +11162,7 @@ func (t *TableListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TableResource. func (t TableResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "createMode", t.CreateMode) populate(objectMap, "id", t.ID) - populate(objectMap, "restoreParameters", t.RestoreParameters) return json.Marshal(objectMap) } @@ -13078,15 +11175,9 @@ func (t *TableResource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "createMode": - err = unpopulate(val, "CreateMode", &t.CreateMode) - delete(rawMsg, key) case "id": err = unpopulate(val, "ID", &t.ID) delete(rawMsg, key) - case "restoreParameters": - err = unpopulate(val, "RestoreParameters", &t.RestoreParameters) - delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", t, err) @@ -13208,7 +11299,6 @@ func (t *ThroughputSettingsGetPropertiesResource) UnmarshalJSON(data []byte) err func (t ThroughputSettingsGetResults) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", t.ID) - populate(objectMap, "identity", t.Identity) populate(objectMap, "location", t.Location) populate(objectMap, "name", t.Name) populate(objectMap, "properties", t.Properties) @@ -13229,9 +11319,6 @@ func (t *ThroughputSettingsGetResults) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &t.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &t.Identity) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &t.Location) delete(rawMsg, key) @@ -13298,7 +11385,6 @@ func (t *ThroughputSettingsResource) UnmarshalJSON(data []byte) error { func (t ThroughputSettingsUpdateParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", t.ID) - populate(objectMap, "identity", t.Identity) populate(objectMap, "location", t.Location) populate(objectMap, "name", t.Name) populate(objectMap, "properties", t.Properties) @@ -13319,9 +11405,6 @@ func (t *ThroughputSettingsUpdateParameters) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &t.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &t.Identity) - delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &t.Location) delete(rawMsg, key) diff --git a/sdk/resourcemanager/cosmos/armcosmos/mongodbresources_client.go b/sdk/resourcemanager/cosmos/armcosmos/mongodbresources_client.go index 375fa7bf5dc3..903bf0e42db9 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/mongodbresources_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/mongodbresources_client.go @@ -47,7 +47,7 @@ func NewMongoDBResourcesClient(subscriptionID string, credential azcore.TokenCre // BeginCreateUpdateMongoDBCollection - Create or update an Azure Cosmos DB MongoDB Collection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -70,7 +70,7 @@ func (client *MongoDBResourcesClient) BeginCreateUpdateMongoDBCollection(ctx con // CreateUpdateMongoDBCollection - Create or update an Azure Cosmos DB MongoDB Collection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *MongoDBResourcesClient) createUpdateMongoDBCollection(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, createUpdateMongoDBCollectionParameters MongoDBCollectionCreateUpdateParameters, options *MongoDBResourcesClientBeginCreateUpdateMongoDBCollectionOptions) (*http.Response, error) { req, err := client.createUpdateMongoDBCollectionCreateRequest(ctx, resourceGroupName, accountName, databaseName, collectionName, createUpdateMongoDBCollectionParameters, options) if err != nil { @@ -114,7 +114,7 @@ func (client *MongoDBResourcesClient) createUpdateMongoDBCollectionCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, createUpdateMongoDBCollectionParameters) @@ -123,7 +123,7 @@ func (client *MongoDBResourcesClient) createUpdateMongoDBCollectionCreateRequest // BeginCreateUpdateMongoDBDatabase - Create or updates Azure Cosmos DB MongoDB database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -145,7 +145,7 @@ func (client *MongoDBResourcesClient) BeginCreateUpdateMongoDBDatabase(ctx conte // CreateUpdateMongoDBDatabase - Create or updates Azure Cosmos DB MongoDB database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *MongoDBResourcesClient) createUpdateMongoDBDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, createUpdateMongoDBDatabaseParameters MongoDBDatabaseCreateUpdateParameters, options *MongoDBResourcesClientBeginCreateUpdateMongoDBDatabaseOptions) (*http.Response, error) { req, err := client.createUpdateMongoDBDatabaseCreateRequest(ctx, resourceGroupName, accountName, databaseName, createUpdateMongoDBDatabaseParameters, options) if err != nil { @@ -185,7 +185,7 @@ func (client *MongoDBResourcesClient) createUpdateMongoDBDatabaseCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, createUpdateMongoDBDatabaseParameters) @@ -194,7 +194,7 @@ func (client *MongoDBResourcesClient) createUpdateMongoDBDatabaseCreateRequest(c // BeginCreateUpdateMongoRoleDefinition - Creates or updates an Azure Cosmos DB Mongo Role Definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - mongoRoleDefinitionID - The ID for the Role Definition {dbName.roleName}. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. @@ -216,7 +216,7 @@ func (client *MongoDBResourcesClient) BeginCreateUpdateMongoRoleDefinition(ctx c // CreateUpdateMongoRoleDefinition - Creates or updates an Azure Cosmos DB Mongo Role Definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *MongoDBResourcesClient) createUpdateMongoRoleDefinition(ctx context.Context, mongoRoleDefinitionID string, resourceGroupName string, accountName string, createUpdateMongoRoleDefinitionParameters MongoRoleDefinitionCreateUpdateParameters, options *MongoDBResourcesClientBeginCreateUpdateMongoRoleDefinitionOptions) (*http.Response, error) { req, err := client.createUpdateMongoRoleDefinitionCreateRequest(ctx, mongoRoleDefinitionID, resourceGroupName, accountName, createUpdateMongoRoleDefinitionParameters, options) if err != nil { @@ -256,7 +256,7 @@ func (client *MongoDBResourcesClient) createUpdateMongoRoleDefinitionCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, createUpdateMongoRoleDefinitionParameters) @@ -265,7 +265,7 @@ func (client *MongoDBResourcesClient) createUpdateMongoRoleDefinitionCreateReque // BeginCreateUpdateMongoUserDefinition - Creates or updates an Azure Cosmos DB Mongo User Definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - mongoUserDefinitionID - The ID for the User Definition {dbName.userName}. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. @@ -287,7 +287,7 @@ func (client *MongoDBResourcesClient) BeginCreateUpdateMongoUserDefinition(ctx c // CreateUpdateMongoUserDefinition - Creates or updates an Azure Cosmos DB Mongo User Definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *MongoDBResourcesClient) createUpdateMongoUserDefinition(ctx context.Context, mongoUserDefinitionID string, resourceGroupName string, accountName string, createUpdateMongoUserDefinitionParameters MongoUserDefinitionCreateUpdateParameters, options *MongoDBResourcesClientBeginCreateUpdateMongoUserDefinitionOptions) (*http.Response, error) { req, err := client.createUpdateMongoUserDefinitionCreateRequest(ctx, mongoUserDefinitionID, resourceGroupName, accountName, createUpdateMongoUserDefinitionParameters, options) if err != nil { @@ -327,7 +327,7 @@ func (client *MongoDBResourcesClient) createUpdateMongoUserDefinitionCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, createUpdateMongoUserDefinitionParameters) @@ -336,7 +336,7 @@ func (client *MongoDBResourcesClient) createUpdateMongoUserDefinitionCreateReque // BeginDeleteMongoDBCollection - Deletes an existing Azure Cosmos DB MongoDB Collection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -358,7 +358,7 @@ func (client *MongoDBResourcesClient) BeginDeleteMongoDBCollection(ctx context.C // DeleteMongoDBCollection - Deletes an existing Azure Cosmos DB MongoDB Collection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *MongoDBResourcesClient) deleteMongoDBCollection(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, options *MongoDBResourcesClientBeginDeleteMongoDBCollectionOptions) (*http.Response, error) { req, err := client.deleteMongoDBCollectionCreateRequest(ctx, resourceGroupName, accountName, databaseName, collectionName, options) if err != nil { @@ -402,7 +402,7 @@ func (client *MongoDBResourcesClient) deleteMongoDBCollectionCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -410,7 +410,7 @@ func (client *MongoDBResourcesClient) deleteMongoDBCollectionCreateRequest(ctx c // BeginDeleteMongoDBDatabase - Deletes an existing Azure Cosmos DB MongoDB database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -431,7 +431,7 @@ func (client *MongoDBResourcesClient) BeginDeleteMongoDBDatabase(ctx context.Con // DeleteMongoDBDatabase - Deletes an existing Azure Cosmos DB MongoDB database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *MongoDBResourcesClient) deleteMongoDBDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *MongoDBResourcesClientBeginDeleteMongoDBDatabaseOptions) (*http.Response, error) { req, err := client.deleteMongoDBDatabaseCreateRequest(ctx, resourceGroupName, accountName, databaseName, options) if err != nil { @@ -471,7 +471,7 @@ func (client *MongoDBResourcesClient) deleteMongoDBDatabaseCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -479,7 +479,7 @@ func (client *MongoDBResourcesClient) deleteMongoDBDatabaseCreateRequest(ctx con // BeginDeleteMongoRoleDefinition - Deletes an existing Azure Cosmos DB Mongo Role Definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - mongoRoleDefinitionID - The ID for the Role Definition {dbName.roleName}. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. @@ -500,7 +500,7 @@ func (client *MongoDBResourcesClient) BeginDeleteMongoRoleDefinition(ctx context // DeleteMongoRoleDefinition - Deletes an existing Azure Cosmos DB Mongo Role Definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *MongoDBResourcesClient) deleteMongoRoleDefinition(ctx context.Context, mongoRoleDefinitionID string, resourceGroupName string, accountName string, options *MongoDBResourcesClientBeginDeleteMongoRoleDefinitionOptions) (*http.Response, error) { req, err := client.deleteMongoRoleDefinitionCreateRequest(ctx, mongoRoleDefinitionID, resourceGroupName, accountName, options) if err != nil { @@ -540,7 +540,7 @@ func (client *MongoDBResourcesClient) deleteMongoRoleDefinitionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -549,7 +549,7 @@ func (client *MongoDBResourcesClient) deleteMongoRoleDefinitionCreateRequest(ctx // BeginDeleteMongoUserDefinition - Deletes an existing Azure Cosmos DB Mongo User Definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - mongoUserDefinitionID - The ID for the User Definition {dbName.userName}. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. @@ -570,7 +570,7 @@ func (client *MongoDBResourcesClient) BeginDeleteMongoUserDefinition(ctx context // DeleteMongoUserDefinition - Deletes an existing Azure Cosmos DB Mongo User Definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *MongoDBResourcesClient) deleteMongoUserDefinition(ctx context.Context, mongoUserDefinitionID string, resourceGroupName string, accountName string, options *MongoDBResourcesClientBeginDeleteMongoUserDefinitionOptions) (*http.Response, error) { req, err := client.deleteMongoUserDefinitionCreateRequest(ctx, mongoUserDefinitionID, resourceGroupName, accountName, options) if err != nil { @@ -610,7 +610,7 @@ func (client *MongoDBResourcesClient) deleteMongoUserDefinitionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -619,7 +619,7 @@ func (client *MongoDBResourcesClient) deleteMongoUserDefinitionCreateRequest(ctx // GetMongoDBCollection - Gets the MongoDB collection under an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -669,7 +669,7 @@ func (client *MongoDBResourcesClient) getMongoDBCollectionCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -688,7 +688,7 @@ func (client *MongoDBResourcesClient) getMongoDBCollectionHandleResponse(resp *h // account with the provided name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -738,7 +738,7 @@ func (client *MongoDBResourcesClient) getMongoDBCollectionThroughputCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -756,7 +756,7 @@ func (client *MongoDBResourcesClient) getMongoDBCollectionThroughputHandleRespon // GetMongoDBDatabase - Gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -801,7 +801,7 @@ func (client *MongoDBResourcesClient) getMongoDBDatabaseCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -820,7 +820,7 @@ func (client *MongoDBResourcesClient) getMongoDBDatabaseHandleResponse(resp *htt // account with the provided name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -865,7 +865,7 @@ func (client *MongoDBResourcesClient) getMongoDBDatabaseThroughputCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -883,7 +883,7 @@ func (client *MongoDBResourcesClient) getMongoDBDatabaseThroughputHandleResponse // GetMongoRoleDefinition - Retrieves the properties of an existing Azure Cosmos DB Mongo Role Definition with the given Id. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - mongoRoleDefinitionID - The ID for the Role Definition {dbName.roleName}. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. @@ -928,7 +928,7 @@ func (client *MongoDBResourcesClient) getMongoRoleDefinitionCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -946,7 +946,7 @@ func (client *MongoDBResourcesClient) getMongoRoleDefinitionHandleResponse(resp // GetMongoUserDefinition - Retrieves the properties of an existing Azure Cosmos DB Mongo User Definition with the given Id. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - mongoUserDefinitionID - The ID for the User Definition {dbName.userName}. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. @@ -991,7 +991,7 @@ func (client *MongoDBResourcesClient) getMongoUserDefinitionCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1006,87 +1006,9 @@ func (client *MongoDBResourcesClient) getMongoUserDefinitionHandleResponse(resp return result, nil } -// BeginListMongoDBCollectionPartitionMerge - Merges the partitions of a MongoDB Collection -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - databaseName - Cosmos DB database name. -// - collectionName - Cosmos DB collection name. -// - mergeParameters - The parameters for the merge operation. -// - options - MongoDBResourcesClientBeginListMongoDBCollectionPartitionMergeOptions contains the optional parameters for the -// MongoDBResourcesClient.BeginListMongoDBCollectionPartitionMerge method. -func (client *MongoDBResourcesClient) BeginListMongoDBCollectionPartitionMerge(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, mergeParameters MergeParameters, options *MongoDBResourcesClientBeginListMongoDBCollectionPartitionMergeOptions) (*runtime.Poller[MongoDBResourcesClientListMongoDBCollectionPartitionMergeResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.listMongoDBCollectionPartitionMerge(ctx, resourceGroupName, accountName, databaseName, collectionName, mergeParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[MongoDBResourcesClientListMongoDBCollectionPartitionMergeResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[MongoDBResourcesClientListMongoDBCollectionPartitionMergeResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// ListMongoDBCollectionPartitionMerge - Merges the partitions of a MongoDB Collection -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -func (client *MongoDBResourcesClient) listMongoDBCollectionPartitionMerge(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, mergeParameters MergeParameters, options *MongoDBResourcesClientBeginListMongoDBCollectionPartitionMergeOptions) (*http.Response, error) { - req, err := client.listMongoDBCollectionPartitionMergeCreateRequest(ctx, resourceGroupName, accountName, databaseName, collectionName, mergeParameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// listMongoDBCollectionPartitionMergeCreateRequest creates the ListMongoDBCollectionPartitionMerge request. -func (client *MongoDBResourcesClient) listMongoDBCollectionPartitionMergeCreateRequest(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, mergeParameters MergeParameters, options *MongoDBResourcesClientBeginListMongoDBCollectionPartitionMergeOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/partitionMerge" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if databaseName == "" { - return nil, errors.New("parameter databaseName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) - if collectionName == "" { - return nil, errors.New("parameter collectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{collectionName}", url.PathEscape(collectionName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, mergeParameters) -} - // NewListMongoDBCollectionsPager - Lists the MongoDB collection under an existing Azure Cosmos DB database account. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1138,7 +1060,7 @@ func (client *MongoDBResourcesClient) listMongoDBCollectionsCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1155,7 +1077,7 @@ func (client *MongoDBResourcesClient) listMongoDBCollectionsHandleResponse(resp // NewListMongoDBDatabasesPager - Lists the MongoDB databases under an existing Azure Cosmos DB database account. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - MongoDBResourcesClientListMongoDBDatabasesOptions contains the optional parameters for the MongoDBResourcesClient.NewListMongoDBDatabasesPager @@ -1202,7 +1124,7 @@ func (client *MongoDBResourcesClient) listMongoDBDatabasesCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1219,7 +1141,7 @@ func (client *MongoDBResourcesClient) listMongoDBDatabasesHandleResponse(resp *h // NewListMongoRoleDefinitionsPager - Retrieves the list of all Azure Cosmos DB Mongo Role Definitions. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - MongoDBResourcesClientListMongoRoleDefinitionsOptions contains the optional parameters for the MongoDBResourcesClient.NewListMongoRoleDefinitionsPager @@ -1266,7 +1188,7 @@ func (client *MongoDBResourcesClient) listMongoRoleDefinitionsCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1283,7 +1205,7 @@ func (client *MongoDBResourcesClient) listMongoRoleDefinitionsHandleResponse(res // NewListMongoUserDefinitionsPager - Retrieves the list of all Azure Cosmos DB Mongo User Definition. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - MongoDBResourcesClientListMongoUserDefinitionsOptions contains the optional parameters for the MongoDBResourcesClient.NewListMongoUserDefinitionsPager @@ -1330,7 +1252,7 @@ func (client *MongoDBResourcesClient) listMongoUserDefinitionsCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1348,7 +1270,7 @@ func (client *MongoDBResourcesClient) listMongoUserDefinitionsHandleResponse(res // BeginMigrateMongoDBCollectionToAutoscale - Migrate an Azure Cosmos DB MongoDB collection from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1370,7 +1292,7 @@ func (client *MongoDBResourcesClient) BeginMigrateMongoDBCollectionToAutoscale(c // MigrateMongoDBCollectionToAutoscale - Migrate an Azure Cosmos DB MongoDB collection from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *MongoDBResourcesClient) migrateMongoDBCollectionToAutoscale(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, options *MongoDBResourcesClientBeginMigrateMongoDBCollectionToAutoscaleOptions) (*http.Response, error) { req, err := client.migrateMongoDBCollectionToAutoscaleCreateRequest(ctx, resourceGroupName, accountName, databaseName, collectionName, options) if err != nil { @@ -1414,7 +1336,7 @@ func (client *MongoDBResourcesClient) migrateMongoDBCollectionToAutoscaleCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1424,7 +1346,7 @@ func (client *MongoDBResourcesClient) migrateMongoDBCollectionToAutoscaleCreateR // throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1446,7 +1368,7 @@ func (client *MongoDBResourcesClient) BeginMigrateMongoDBCollectionToManualThrou // MigrateMongoDBCollectionToManualThroughput - Migrate an Azure Cosmos DB MongoDB collection from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *MongoDBResourcesClient) migrateMongoDBCollectionToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, options *MongoDBResourcesClientBeginMigrateMongoDBCollectionToManualThroughputOptions) (*http.Response, error) { req, err := client.migrateMongoDBCollectionToManualThroughputCreateRequest(ctx, resourceGroupName, accountName, databaseName, collectionName, options) if err != nil { @@ -1490,7 +1412,7 @@ func (client *MongoDBResourcesClient) migrateMongoDBCollectionToManualThroughput return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1499,7 +1421,7 @@ func (client *MongoDBResourcesClient) migrateMongoDBCollectionToManualThroughput // BeginMigrateMongoDBDatabaseToAutoscale - Migrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1520,7 +1442,7 @@ func (client *MongoDBResourcesClient) BeginMigrateMongoDBDatabaseToAutoscale(ctx // MigrateMongoDBDatabaseToAutoscale - Migrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *MongoDBResourcesClient) migrateMongoDBDatabaseToAutoscale(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *MongoDBResourcesClientBeginMigrateMongoDBDatabaseToAutoscaleOptions) (*http.Response, error) { req, err := client.migrateMongoDBDatabaseToAutoscaleCreateRequest(ctx, resourceGroupName, accountName, databaseName, options) if err != nil { @@ -1560,7 +1482,7 @@ func (client *MongoDBResourcesClient) migrateMongoDBDatabaseToAutoscaleCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1569,7 +1491,7 @@ func (client *MongoDBResourcesClient) migrateMongoDBDatabaseToAutoscaleCreateReq // BeginMigrateMongoDBDatabaseToManualThroughput - Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1590,7 +1512,7 @@ func (client *MongoDBResourcesClient) BeginMigrateMongoDBDatabaseToManualThrough // MigrateMongoDBDatabaseToManualThroughput - Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *MongoDBResourcesClient) migrateMongoDBDatabaseToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *MongoDBResourcesClientBeginMigrateMongoDBDatabaseToManualThroughputOptions) (*http.Response, error) { req, err := client.migrateMongoDBDatabaseToManualThroughputCreateRequest(ctx, resourceGroupName, accountName, databaseName, options) if err != nil { @@ -1630,320 +1552,16 @@ func (client *MongoDBResourcesClient) migrateMongoDBDatabaseToManualThroughputCr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// BeginMongoDBContainerRedistributeThroughput - Redistribute throughput for an Azure Cosmos DB MongoDB container -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - databaseName - Cosmos DB database name. -// - collectionName - Cosmos DB collection name. -// - redistributeThroughputParameters - The parameters to provide for redistributing throughput for the current MongoDB container. -// - options - MongoDBResourcesClientBeginMongoDBContainerRedistributeThroughputOptions contains the optional parameters for -// the MongoDBResourcesClient.BeginMongoDBContainerRedistributeThroughput method. -func (client *MongoDBResourcesClient) BeginMongoDBContainerRedistributeThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, redistributeThroughputParameters RedistributeThroughputParameters, options *MongoDBResourcesClientBeginMongoDBContainerRedistributeThroughputOptions) (*runtime.Poller[MongoDBResourcesClientMongoDBContainerRedistributeThroughputResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.mongoDBContainerRedistributeThroughput(ctx, resourceGroupName, accountName, databaseName, collectionName, redistributeThroughputParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[MongoDBResourcesClientMongoDBContainerRedistributeThroughputResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[MongoDBResourcesClientMongoDBContainerRedistributeThroughputResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// MongoDBContainerRedistributeThroughput - Redistribute throughput for an Azure Cosmos DB MongoDB container -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -func (client *MongoDBResourcesClient) mongoDBContainerRedistributeThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, redistributeThroughputParameters RedistributeThroughputParameters, options *MongoDBResourcesClientBeginMongoDBContainerRedistributeThroughputOptions) (*http.Response, error) { - req, err := client.mongoDBContainerRedistributeThroughputCreateRequest(ctx, resourceGroupName, accountName, databaseName, collectionName, redistributeThroughputParameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// mongoDBContainerRedistributeThroughputCreateRequest creates the MongoDBContainerRedistributeThroughput request. -func (client *MongoDBResourcesClient) mongoDBContainerRedistributeThroughputCreateRequest(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, redistributeThroughputParameters RedistributeThroughputParameters, options *MongoDBResourcesClientBeginMongoDBContainerRedistributeThroughputOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/redistributeThroughput" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if databaseName == "" { - return nil, errors.New("parameter databaseName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) - if collectionName == "" { - return nil, errors.New("parameter collectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{collectionName}", url.PathEscape(collectionName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, redistributeThroughputParameters) -} - -// BeginMongoDBContainerRetrieveThroughputDistribution - Retrieve throughput distribution for an Azure Cosmos DB MongoDB container -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - databaseName - Cosmos DB database name. -// - collectionName - Cosmos DB collection name. -// - retrieveThroughputParameters - The parameters to provide for retrieving throughput distribution for the current MongoDB -// container. -// - options - MongoDBResourcesClientBeginMongoDBContainerRetrieveThroughputDistributionOptions contains the optional parameters -// for the MongoDBResourcesClient.BeginMongoDBContainerRetrieveThroughputDistribution method. -func (client *MongoDBResourcesClient) BeginMongoDBContainerRetrieveThroughputDistribution(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, retrieveThroughputParameters RetrieveThroughputParameters, options *MongoDBResourcesClientBeginMongoDBContainerRetrieveThroughputDistributionOptions) (*runtime.Poller[MongoDBResourcesClientMongoDBContainerRetrieveThroughputDistributionResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.mongoDBContainerRetrieveThroughputDistribution(ctx, resourceGroupName, accountName, databaseName, collectionName, retrieveThroughputParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[MongoDBResourcesClientMongoDBContainerRetrieveThroughputDistributionResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[MongoDBResourcesClientMongoDBContainerRetrieveThroughputDistributionResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// MongoDBContainerRetrieveThroughputDistribution - Retrieve throughput distribution for an Azure Cosmos DB MongoDB container -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -func (client *MongoDBResourcesClient) mongoDBContainerRetrieveThroughputDistribution(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, retrieveThroughputParameters RetrieveThroughputParameters, options *MongoDBResourcesClientBeginMongoDBContainerRetrieveThroughputDistributionOptions) (*http.Response, error) { - req, err := client.mongoDBContainerRetrieveThroughputDistributionCreateRequest(ctx, resourceGroupName, accountName, databaseName, collectionName, retrieveThroughputParameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// mongoDBContainerRetrieveThroughputDistributionCreateRequest creates the MongoDBContainerRetrieveThroughputDistribution request. -func (client *MongoDBResourcesClient) mongoDBContainerRetrieveThroughputDistributionCreateRequest(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, retrieveThroughputParameters RetrieveThroughputParameters, options *MongoDBResourcesClientBeginMongoDBContainerRetrieveThroughputDistributionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/retrieveThroughputDistribution" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if databaseName == "" { - return nil, errors.New("parameter databaseName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) - if collectionName == "" { - return nil, errors.New("parameter collectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{collectionName}", url.PathEscape(collectionName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, retrieveThroughputParameters) -} - -// BeginMongoDBDatabaseRedistributeThroughput - Redistribute throughput for an Azure Cosmos DB MongoDB database -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - databaseName - Cosmos DB database name. -// - redistributeThroughputParameters - The parameters to provide for redistributing throughput for the current MongoDB database. -// - options - MongoDBResourcesClientBeginMongoDBDatabaseRedistributeThroughputOptions contains the optional parameters for -// the MongoDBResourcesClient.BeginMongoDBDatabaseRedistributeThroughput method. -func (client *MongoDBResourcesClient) BeginMongoDBDatabaseRedistributeThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, redistributeThroughputParameters RedistributeThroughputParameters, options *MongoDBResourcesClientBeginMongoDBDatabaseRedistributeThroughputOptions) (*runtime.Poller[MongoDBResourcesClientMongoDBDatabaseRedistributeThroughputResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.mongoDBDatabaseRedistributeThroughput(ctx, resourceGroupName, accountName, databaseName, redistributeThroughputParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[MongoDBResourcesClientMongoDBDatabaseRedistributeThroughputResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[MongoDBResourcesClientMongoDBDatabaseRedistributeThroughputResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// MongoDBDatabaseRedistributeThroughput - Redistribute throughput for an Azure Cosmos DB MongoDB database -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -func (client *MongoDBResourcesClient) mongoDBDatabaseRedistributeThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, redistributeThroughputParameters RedistributeThroughputParameters, options *MongoDBResourcesClientBeginMongoDBDatabaseRedistributeThroughputOptions) (*http.Response, error) { - req, err := client.mongoDBDatabaseRedistributeThroughputCreateRequest(ctx, resourceGroupName, accountName, databaseName, redistributeThroughputParameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// mongoDBDatabaseRedistributeThroughputCreateRequest creates the MongoDBDatabaseRedistributeThroughput request. -func (client *MongoDBResourcesClient) mongoDBDatabaseRedistributeThroughputCreateRequest(ctx context.Context, resourceGroupName string, accountName string, databaseName string, redistributeThroughputParameters RedistributeThroughputParameters, options *MongoDBResourcesClientBeginMongoDBDatabaseRedistributeThroughputOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/redistributeThroughput" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if databaseName == "" { - return nil, errors.New("parameter databaseName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, redistributeThroughputParameters) -} - -// BeginMongoDBDatabaseRetrieveThroughputDistribution - Retrieve throughput distribution for an Azure Cosmos DB MongoDB database -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - databaseName - Cosmos DB database name. -// - retrieveThroughputParameters - The parameters to provide for retrieving throughput distribution for the current MongoDB -// database. -// - options - MongoDBResourcesClientBeginMongoDBDatabaseRetrieveThroughputDistributionOptions contains the optional parameters -// for the MongoDBResourcesClient.BeginMongoDBDatabaseRetrieveThroughputDistribution method. -func (client *MongoDBResourcesClient) BeginMongoDBDatabaseRetrieveThroughputDistribution(ctx context.Context, resourceGroupName string, accountName string, databaseName string, retrieveThroughputParameters RetrieveThroughputParameters, options *MongoDBResourcesClientBeginMongoDBDatabaseRetrieveThroughputDistributionOptions) (*runtime.Poller[MongoDBResourcesClientMongoDBDatabaseRetrieveThroughputDistributionResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.mongoDBDatabaseRetrieveThroughputDistribution(ctx, resourceGroupName, accountName, databaseName, retrieveThroughputParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[MongoDBResourcesClientMongoDBDatabaseRetrieveThroughputDistributionResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[MongoDBResourcesClientMongoDBDatabaseRetrieveThroughputDistributionResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// MongoDBDatabaseRetrieveThroughputDistribution - Retrieve throughput distribution for an Azure Cosmos DB MongoDB database -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -func (client *MongoDBResourcesClient) mongoDBDatabaseRetrieveThroughputDistribution(ctx context.Context, resourceGroupName string, accountName string, databaseName string, retrieveThroughputParameters RetrieveThroughputParameters, options *MongoDBResourcesClientBeginMongoDBDatabaseRetrieveThroughputDistributionOptions) (*http.Response, error) { - req, err := client.mongoDBDatabaseRetrieveThroughputDistributionCreateRequest(ctx, resourceGroupName, accountName, databaseName, retrieveThroughputParameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// mongoDBDatabaseRetrieveThroughputDistributionCreateRequest creates the MongoDBDatabaseRetrieveThroughputDistribution request. -func (client *MongoDBResourcesClient) mongoDBDatabaseRetrieveThroughputDistributionCreateRequest(ctx context.Context, resourceGroupName string, accountName string, databaseName string, retrieveThroughputParameters RetrieveThroughputParameters, options *MongoDBResourcesClientBeginMongoDBDatabaseRetrieveThroughputDistributionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/retrieveThroughputDistribution" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if databaseName == "" { - return nil, errors.New("parameter databaseName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, retrieveThroughputParameters) -} - // BeginRetrieveContinuousBackupInformation - Retrieves continuous backup information for a Mongodb collection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1968,7 +1586,7 @@ func (client *MongoDBResourcesClient) BeginRetrieveContinuousBackupInformation(c // RetrieveContinuousBackupInformation - Retrieves continuous backup information for a Mongodb collection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *MongoDBResourcesClient) retrieveContinuousBackupInformation(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, location ContinuousBackupRestoreLocation, options *MongoDBResourcesClientBeginRetrieveContinuousBackupInformationOptions) (*http.Response, error) { req, err := client.retrieveContinuousBackupInformationCreateRequest(ctx, resourceGroupName, accountName, databaseName, collectionName, location, options) if err != nil { @@ -2012,7 +1630,7 @@ func (client *MongoDBResourcesClient) retrieveContinuousBackupInformationCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, location) @@ -2021,7 +1639,7 @@ func (client *MongoDBResourcesClient) retrieveContinuousBackupInformationCreateR // BeginUpdateMongoDBCollectionThroughput - Update the RUs per second of an Azure Cosmos DB MongoDB collection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2044,7 +1662,7 @@ func (client *MongoDBResourcesClient) BeginUpdateMongoDBCollectionThroughput(ctx // UpdateMongoDBCollectionThroughput - Update the RUs per second of an Azure Cosmos DB MongoDB collection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *MongoDBResourcesClient) updateMongoDBCollectionThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *MongoDBResourcesClientBeginUpdateMongoDBCollectionThroughputOptions) (*http.Response, error) { req, err := client.updateMongoDBCollectionThroughputCreateRequest(ctx, resourceGroupName, accountName, databaseName, collectionName, updateThroughputParameters, options) if err != nil { @@ -2088,7 +1706,7 @@ func (client *MongoDBResourcesClient) updateMongoDBCollectionThroughputCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, updateThroughputParameters) @@ -2097,7 +1715,7 @@ func (client *MongoDBResourcesClient) updateMongoDBCollectionThroughputCreateReq // BeginUpdateMongoDBDatabaseThroughput - Update RUs per second of the an Azure Cosmos DB MongoDB database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2119,7 +1737,7 @@ func (client *MongoDBResourcesClient) BeginUpdateMongoDBDatabaseThroughput(ctx c // UpdateMongoDBDatabaseThroughput - Update RUs per second of the an Azure Cosmos DB MongoDB database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *MongoDBResourcesClient) updateMongoDBDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *MongoDBResourcesClientBeginUpdateMongoDBDatabaseThroughputOptions) (*http.Response, error) { req, err := client.updateMongoDBDatabaseThroughputCreateRequest(ctx, resourceGroupName, accountName, databaseName, updateThroughputParameters, options) if err != nil { @@ -2159,7 +1777,7 @@ func (client *MongoDBResourcesClient) updateMongoDBDatabaseThroughputCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, updateThroughputParameters) diff --git a/sdk/resourcemanager/cosmos/armcosmos/mongodbresources_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/mongodbresources_client_example_test.go index eacc4a08edd3..973a8a3be0ea 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/mongodbresources_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/mongodbresources_client_example_test.go @@ -13,14 +13,12 @@ import ( "context" "log" - "time" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBDatabaseList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBDatabaseList.json func ExampleMongoDBResourcesClient_NewListMongoDBDatabasesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -61,7 +59,7 @@ func ExampleMongoDBResourcesClient_NewListMongoDBDatabasesPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBDatabaseGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBDatabaseGet.json func ExampleMongoDBResourcesClient_GetMongoDBDatabase() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -97,8 +95,8 @@ func ExampleMongoDBResourcesClient_GetMongoDBDatabase() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBDatabaseCreateUpdate.json -func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoDBDatabase_cosmosDbMongoDbDatabaseCreateUpdate() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBDatabaseCreateUpdate.json +func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoDBDatabase() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -143,58 +141,7 @@ func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoDBDatabase_cosmosDbMong // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBDatabaseRestore.json -func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoDBDatabase_cosmosDbMongoDbDatabaseRestore() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewMongoDBResourcesClient().BeginCreateUpdateMongoDBDatabase(ctx, "rg1", "ddb1", "databaseName", armcosmos.MongoDBDatabaseCreateUpdateParameters{ - Location: to.Ptr("West US"), - Tags: map[string]*string{}, - Properties: &armcosmos.MongoDBDatabaseCreateUpdateProperties{ - Options: &armcosmos.CreateUpdateOptions{}, - Resource: &armcosmos.MongoDBDatabaseResource{ - CreateMode: to.Ptr(armcosmos.CreateModeRestore), - ID: to.Ptr("databaseName"), - RestoreParameters: &armcosmos.ResourceRestoreParameters{ - RestoreSource: to.Ptr("/subscriptions/subid/providers/Microsoft.DocumentDB/locations/WestUS/restorableDatabaseAccounts/restorableDatabaseAccountId"), - RestoreTimestampInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-20T18:28:00Z"); return t }()), - }, - }, - }, - }, 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.MongoDBDatabaseGetResults = armcosmos.MongoDBDatabaseGetResults{ - // Name: to.Ptr("databaseName"), - // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/mongodbDatabases"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/mongodbDatabases/databaseName"), - // Location: to.Ptr("West US"), - // Tags: map[string]*string{ - // }, - // Properties: &armcosmos.MongoDBDatabaseGetProperties{ - // Resource: &armcosmos.MongoDBDatabaseGetPropertiesResource{ - // ID: to.Ptr("updatedDatabaseName"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBDatabaseDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBDatabaseDelete.json func ExampleMongoDBResourcesClient_BeginDeleteMongoDBDatabase() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -215,7 +162,7 @@ func ExampleMongoDBResourcesClient_BeginDeleteMongoDBDatabase() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBDatabaseThroughputGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBDatabaseThroughputGet.json func ExampleMongoDBResourcesClient_GetMongoDBDatabaseThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -253,7 +200,7 @@ func ExampleMongoDBResourcesClient_GetMongoDBDatabaseThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBDatabaseThroughputUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBDatabaseThroughputUpdate.json func ExampleMongoDBResourcesClient_BeginUpdateMongoDBDatabaseThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -303,7 +250,7 @@ func ExampleMongoDBResourcesClient_BeginUpdateMongoDBDatabaseThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBDatabaseMigrateToAutoscale.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBDatabaseMigrateToAutoscale.json func ExampleMongoDBResourcesClient_BeginMigrateMongoDBDatabaseToAutoscale() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -342,7 +289,7 @@ func ExampleMongoDBResourcesClient_BeginMigrateMongoDBDatabaseToAutoscale() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBDatabaseMigrateToManualThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBDatabaseMigrateToManualThroughput.json func ExampleMongoDBResourcesClient_BeginMigrateMongoDBDatabaseToManualThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -378,249 +325,7 @@ func ExampleMongoDBResourcesClient_BeginMigrateMongoDBDatabaseToManualThroughput // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBDatabaseRetrieveThroughputDistribution.json -func ExampleMongoDBResourcesClient_BeginMongoDBDatabaseRetrieveThroughputDistribution() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewMongoDBResourcesClient().BeginMongoDBDatabaseRetrieveThroughputDistribution(ctx, "rg1", "ddb1", "databaseName", armcosmos.RetrieveThroughputParameters{ - Properties: &armcosmos.RetrieveThroughputProperties{ - Resource: &armcosmos.RetrieveThroughputPropertiesResource{ - PhysicalPartitionIDs: []*armcosmos.PhysicalPartitionID{ - { - ID: to.Ptr("0"), - }, - { - ID: to.Ptr("1"), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PhysicalPartitionThroughputInfoResult = armcosmos.PhysicalPartitionThroughputInfoResult{ - // Properties: &armcosmos.PhysicalPartitionThroughputInfoResultProperties{ - // Resource: &armcosmos.PhysicalPartitionThroughputInfoResultPropertiesResource{ - // PhysicalPartitionThroughputInfo: []*armcosmos.PhysicalPartitionThroughputInfoResource{ - // { - // ID: to.Ptr("0"), - // Throughput: to.Ptr[float64](5000), - // }, - // { - // ID: to.Ptr("1"), - // Throughput: to.Ptr[float64](5000), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBDatabaseRedistributeThroughput.json -func ExampleMongoDBResourcesClient_BeginMongoDBDatabaseRedistributeThroughput() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewMongoDBResourcesClient().BeginMongoDBDatabaseRedistributeThroughput(ctx, "rg1", "ddb1", "databaseName", armcosmos.RedistributeThroughputParameters{ - Properties: &armcosmos.RedistributeThroughputProperties{ - Resource: &armcosmos.RedistributeThroughputPropertiesResource{ - SourcePhysicalPartitionThroughputInfo: []*armcosmos.PhysicalPartitionThroughputInfoResource{ - { - ID: to.Ptr("2"), - Throughput: to.Ptr[float64](5000), - }, - { - ID: to.Ptr("3"), - }}, - TargetPhysicalPartitionThroughputInfo: []*armcosmos.PhysicalPartitionThroughputInfoResource{ - { - ID: to.Ptr("0"), - Throughput: to.Ptr[float64](5000), - }, - { - ID: to.Ptr("1"), - Throughput: to.Ptr[float64](5000), - }}, - ThroughputPolicy: to.Ptr(armcosmos.ThroughputPolicyTypeCustom), - }, - }, - }, 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.PhysicalPartitionThroughputInfoResult = armcosmos.PhysicalPartitionThroughputInfoResult{ - // Properties: &armcosmos.PhysicalPartitionThroughputInfoResultProperties{ - // Resource: &armcosmos.PhysicalPartitionThroughputInfoResultPropertiesResource{ - // PhysicalPartitionThroughputInfo: []*armcosmos.PhysicalPartitionThroughputInfoResource{ - // { - // ID: to.Ptr("0"), - // Throughput: to.Ptr[float64](5000), - // }, - // { - // ID: to.Ptr("1"), - // Throughput: to.Ptr[float64](5000), - // }, - // { - // ID: to.Ptr("2"), - // Throughput: to.Ptr[float64](5000), - // }, - // { - // ID: to.Ptr("3"), - // Throughput: to.Ptr[float64](3000), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBCollectionRetrieveThroughputDistribution.json -func ExampleMongoDBResourcesClient_BeginMongoDBContainerRetrieveThroughputDistribution() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewMongoDBResourcesClient().BeginMongoDBContainerRetrieveThroughputDistribution(ctx, "rg1", "ddb1", "databaseName", "collectionName", armcosmos.RetrieveThroughputParameters{ - Properties: &armcosmos.RetrieveThroughputProperties{ - Resource: &armcosmos.RetrieveThroughputPropertiesResource{ - PhysicalPartitionIDs: []*armcosmos.PhysicalPartitionID{ - { - ID: to.Ptr("0"), - }, - { - ID: to.Ptr("1"), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PhysicalPartitionThroughputInfoResult = armcosmos.PhysicalPartitionThroughputInfoResult{ - // Properties: &armcosmos.PhysicalPartitionThroughputInfoResultProperties{ - // Resource: &armcosmos.PhysicalPartitionThroughputInfoResultPropertiesResource{ - // PhysicalPartitionThroughputInfo: []*armcosmos.PhysicalPartitionThroughputInfoResource{ - // { - // ID: to.Ptr("0"), - // Throughput: to.Ptr[float64](5000), - // }, - // { - // ID: to.Ptr("1"), - // Throughput: to.Ptr[float64](5000), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.json -func ExampleMongoDBResourcesClient_BeginMongoDBContainerRedistributeThroughput() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewMongoDBResourcesClient().BeginMongoDBContainerRedistributeThroughput(ctx, "rg1", "ddb1", "databaseName", "collectionName", armcosmos.RedistributeThroughputParameters{ - Properties: &armcosmos.RedistributeThroughputProperties{ - Resource: &armcosmos.RedistributeThroughputPropertiesResource{ - SourcePhysicalPartitionThroughputInfo: []*armcosmos.PhysicalPartitionThroughputInfoResource{ - { - ID: to.Ptr("2"), - Throughput: to.Ptr[float64](5000), - }, - { - ID: to.Ptr("3"), - }}, - TargetPhysicalPartitionThroughputInfo: []*armcosmos.PhysicalPartitionThroughputInfoResource{ - { - ID: to.Ptr("0"), - Throughput: to.Ptr[float64](5000), - }, - { - ID: to.Ptr("1"), - Throughput: to.Ptr[float64](5000), - }}, - ThroughputPolicy: to.Ptr(armcosmos.ThroughputPolicyTypeCustom), - }, - }, - }, 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.PhysicalPartitionThroughputInfoResult = armcosmos.PhysicalPartitionThroughputInfoResult{ - // Properties: &armcosmos.PhysicalPartitionThroughputInfoResultProperties{ - // Resource: &armcosmos.PhysicalPartitionThroughputInfoResultPropertiesResource{ - // PhysicalPartitionThroughputInfo: []*armcosmos.PhysicalPartitionThroughputInfoResource{ - // { - // ID: to.Ptr("0"), - // Throughput: to.Ptr[float64](5000), - // }, - // { - // ID: to.Ptr("1"), - // Throughput: to.Ptr[float64](5000), - // }, - // { - // ID: to.Ptr("2"), - // Throughput: to.Ptr[float64](5000), - // }, - // { - // ID: to.Ptr("3"), - // Throughput: to.Ptr[float64](3000), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBCollectionList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBCollectionList.json func ExampleMongoDBResourcesClient_NewListMongoDBCollectionsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -653,7 +358,6 @@ func ExampleMongoDBResourcesClient_NewListMongoDBCollectionsPager() { // }, // Properties: &armcosmos.MongoDBCollectionGetProperties{ // Resource: &armcosmos.MongoDBCollectionGetPropertiesResource{ - // AnalyticalStorageTTL: to.Ptr[int32](500), // ID: to.Ptr("testcoll"), // Indexes: []*armcosmos.MongoIndex{ // { @@ -676,7 +380,7 @@ func ExampleMongoDBResourcesClient_NewListMongoDBCollectionsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBCollectionGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBCollectionGet.json func ExampleMongoDBResourcesClient_GetMongoDBCollection() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -706,7 +410,6 @@ func ExampleMongoDBResourcesClient_GetMongoDBCollection() { // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), - // AnalyticalStorageTTL: to.Ptr[int32](500), // ID: to.Ptr("testcoll"), // Indexes: []*armcosmos.MongoIndex{ // { @@ -727,8 +430,8 @@ func ExampleMongoDBResourcesClient_GetMongoDBCollection() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBCollectionCreateUpdate.json -func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoDBCollection_cosmosDbMongoDbCollectionCreateUpdate() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBCollectionCreateUpdate.json +func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoDBCollection() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -744,8 +447,7 @@ func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoDBCollection_cosmosDbMo Properties: &armcosmos.MongoDBCollectionCreateUpdateProperties{ Options: &armcosmos.CreateUpdateOptions{}, Resource: &armcosmos.MongoDBCollectionResource{ - AnalyticalStorageTTL: to.Ptr[int32](500), - ID: to.Ptr("collectionName"), + ID: to.Ptr("collectionName"), Indexes: []*armcosmos.MongoIndex{ { Key: &armcosmos.MongoIndexKeys{ @@ -788,7 +490,6 @@ func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoDBCollection_cosmosDbMo // }, // Properties: &armcosmos.MongoDBCollectionGetProperties{ // Resource: &armcosmos.MongoDBCollectionGetPropertiesResource{ - // AnalyticalStorageTTL: to.Ptr[int32](500), // ID: to.Ptr("collectionName"), // Indexes: []*armcosmos.MongoIndex{ // { @@ -815,79 +516,7 @@ func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoDBCollection_cosmosDbMo // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBCollectionRestore.json -func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoDBCollection_cosmosDbMongoDbCollectionRestore() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewMongoDBResourcesClient().BeginCreateUpdateMongoDBCollection(ctx, "rg1", "ddb1", "databaseName", "collectionName", armcosmos.MongoDBCollectionCreateUpdateParameters{ - Location: to.Ptr("West US"), - Tags: map[string]*string{}, - Properties: &armcosmos.MongoDBCollectionCreateUpdateProperties{ - Options: &armcosmos.CreateUpdateOptions{}, - Resource: &armcosmos.MongoDBCollectionResource{ - CreateMode: to.Ptr(armcosmos.CreateModeRestore), - ID: to.Ptr("collectionName"), - RestoreParameters: &armcosmos.ResourceRestoreParameters{ - RestoreSource: to.Ptr("/subscriptions/subid/providers/Microsoft.DocumentDB/locations/WestUS/restorableDatabaseAccounts/restorableDatabaseAccountId"), - RestoreTimestampInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-20T18:28:00Z"); return t }()), - }, - }, - }, - }, 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.MongoDBCollectionGetResults = armcosmos.MongoDBCollectionGetResults{ - // Name: to.Ptr("collectionName"), - // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/mongodbCollections"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/mongodbDatabases/databaseName/mongodbCollections/collectionName"), - // Location: to.Ptr("West US"), - // Tags: map[string]*string{ - // }, - // Properties: &armcosmos.MongoDBCollectionGetProperties{ - // Resource: &armcosmos.MongoDBCollectionGetPropertiesResource{ - // AnalyticalStorageTTL: to.Ptr[int32](500), - // ID: to.Ptr("collectionName"), - // Indexes: []*armcosmos.MongoIndex{ - // { - // Key: &armcosmos.MongoIndexKeys{ - // Keys: []*string{ - // to.Ptr("_ts")}, - // }, - // Options: &armcosmos.MongoIndexOptions{ - // ExpireAfterSeconds: to.Ptr[int32](100), - // Unique: to.Ptr(true), - // }, - // }, - // { - // Key: &armcosmos.MongoIndexKeys{ - // Keys: []*string{ - // to.Ptr("_id")}, - // }, - // }}, - // ShardKey: map[string]*string{ - // "testKey": to.Ptr("Hash"), - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBCollectionDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBCollectionDelete.json func ExampleMongoDBResourcesClient_BeginDeleteMongoDBCollection() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -908,68 +537,7 @@ func ExampleMongoDBResourcesClient_BeginDeleteMongoDBCollection() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBCollectionPartitionMerge.json -func ExampleMongoDBResourcesClient_BeginListMongoDBCollectionPartitionMerge() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewMongoDBResourcesClient().BeginListMongoDBCollectionPartitionMerge(ctx, "rgName", "ddb1", "databaseName", "collectionName", armcosmos.MergeParameters{ - IsDryRun: to.Ptr(false), - }, 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.PhysicalPartitionStorageInfoCollection = armcosmos.PhysicalPartitionStorageInfoCollection{ - // PhysicalPartitionStorageInfoCollection: []*armcosmos.PhysicalPartitionStorageInfo{ - // { - // ID: to.Ptr("0"), - // StorageInKB: to.Ptr[float64](333), - // }, - // { - // ID: to.Ptr("1"), - // StorageInKB: to.Ptr[float64](305), - // }, - // { - // ID: to.Ptr("177"), - // StorageInKB: to.Ptr[float64](368), - // }, - // { - // ID: to.Ptr("178"), - // StorageInKB: to.Ptr[float64](96313), - // }, - // { - // ID: to.Ptr("5"), - // StorageInKB: to.Ptr[float64](194), - // }, - // { - // ID: to.Ptr("6"), - // StorageInKB: to.Ptr[float64](331), - // }, - // { - // ID: to.Ptr("7"), - // StorageInKB: to.Ptr[float64](384), - // }, - // { - // ID: to.Ptr("8"), - // StorageInKB: to.Ptr[float64](246), - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBCollectionThroughputGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBCollectionThroughputGet.json func ExampleMongoDBResourcesClient_GetMongoDBCollectionThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1007,7 +575,7 @@ func ExampleMongoDBResourcesClient_GetMongoDBCollectionThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBCollectionThroughputUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBCollectionThroughputUpdate.json func ExampleMongoDBResourcesClient_BeginUpdateMongoDBCollectionThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1057,7 +625,7 @@ func ExampleMongoDBResourcesClient_BeginUpdateMongoDBCollectionThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBCollectionMigrateToAutoscale.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBCollectionMigrateToAutoscale.json func ExampleMongoDBResourcesClient_BeginMigrateMongoDBCollectionToAutoscale() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1096,7 +664,7 @@ func ExampleMongoDBResourcesClient_BeginMigrateMongoDBCollectionToAutoscale() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBCollectionMigrateToManualThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBCollectionMigrateToManualThroughput.json func ExampleMongoDBResourcesClient_BeginMigrateMongoDBCollectionToManualThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1132,7 +700,7 @@ func ExampleMongoDBResourcesClient_BeginMigrateMongoDBCollectionToManualThroughp // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBRoleDefinitionGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBRoleDefinitionGet.json func ExampleMongoDBResourcesClient_GetMongoRoleDefinition() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1177,7 +745,7 @@ func ExampleMongoDBResourcesClient_GetMongoRoleDefinition() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBRoleDefinitionCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBRoleDefinitionCreateUpdate.json func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoRoleDefinition() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1246,7 +814,7 @@ func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoRoleDefinition() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBRoleDefinitionDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBRoleDefinitionDelete.json func ExampleMongoDBResourcesClient_BeginDeleteMongoRoleDefinition() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1267,7 +835,7 @@ func ExampleMongoDBResourcesClient_BeginDeleteMongoRoleDefinition() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBRoleDefinitionList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBRoleDefinitionList.json func ExampleMongoDBResourcesClient_NewListMongoRoleDefinitionsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1320,7 +888,7 @@ func ExampleMongoDBResourcesClient_NewListMongoRoleDefinitionsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBUserDefinitionGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBUserDefinitionGet.json func ExampleMongoDBResourcesClient_GetMongoUserDefinition() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1356,7 +924,7 @@ func ExampleMongoDBResourcesClient_GetMongoUserDefinition() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBUserDefinitionCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBUserDefinitionCreateUpdate.json func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoUserDefinition() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1409,7 +977,7 @@ func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoUserDefinition() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBUserDefinitionDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBUserDefinitionDelete.json func ExampleMongoDBResourcesClient_BeginDeleteMongoUserDefinition() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1430,7 +998,7 @@ func ExampleMongoDBResourcesClient_BeginDeleteMongoUserDefinition() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBUserDefinitionList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBUserDefinitionList.json func ExampleMongoDBResourcesClient_NewListMongoUserDefinitionsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1474,7 +1042,7 @@ func ExampleMongoDBResourcesClient_NewListMongoUserDefinitionsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMongoDBCollectionBackupInformation.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMongoDBCollectionBackupInformation.json func ExampleMongoDBResourcesClient_BeginRetrieveContinuousBackupInformation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/notebookworkspaces_client.go b/sdk/resourcemanager/cosmos/armcosmos/notebookworkspaces_client.go index 6ea36d81a82d..c289ef1da9fb 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/notebookworkspaces_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/notebookworkspaces_client.go @@ -47,7 +47,7 @@ func NewNotebookWorkspacesClient(subscriptionID string, credential azcore.TokenC // BeginCreateOrUpdate - Creates the notebook workspace for a Cosmos DB account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - notebookWorkspaceName - The name of the notebook workspace resource. @@ -69,7 +69,7 @@ func (client *NotebookWorkspacesClient) BeginCreateOrUpdate(ctx context.Context, // CreateOrUpdate - Creates the notebook workspace for a Cosmos DB account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *NotebookWorkspacesClient) createOrUpdate(ctx context.Context, resourceGroupName string, accountName string, notebookWorkspaceName NotebookWorkspaceName, notebookCreateUpdateParameters NotebookWorkspaceCreateUpdateParameters, options *NotebookWorkspacesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, accountName, notebookWorkspaceName, notebookCreateUpdateParameters, options) if err != nil { @@ -109,7 +109,7 @@ func (client *NotebookWorkspacesClient) createOrUpdateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, notebookCreateUpdateParameters) @@ -118,7 +118,7 @@ func (client *NotebookWorkspacesClient) createOrUpdateCreateRequest(ctx context. // BeginDelete - Deletes the notebook workspace for a Cosmos DB account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - notebookWorkspaceName - The name of the notebook workspace resource. @@ -139,7 +139,7 @@ func (client *NotebookWorkspacesClient) BeginDelete(ctx context.Context, resourc // Delete - Deletes the notebook workspace for a Cosmos DB account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *NotebookWorkspacesClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, notebookWorkspaceName NotebookWorkspaceName, options *NotebookWorkspacesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, notebookWorkspaceName, options) if err != nil { @@ -179,7 +179,7 @@ func (client *NotebookWorkspacesClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ func (client *NotebookWorkspacesClient) deleteCreateRequest(ctx context.Context, // Get - Gets the notebook workspace for a Cosmos DB account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - notebookWorkspaceName - The name of the notebook workspace resource. @@ -232,7 +232,7 @@ func (client *NotebookWorkspacesClient) getCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +249,7 @@ func (client *NotebookWorkspacesClient) getHandleResponse(resp *http.Response) ( // NewListByDatabaseAccountPager - Gets the notebook workspace resources of an existing Cosmos DB account. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - NotebookWorkspacesClientListByDatabaseAccountOptions contains the optional parameters for the NotebookWorkspacesClient.NewListByDatabaseAccountPager @@ -296,7 +296,7 @@ func (client *NotebookWorkspacesClient) listByDatabaseAccountCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -314,7 +314,7 @@ func (client *NotebookWorkspacesClient) listByDatabaseAccountHandleResponse(resp // ListConnectionInfo - Retrieves the connection info for the notebook workspace // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - notebookWorkspaceName - The name of the notebook workspace resource. @@ -359,7 +359,7 @@ func (client *NotebookWorkspacesClient) listConnectionInfoCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -377,7 +377,7 @@ func (client *NotebookWorkspacesClient) listConnectionInfoHandleResponse(resp *h // BeginRegenerateAuthToken - Regenerates the auth token for the notebook workspace // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - notebookWorkspaceName - The name of the notebook workspace resource. @@ -398,7 +398,7 @@ func (client *NotebookWorkspacesClient) BeginRegenerateAuthToken(ctx context.Con // RegenerateAuthToken - Regenerates the auth token for the notebook workspace // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *NotebookWorkspacesClient) regenerateAuthToken(ctx context.Context, resourceGroupName string, accountName string, notebookWorkspaceName NotebookWorkspaceName, options *NotebookWorkspacesClientBeginRegenerateAuthTokenOptions) (*http.Response, error) { req, err := client.regenerateAuthTokenCreateRequest(ctx, resourceGroupName, accountName, notebookWorkspaceName, options) if err != nil { @@ -438,7 +438,7 @@ func (client *NotebookWorkspacesClient) regenerateAuthTokenCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -447,7 +447,7 @@ func (client *NotebookWorkspacesClient) regenerateAuthTokenCreateRequest(ctx con // BeginStart - Starts the notebook workspace // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - notebookWorkspaceName - The name of the notebook workspace resource. @@ -468,7 +468,7 @@ func (client *NotebookWorkspacesClient) BeginStart(ctx context.Context, resource // Start - Starts the notebook workspace // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *NotebookWorkspacesClient) start(ctx context.Context, resourceGroupName string, accountName string, notebookWorkspaceName NotebookWorkspaceName, options *NotebookWorkspacesClientBeginStartOptions) (*http.Response, error) { req, err := client.startCreateRequest(ctx, resourceGroupName, accountName, notebookWorkspaceName, options) if err != nil { @@ -508,7 +508,7 @@ func (client *NotebookWorkspacesClient) startCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/notebookworkspaces_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/notebookworkspaces_client_example_test.go index b25314912ccc..165787b10144 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/notebookworkspaces_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/notebookworkspaces_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBNotebookWorkspaceList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBNotebookWorkspaceList.json func ExampleNotebookWorkspacesClient_NewListByDatabaseAccountPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -54,7 +54,7 @@ func ExampleNotebookWorkspacesClient_NewListByDatabaseAccountPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBNotebookWorkspaceGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBNotebookWorkspaceGet.json func ExampleNotebookWorkspacesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -83,7 +83,7 @@ func ExampleNotebookWorkspacesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBNotebookWorkspaceCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBNotebookWorkspaceCreate.json func ExampleNotebookWorkspacesClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -116,7 +116,7 @@ func ExampleNotebookWorkspacesClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBNotebookWorkspaceDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBNotebookWorkspaceDelete.json func ExampleNotebookWorkspacesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -137,7 +137,7 @@ func ExampleNotebookWorkspacesClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBNotebookWorkspaceListConnectionInfo.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBNotebookWorkspaceListConnectionInfo.json func ExampleNotebookWorkspacesClient_ListConnectionInfo() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -161,7 +161,7 @@ func ExampleNotebookWorkspacesClient_ListConnectionInfo() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBNotebookWorkspaceRegenerateAuthToken.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBNotebookWorkspaceRegenerateAuthToken.json func ExampleNotebookWorkspacesClient_BeginRegenerateAuthToken() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -182,7 +182,7 @@ func ExampleNotebookWorkspacesClient_BeginRegenerateAuthToken() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBNotebookWorkspaceStart.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBNotebookWorkspaceStart.json func ExampleNotebookWorkspacesClient_BeginStart() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/operations_client.go b/sdk/resourcemanager/cosmos/armcosmos/operations_client.go index e4ab53827b9b..3d91c5ef91ac 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/operations_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/operations_client.go @@ -40,7 +40,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available Cosmos DB Resource Provider operations. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -78,7 +78,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/operations_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/operations_client_example_test.go index 775d5fb6bc0a..7fada5537713 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/operations_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/operations_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBOperationsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBOperationsList.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeid_client.go b/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeid_client.go index 13df3f53c903..efc3a32d958d 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeid_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeid_client.go @@ -46,7 +46,7 @@ func NewPartitionKeyRangeIDClient(subscriptionID string, credential azcore.Token // NewListMetricsPager - Retrieves the metrics determined by the given filter for the given partition key range id. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseRid - Cosmos DB database rid. @@ -111,7 +111,7 @@ func (client *PartitionKeyRangeIDClient) listMetricsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") reqQP.Set("$filter", filter) req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} diff --git a/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeid_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeid_client_example_test.go index 95aa405937d1..75c19ebcb524 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeid_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeid_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBPKeyRangeIdGetMetrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBPKeyRangeIdGetMetrics.json func ExamplePartitionKeyRangeIDClient_NewListMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeidregion_client.go b/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeidregion_client.go index 168e834c782c..cc287d54bbc2 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeidregion_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeidregion_client.go @@ -46,7 +46,7 @@ func NewPartitionKeyRangeIDRegionClient(subscriptionID string, credential azcore // NewListMetricsPager - Retrieves the metrics determined by the given filter for the given partition key range id and region. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - region - Cosmos DB region, with spaces between words and each word capitalized. @@ -116,7 +116,7 @@ func (client *PartitionKeyRangeIDRegionClient) listMetricsCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") reqQP.Set("$filter", filter) req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} diff --git a/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeidregion_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeidregion_client_example_test.go index 0f67d9583bfe..bfb825c6a6e2 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeidregion_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeidregion_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBPKeyRangeIdRegionGetMetrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBPKeyRangeIdRegionGetMetrics.json func ExamplePartitionKeyRangeIDRegionClient_NewListMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/percentile_client.go b/sdk/resourcemanager/cosmos/armcosmos/percentile_client.go index 94912d29c1e5..a11d3dfb2bc8 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/percentile_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/percentile_client.go @@ -47,7 +47,7 @@ func NewPercentileClient(subscriptionID string, credential azcore.TokenCredentia // NewListMetricsPager - Retrieves the metrics determined by the given filter for the given database account. This url is // only for PBS and Replication Latency data // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - filter - An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are @@ -97,7 +97,7 @@ func (client *PercentileClient) listMetricsCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") reqQP.Set("$filter", filter) req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} diff --git a/sdk/resourcemanager/cosmos/armcosmos/percentile_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/percentile_client_example_test.go index ee40a19a73fd..614946dddd73 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/percentile_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/percentile_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBPercentileGetMetrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBPercentileGetMetrics.json func ExamplePercentileClient_NewListMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/percentilesourcetarget_client.go b/sdk/resourcemanager/cosmos/armcosmos/percentilesourcetarget_client.go index 30d08d72a651..d16635a04e34 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/percentilesourcetarget_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/percentilesourcetarget_client.go @@ -47,7 +47,7 @@ func NewPercentileSourceTargetClient(subscriptionID string, credential azcore.To // NewListMetricsPager - Retrieves the metrics determined by the given filter for the given account, source and target region. // This url is only for PBS and Replication Latency data // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - sourceRegion - Source region from which data is written. Cosmos DB region, with spaces between words and each word capitalized. @@ -107,7 +107,7 @@ func (client *PercentileSourceTargetClient) listMetricsCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") reqQP.Set("$filter", filter) req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} diff --git a/sdk/resourcemanager/cosmos/armcosmos/percentilesourcetarget_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/percentilesourcetarget_client_example_test.go index f91a7b581171..9c8322afbea0 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/percentilesourcetarget_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/percentilesourcetarget_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBPercentileSourceTargetGetMetrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBPercentileSourceTargetGetMetrics.json func ExamplePercentileSourceTargetClient_NewListMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/percentiletarget_client.go b/sdk/resourcemanager/cosmos/armcosmos/percentiletarget_client.go index 34b98681b4fe..fd7e76e6c3e4 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/percentiletarget_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/percentiletarget_client.go @@ -47,7 +47,7 @@ func NewPercentileTargetClient(subscriptionID string, credential azcore.TokenCre // NewListMetricsPager - Retrieves the metrics determined by the given filter for the given account target region. This url // is only for PBS and Replication Latency data // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - targetRegion - Target region to which data is written. Cosmos DB region, with spaces between words and each word capitalized. @@ -102,7 +102,7 @@ func (client *PercentileTargetClient) listMetricsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") reqQP.Set("$filter", filter) req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} diff --git a/sdk/resourcemanager/cosmos/armcosmos/percentiletarget_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/percentiletarget_client_example_test.go index f1368893b35e..83bf4ace10d4 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/percentiletarget_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/percentiletarget_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBPercentileTargetGetMetrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBPercentileTargetGetMetrics.json func ExamplePercentileTargetClient_NewListMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/polymorphic_helpers.go b/sdk/resourcemanager/cosmos/armcosmos/polymorphic_helpers.go index fa381eb97ca1..5088459d488f 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/polymorphic_helpers.go +++ b/sdk/resourcemanager/cosmos/armcosmos/polymorphic_helpers.go @@ -31,28 +31,6 @@ func unmarshalBackupPolicyClassification(rawMsg json.RawMessage) (BackupPolicyCl return b, json.Unmarshal(rawMsg, b) } -func unmarshalDataTransferDataSourceSinkClassification(rawMsg json.RawMessage) (DataTransferDataSourceSinkClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]any - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b DataTransferDataSourceSinkClassification - switch m["component"] { - case string(DataTransferComponentAzureBlobStorage): - b = &AzureBlobDataTransferDataSourceSink{} - case string(DataTransferComponentCosmosDBCassandra): - b = &CassandraDataTransferDataSourceSink{} - case string(DataTransferComponentCosmosDBSQL): - b = &SQLDataTransferDataSourceSink{} - default: - b = &DataTransferDataSourceSink{} - } - return b, json.Unmarshal(rawMsg, b) -} - func unmarshalServiceResourcePropertiesClassification(rawMsg json.RawMessage) (ServiceResourcePropertiesClassification, error) { if rawMsg == nil { return nil, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/privateendpointconnections_client.go b/sdk/resourcemanager/cosmos/armcosmos/privateendpointconnections_client.go index a8b5d5f30326..63d05a3df99b 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/privateendpointconnections_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/privateendpointconnections_client.go @@ -47,7 +47,7 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcor // BeginCreateOrUpdate - Approve or reject a private endpoint connection with a given name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - privateEndpointConnectionName - The name of the private endpoint connection. @@ -68,7 +68,7 @@ func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context. // CreateOrUpdate - Approve or reject a private endpoint connection with a given name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *PrivateEndpointConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, accountName, privateEndpointConnectionName, parameters, options) if err != nil { @@ -108,7 +108,7 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -117,7 +117,7 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx // BeginDelete - Deletes a private endpoint connection with a given name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - privateEndpointConnectionName - The name of the private endpoint connection. @@ -138,7 +138,7 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, // Delete - Deletes a private endpoint connection with a given name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, privateEndpointConnectionName, options) if err != nil { @@ -178,7 +178,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -187,7 +187,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // Get - Gets a private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - privateEndpointConnectionName - The name of the private endpoint connection. @@ -232,7 +232,7 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +249,7 @@ func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Res // NewListByDatabaseAccountPager - List all private endpoint connections on a Cosmos DB account. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - PrivateEndpointConnectionsClientListByDatabaseAccountOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByDatabaseAccountPager @@ -296,7 +296,7 @@ func (client *PrivateEndpointConnectionsClient) listByDatabaseAccountCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/privateendpointconnections_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/privateendpointconnections_client_example_test.go index 1558329245d9..48f22715cd57 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/privateendpointconnections_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/privateendpointconnections_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBPrivateEndpointConnectionListGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBPrivateEndpointConnectionListGet.json func ExamplePrivateEndpointConnectionsClient_NewListByDatabaseAccountPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -80,7 +80,7 @@ func ExamplePrivateEndpointConnectionsClient_NewListByDatabaseAccountPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBPrivateEndpointConnectionGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBPrivateEndpointConnectionGet.json func ExamplePrivateEndpointConnectionsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -117,7 +117,7 @@ func ExamplePrivateEndpointConnectionsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBPrivateEndpointConnectionUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBPrivateEndpointConnectionUpdate.json func ExamplePrivateEndpointConnectionsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -165,7 +165,7 @@ func ExamplePrivateEndpointConnectionsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBPrivateEndpointConnectionDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBPrivateEndpointConnectionDelete.json func ExamplePrivateEndpointConnectionsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/privatelinkresources_client.go b/sdk/resourcemanager/cosmos/armcosmos/privatelinkresources_client.go index 69f835abef29..7295d5853e97 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/privatelinkresources_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/privatelinkresources_client.go @@ -47,7 +47,7 @@ func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.Toke // Get - Gets the private link resources that need to be created for a Cosmos DB account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - groupName - The name of the private link resource. @@ -92,7 +92,7 @@ func (client *PrivateLinkResourcesClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -109,7 +109,7 @@ func (client *PrivateLinkResourcesClient) getHandleResponse(resp *http.Response) // NewListByDatabaseAccountPager - Gets the private link resources that need to be created for a Cosmos DB account. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - PrivateLinkResourcesClientListByDatabaseAccountOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByDatabaseAccountPager @@ -156,7 +156,7 @@ func (client *PrivateLinkResourcesClient) listByDatabaseAccountCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/privatelinkresources_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/privatelinkresources_client_example_test.go index 094ca7725c3d..b070f821ad09 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/privatelinkresources_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/privatelinkresources_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBPrivateLinkResourceListGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBPrivateLinkResourceListGet.json func ExamplePrivateLinkResourcesClient_NewListByDatabaseAccountPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -58,7 +58,7 @@ func ExamplePrivateLinkResourcesClient_NewListByDatabaseAccountPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBPrivateLinkResourceGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBPrivateLinkResourceGet.json func ExamplePrivateLinkResourcesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/response_types.go b/sdk/resourcemanager/cosmos/armcosmos/response_types.go index 674b3a36bbd6..3872bf50aff7 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/response_types.go +++ b/sdk/resourcemanager/cosmos/armcosmos/response_types.go @@ -24,11 +24,6 @@ type CassandraClustersClientDeleteResponse struct { // placeholder for future response values } -// CassandraClustersClientGetBackupResponse contains the response from method CassandraClustersClient.GetBackup. -type CassandraClustersClientGetBackupResponse struct { - BackupResource -} - // CassandraClustersClientGetResponse contains the response from method CassandraClustersClient.Get. type CassandraClustersClientGetResponse struct { ClusterResource @@ -39,11 +34,6 @@ type CassandraClustersClientInvokeCommandResponse struct { CommandOutput } -// CassandraClustersClientListBackupsResponse contains the response from method CassandraClustersClient.NewListBackupsPager. -type CassandraClustersClientListBackupsResponse struct { - ListBackups -} - // CassandraClustersClientListByResourceGroupResponse contains the response from method CassandraClustersClient.NewListByResourceGroupPager. type CassandraClustersClientListByResourceGroupResponse struct { ListClusters @@ -104,11 +94,6 @@ type CassandraResourcesClientCreateUpdateCassandraTableResponse struct { CassandraTableGetResults } -// CassandraResourcesClientCreateUpdateCassandraViewResponse contains the response from method CassandraResourcesClient.BeginCreateUpdateCassandraView. -type CassandraResourcesClientCreateUpdateCassandraViewResponse struct { - CassandraViewGetResults -} - // CassandraResourcesClientDeleteCassandraKeyspaceResponse contains the response from method CassandraResourcesClient.BeginDeleteCassandraKeyspace. type CassandraResourcesClientDeleteCassandraKeyspaceResponse struct { // placeholder for future response values @@ -119,11 +104,6 @@ type CassandraResourcesClientDeleteCassandraTableResponse struct { // placeholder for future response values } -// CassandraResourcesClientDeleteCassandraViewResponse contains the response from method CassandraResourcesClient.BeginDeleteCassandraView. -type CassandraResourcesClientDeleteCassandraViewResponse struct { - // placeholder for future response values -} - // CassandraResourcesClientGetCassandraKeyspaceResponse contains the response from method CassandraResourcesClient.GetCassandraKeyspace. type CassandraResourcesClientGetCassandraKeyspaceResponse struct { CassandraKeyspaceGetResults @@ -144,16 +124,6 @@ type CassandraResourcesClientGetCassandraTableThroughputResponse struct { ThroughputSettingsGetResults } -// CassandraResourcesClientGetCassandraViewResponse contains the response from method CassandraResourcesClient.GetCassandraView. -type CassandraResourcesClientGetCassandraViewResponse struct { - CassandraViewGetResults -} - -// CassandraResourcesClientGetCassandraViewThroughputResponse contains the response from method CassandraResourcesClient.GetCassandraViewThroughput. -type CassandraResourcesClientGetCassandraViewThroughputResponse struct { - ThroughputSettingsGetResults -} - // CassandraResourcesClientListCassandraKeyspacesResponse contains the response from method CassandraResourcesClient.NewListCassandraKeyspacesPager. type CassandraResourcesClientListCassandraKeyspacesResponse struct { CassandraKeyspaceListResult @@ -164,11 +134,6 @@ type CassandraResourcesClientListCassandraTablesResponse struct { CassandraTableListResult } -// CassandraResourcesClientListCassandraViewsResponse contains the response from method CassandraResourcesClient.NewListCassandraViewsPager. -type CassandraResourcesClientListCassandraViewsResponse struct { - CassandraViewListResult -} - // CassandraResourcesClientMigrateCassandraKeyspaceToAutoscaleResponse contains the response from method CassandraResourcesClient.BeginMigrateCassandraKeyspaceToAutoscale. type CassandraResourcesClientMigrateCassandraKeyspaceToAutoscaleResponse struct { ThroughputSettingsGetResults @@ -189,16 +154,6 @@ type CassandraResourcesClientMigrateCassandraTableToManualThroughputResponse str ThroughputSettingsGetResults } -// CassandraResourcesClientMigrateCassandraViewToAutoscaleResponse contains the response from method CassandraResourcesClient.BeginMigrateCassandraViewToAutoscale. -type CassandraResourcesClientMigrateCassandraViewToAutoscaleResponse struct { - ThroughputSettingsGetResults -} - -// CassandraResourcesClientMigrateCassandraViewToManualThroughputResponse contains the response from method CassandraResourcesClient.BeginMigrateCassandraViewToManualThroughput. -type CassandraResourcesClientMigrateCassandraViewToManualThroughputResponse struct { - ThroughputSettingsGetResults -} - // CassandraResourcesClientUpdateCassandraKeyspaceThroughputResponse contains the response from method CassandraResourcesClient.BeginUpdateCassandraKeyspaceThroughput. type CassandraResourcesClientUpdateCassandraKeyspaceThroughputResponse struct { ThroughputSettingsGetResults @@ -209,11 +164,6 @@ type CassandraResourcesClientUpdateCassandraTableThroughputResponse struct { ThroughputSettingsGetResults } -// CassandraResourcesClientUpdateCassandraViewThroughputResponse contains the response from method CassandraResourcesClient.BeginUpdateCassandraViewThroughput. -type CassandraResourcesClientUpdateCassandraViewThroughputResponse struct { - ThroughputSettingsGetResults -} - // CollectionClientListMetricDefinitionsResponse contains the response from method CollectionClient.NewListMetricDefinitionsPager. type CollectionClientListMetricDefinitionsResponse struct { MetricDefinitionsListResult @@ -249,36 +199,6 @@ type CollectionRegionClientListMetricsResponse struct { MetricListResult } -// DataTransferJobsClientCancelResponse contains the response from method DataTransferJobsClient.Cancel. -type DataTransferJobsClientCancelResponse struct { - DataTransferJobGetResults -} - -// DataTransferJobsClientCreateResponse contains the response from method DataTransferJobsClient.Create. -type DataTransferJobsClientCreateResponse struct { - DataTransferJobGetResults -} - -// DataTransferJobsClientGetResponse contains the response from method DataTransferJobsClient.Get. -type DataTransferJobsClientGetResponse struct { - DataTransferJobGetResults -} - -// DataTransferJobsClientListByDatabaseAccountResponse contains the response from method DataTransferJobsClient.NewListByDatabaseAccountPager. -type DataTransferJobsClientListByDatabaseAccountResponse struct { - DataTransferJobFeedResults -} - -// DataTransferJobsClientPauseResponse contains the response from method DataTransferJobsClient.Pause. -type DataTransferJobsClientPauseResponse struct { - DataTransferJobGetResults -} - -// DataTransferJobsClientResumeResponse contains the response from method DataTransferJobsClient.Resume. -type DataTransferJobsClientResumeResponse struct { - DataTransferJobGetResults -} - // DatabaseAccountRegionClientListMetricsResponse contains the response from method DatabaseAccountRegionClient.NewListMetricsPager. type DatabaseAccountRegionClientListMetricsResponse struct { MetricListResult @@ -390,26 +310,6 @@ type DatabaseClientListUsagesResponse struct { UsagesResult } -// GraphResourcesClientCreateUpdateGraphResponse contains the response from method GraphResourcesClient.BeginCreateUpdateGraph. -type GraphResourcesClientCreateUpdateGraphResponse struct { - GraphResourceGetResults -} - -// GraphResourcesClientDeleteGraphResourceResponse contains the response from method GraphResourcesClient.BeginDeleteGraphResource. -type GraphResourcesClientDeleteGraphResourceResponse struct { - // placeholder for future response values -} - -// GraphResourcesClientGetGraphResponse contains the response from method GraphResourcesClient.GetGraph. -type GraphResourcesClientGetGraphResponse struct { - GraphResourceGetResults -} - -// GraphResourcesClientListGraphsResponse contains the response from method GraphResourcesClient.NewListGraphsPager. -type GraphResourcesClientListGraphsResponse struct { - GraphResourcesListResult -} - // GremlinResourcesClientCreateUpdateGremlinDatabaseResponse contains the response from method GremlinResourcesClient.BeginCreateUpdateGremlinDatabase. type GremlinResourcesClientCreateUpdateGremlinDatabaseResponse struct { GremlinDatabaseGetResults @@ -575,11 +475,6 @@ type MongoDBResourcesClientGetMongoUserDefinitionResponse struct { MongoUserDefinitionGetResults } -// MongoDBResourcesClientListMongoDBCollectionPartitionMergeResponse contains the response from method MongoDBResourcesClient.BeginListMongoDBCollectionPartitionMerge. -type MongoDBResourcesClientListMongoDBCollectionPartitionMergeResponse struct { - PhysicalPartitionStorageInfoCollection -} - // MongoDBResourcesClientListMongoDBCollectionsResponse contains the response from method MongoDBResourcesClient.NewListMongoDBCollectionsPager. type MongoDBResourcesClientListMongoDBCollectionsResponse struct { MongoDBCollectionListResult @@ -620,26 +515,6 @@ type MongoDBResourcesClientMigrateMongoDBDatabaseToManualThroughputResponse stru ThroughputSettingsGetResults } -// MongoDBResourcesClientMongoDBContainerRedistributeThroughputResponse contains the response from method MongoDBResourcesClient.BeginMongoDBContainerRedistributeThroughput. -type MongoDBResourcesClientMongoDBContainerRedistributeThroughputResponse struct { - PhysicalPartitionThroughputInfoResult -} - -// MongoDBResourcesClientMongoDBContainerRetrieveThroughputDistributionResponse contains the response from method MongoDBResourcesClient.BeginMongoDBContainerRetrieveThroughputDistribution. -type MongoDBResourcesClientMongoDBContainerRetrieveThroughputDistributionResponse struct { - PhysicalPartitionThroughputInfoResult -} - -// MongoDBResourcesClientMongoDBDatabaseRedistributeThroughputResponse contains the response from method MongoDBResourcesClient.BeginMongoDBDatabaseRedistributeThroughput. -type MongoDBResourcesClientMongoDBDatabaseRedistributeThroughputResponse struct { - PhysicalPartitionThroughputInfoResult -} - -// MongoDBResourcesClientMongoDBDatabaseRetrieveThroughputDistributionResponse contains the response from method MongoDBResourcesClient.BeginMongoDBDatabaseRetrieveThroughputDistribution. -type MongoDBResourcesClientMongoDBDatabaseRetrieveThroughputDistributionResponse struct { - PhysicalPartitionThroughputInfoResult -} - // MongoDBResourcesClientRetrieveContinuousBackupInformationResponse contains the response from method MongoDBResourcesClient.BeginRetrieveContinuousBackupInformation. type MongoDBResourcesClientRetrieveContinuousBackupInformationResponse struct { BackupInformation @@ -950,11 +825,6 @@ type SQLResourcesClientListClientEncryptionKeysResponse struct { ClientEncryptionKeysListResult } -// SQLResourcesClientListSQLContainerPartitionMergeResponse contains the response from method SQLResourcesClient.BeginListSQLContainerPartitionMerge. -type SQLResourcesClientListSQLContainerPartitionMergeResponse struct { - PhysicalPartitionStorageInfoCollection -} - // SQLResourcesClientListSQLContainersResponse contains the response from method SQLResourcesClient.NewListSQLContainersPager. type SQLResourcesClientListSQLContainersResponse struct { SQLContainerListResult @@ -1015,26 +885,6 @@ type SQLResourcesClientRetrieveContinuousBackupInformationResponse struct { BackupInformation } -// SQLResourcesClientSQLContainerRedistributeThroughputResponse contains the response from method SQLResourcesClient.BeginSQLContainerRedistributeThroughput. -type SQLResourcesClientSQLContainerRedistributeThroughputResponse struct { - PhysicalPartitionThroughputInfoResult -} - -// SQLResourcesClientSQLContainerRetrieveThroughputDistributionResponse contains the response from method SQLResourcesClient.BeginSQLContainerRetrieveThroughputDistribution. -type SQLResourcesClientSQLContainerRetrieveThroughputDistributionResponse struct { - PhysicalPartitionThroughputInfoResult -} - -// SQLResourcesClientSQLDatabaseRedistributeThroughputResponse contains the response from method SQLResourcesClient.BeginSQLDatabaseRedistributeThroughput. -type SQLResourcesClientSQLDatabaseRedistributeThroughputResponse struct { - PhysicalPartitionThroughputInfoResult -} - -// SQLResourcesClientSQLDatabaseRetrieveThroughputDistributionResponse contains the response from method SQLResourcesClient.BeginSQLDatabaseRetrieveThroughputDistribution. -type SQLResourcesClientSQLDatabaseRetrieveThroughputDistributionResponse struct { - PhysicalPartitionThroughputInfoResult -} - // SQLResourcesClientUpdateSQLContainerThroughputResponse contains the response from method SQLResourcesClient.BeginUpdateSQLContainerThroughput. type SQLResourcesClientUpdateSQLContainerThroughputResponse struct { ThroughputSettingsGetResults diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorabledatabaseaccounts_client.go b/sdk/resourcemanager/cosmos/armcosmos/restorabledatabaseaccounts_client.go index eda31f2f756d..cad6813e8f87 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorabledatabaseaccounts_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorabledatabaseaccounts_client.go @@ -48,7 +48,7 @@ func NewRestorableDatabaseAccountsClient(subscriptionID string, credential azcor // 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read/*' permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - location - Cosmos DB region, with spaces between words and each word capitalized. // - instanceID - The instanceId GUID of a restorable database account. // - options - RestorableDatabaseAccountsClientGetByLocationOptions contains the optional parameters for the RestorableDatabaseAccountsClient.GetByLocation @@ -88,7 +88,7 @@ func (client *RestorableDatabaseAccountsClient) getByLocationCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -106,7 +106,7 @@ func (client *RestorableDatabaseAccountsClient) getByLocationHandleResponse(resp // NewListPager - Lists all the restorable Azure Cosmos DB database accounts available under the subscription. This call requires // 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - options - RestorableDatabaseAccountsClientListOptions contains the optional parameters for the RestorableDatabaseAccountsClient.NewListPager // method. func (client *RestorableDatabaseAccountsClient) NewListPager(options *RestorableDatabaseAccountsClientListOptions) *runtime.Pager[RestorableDatabaseAccountsClientListResponse] { @@ -143,7 +143,7 @@ func (client *RestorableDatabaseAccountsClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -162,7 +162,7 @@ func (client *RestorableDatabaseAccountsClient) listHandleResponse(resp *http.Re // in a region. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' // permission. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - location - Cosmos DB region, with spaces between words and each word capitalized. // - options - RestorableDatabaseAccountsClientListByLocationOptions contains the optional parameters for the RestorableDatabaseAccountsClient.NewListByLocationPager // method. @@ -204,7 +204,7 @@ func (client *RestorableDatabaseAccountsClient) listByLocationCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorabledatabaseaccounts_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/restorabledatabaseaccounts_client_example_test.go index a68b3f1a9f39..c1a46cb12164 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorabledatabaseaccounts_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorabledatabaseaccounts_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBRestorableDatabaseAccountList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBRestorableDatabaseAccountList.json func ExampleRestorableDatabaseAccountsClient_NewListByLocationPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -51,7 +51,6 @@ func ExampleRestorableDatabaseAccountsClient_NewListByLocationPager() { // APIType: to.Ptr(armcosmos.APITypeSQL), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-11T21:56:15Z"); return t}()), // DeletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09Z"); return t}()), - // OldestRestorableTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-01T22:05:09Z"); return t}()), // RestorableLocations: []*armcosmos.RestorableLocationResource{ // { // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-30T21:13:10Z"); return t}()), @@ -75,7 +74,6 @@ func ExampleRestorableDatabaseAccountsClient_NewListByLocationPager() { // AccountName: to.Ptr("ddb2"), // APIType: to.Ptr(armcosmos.APITypeSQL), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T08:05:18Z"); return t}()), - // OldestRestorableTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-01T22:05:09Z"); return t}()), // RestorableLocations: []*armcosmos.RestorableLocationResource{ // { // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-30T21:13:10Z"); return t}()), @@ -94,7 +92,7 @@ func ExampleRestorableDatabaseAccountsClient_NewListByLocationPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json func ExampleRestorableDatabaseAccountsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -128,7 +126,6 @@ func ExampleRestorableDatabaseAccountsClient_NewListPager() { // APIType: to.Ptr(armcosmos.APITypeSQL), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-11T21:56:15Z"); return t}()), // DeletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09Z"); return t}()), - // OldestRestorableTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-01T22:05:09Z"); return t}()), // RestorableLocations: []*armcosmos.RestorableLocationResource{ // { // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-30T21:13:10Z"); return t}()), @@ -152,7 +149,6 @@ func ExampleRestorableDatabaseAccountsClient_NewListPager() { // AccountName: to.Ptr("ddb2"), // APIType: to.Ptr(armcosmos.APITypeSQL), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T08:05:18Z"); return t}()), - // OldestRestorableTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-01T22:05:09Z"); return t}()), // RestorableLocations: []*armcosmos.RestorableLocationResource{ // { // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-30T21:13:10Z"); return t}()), @@ -171,7 +167,7 @@ func ExampleRestorableDatabaseAccountsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBRestorableDatabaseAccountGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBRestorableDatabaseAccountGet.json func ExampleRestorableDatabaseAccountsClient_GetByLocation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -199,7 +195,6 @@ func ExampleRestorableDatabaseAccountsClient_GetByLocation() { // APIType: to.Ptr(armcosmos.APITypeSQL), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-11T21:56:15Z"); return t}()), // DeletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09Z"); return t}()), - // OldestRestorableTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-01T22:05:09Z"); return t}()), // RestorableLocations: []*armcosmos.RestorableLocationResource{ // { // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-30T21:13:10Z"); return t}()), diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablegremlindatabases_client.go b/sdk/resourcemanager/cosmos/armcosmos/restorablegremlindatabases_client.go index b2c433cc0af5..25f60bf83b78 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablegremlindatabases_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablegremlindatabases_client.go @@ -48,7 +48,7 @@ func NewRestorableGremlinDatabasesClient(subscriptionID string, credential azcor // account. This helps in scenario where database was accidentally deleted to get the deletion // time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - location - Cosmos DB region, with spaces between words and each word capitalized. // - instanceID - The instanceId GUID of a restorable database account. // - options - RestorableGremlinDatabasesClientListOptions contains the optional parameters for the RestorableGremlinDatabasesClient.NewListPager @@ -95,7 +95,7 @@ func (client *RestorableGremlinDatabasesClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablegremlindatabases_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/restorablegremlindatabases_client_example_test.go index f07899ef0df9..df7df337e85e 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablegremlindatabases_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablegremlindatabases_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBRestorableGremlinDatabaseList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBRestorableGremlinDatabaseList.json func ExampleRestorableGremlinDatabasesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablegremlingraphs_client.go b/sdk/resourcemanager/cosmos/armcosmos/restorablegremlingraphs_client.go index 8bff7018d44b..af1309b88d0e 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablegremlingraphs_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablegremlingraphs_client.go @@ -48,7 +48,7 @@ func NewRestorableGremlinGraphsClient(subscriptionID string, credential azcore.T // This helps in scenario where container was accidentally deleted. This API requires // 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - location - Cosmos DB region, with spaces between words and each word capitalized. // - instanceID - The instanceId GUID of a restorable database account. // - options - RestorableGremlinGraphsClientListOptions contains the optional parameters for the RestorableGremlinGraphsClient.NewListPager @@ -95,7 +95,7 @@ func (client *RestorableGremlinGraphsClient) listCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") if options != nil && options.RestorableGremlinDatabaseRid != nil { reqQP.Set("restorableGremlinDatabaseRid", *options.RestorableGremlinDatabaseRid) } diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablegremlingraphs_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/restorablegremlingraphs_client_example_test.go index 5f311c47085b..01913e546f40 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablegremlingraphs_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablegremlingraphs_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBRestorableGremlinGraphList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBRestorableGremlinGraphList.json func ExampleRestorableGremlinGraphsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablegremlinresources_client.go b/sdk/resourcemanager/cosmos/armcosmos/restorablegremlinresources_client.go index 7846ece07b0e..9918de003efa 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablegremlinresources_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablegremlinresources_client.go @@ -48,7 +48,7 @@ func NewRestorableGremlinResourcesClient(subscriptionID string, credential azcor // location. This helps in scenarios to validate what resources exist at given timestamp and // location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - location - Cosmos DB region, with spaces between words and each word capitalized. // - instanceID - The instanceId GUID of a restorable database account. // - options - RestorableGremlinResourcesClientListOptions contains the optional parameters for the RestorableGremlinResourcesClient.NewListPager @@ -95,7 +95,7 @@ func (client *RestorableGremlinResourcesClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") if options != nil && options.RestoreLocation != nil { reqQP.Set("restoreLocation", *options.RestoreLocation) } diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablegremlinresources_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/restorablegremlinresources_client_example_test.go index fe0971f0640d..47e8c71ad7a3 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablegremlinresources_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablegremlinresources_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBRestorableGremlinResourceList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBRestorableGremlinResourceList.json func ExampleRestorableGremlinResourcesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbcollections_client.go b/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbcollections_client.go index 17fce944a779..df47288cd9ba 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbcollections_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbcollections_client.go @@ -48,7 +48,7 @@ func NewRestorableMongodbCollectionsClient(subscriptionID string, credential azc // database. This helps in scenario where container was accidentally deleted. This API requires // 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - location - Cosmos DB region, with spaces between words and each word capitalized. // - instanceID - The instanceId GUID of a restorable database account. // - options - RestorableMongodbCollectionsClientListOptions contains the optional parameters for the RestorableMongodbCollectionsClient.NewListPager @@ -95,7 +95,7 @@ func (client *RestorableMongodbCollectionsClient) listCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") if options != nil && options.RestorableMongodbDatabaseRid != nil { reqQP.Set("restorableMongodbDatabaseRid", *options.RestorableMongodbDatabaseRid) } diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbcollections_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbcollections_client_example_test.go index f03b9acb4f3d..7a77b3886265 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbcollections_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbcollections_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBRestorableMongodbCollectionList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBRestorableMongodbCollectionList.json func ExampleRestorableMongodbCollectionsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbdatabases_client.go b/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbdatabases_client.go index f7f3281ac8d0..da2991463d4e 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbdatabases_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbdatabases_client.go @@ -48,7 +48,7 @@ func NewRestorableMongodbDatabasesClient(subscriptionID string, credential azcor // account. This helps in scenario where database was accidentally deleted to get the deletion // time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - location - Cosmos DB region, with spaces between words and each word capitalized. // - instanceID - The instanceId GUID of a restorable database account. // - options - RestorableMongodbDatabasesClientListOptions contains the optional parameters for the RestorableMongodbDatabasesClient.NewListPager @@ -95,7 +95,7 @@ func (client *RestorableMongodbDatabasesClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbdatabases_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbdatabases_client_example_test.go index 03e3b45a2e18..d74f89e918b7 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbdatabases_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbdatabases_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBRestorableMongodbDatabaseList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBRestorableMongodbDatabaseList.json func ExampleRestorableMongodbDatabasesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbresources_client.go b/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbresources_client.go index 18a03125663f..22459a1309a9 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbresources_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbresources_client.go @@ -48,7 +48,7 @@ func NewRestorableMongodbResourcesClient(subscriptionID string, credential azcor // This helps in scenarios to validate what resources exist at given timestamp and location. // This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - location - Cosmos DB region, with spaces between words and each word capitalized. // - instanceID - The instanceId GUID of a restorable database account. // - options - RestorableMongodbResourcesClientListOptions contains the optional parameters for the RestorableMongodbResourcesClient.NewListPager @@ -95,7 +95,7 @@ func (client *RestorableMongodbResourcesClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") if options != nil && options.RestoreLocation != nil { reqQP.Set("restoreLocation", *options.RestoreLocation) } diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbresources_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbresources_client_example_test.go index 1a0b5b4c2acc..4645a9e968e6 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbresources_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbresources_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBRestorableMongodbResourceList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBRestorableMongodbResourceList.json func ExampleRestorableMongodbResourcesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablesqlcontainers_client.go b/sdk/resourcemanager/cosmos/armcosmos/restorablesqlcontainers_client.go index 00e35e57599b..1abeaa9e7b6e 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablesqlcontainers_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablesqlcontainers_client.go @@ -48,7 +48,7 @@ func NewRestorableSQLContainersClient(subscriptionID string, credential azcore.T // This helps in scenario where container was accidentally deleted. This API requires // 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - location - Cosmos DB region, with spaces between words and each word capitalized. // - instanceID - The instanceId GUID of a restorable database account. // - options - RestorableSQLContainersClientListOptions contains the optional parameters for the RestorableSQLContainersClient.NewListPager @@ -95,7 +95,7 @@ func (client *RestorableSQLContainersClient) listCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") if options != nil && options.RestorableSQLDatabaseRid != nil { reqQP.Set("restorableSqlDatabaseRid", *options.RestorableSQLDatabaseRid) } diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablesqlcontainers_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/restorablesqlcontainers_client_example_test.go index 3fe30463c6e4..44d921bca3c3 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablesqlcontainers_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablesqlcontainers_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBRestorableSqlContainerList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBRestorableSqlContainerList.json func ExampleRestorableSQLContainersClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablesqldatabases_client.go b/sdk/resourcemanager/cosmos/armcosmos/restorablesqldatabases_client.go index d6846ec03ff5..9df4594926fc 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablesqldatabases_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablesqldatabases_client.go @@ -48,7 +48,7 @@ func NewRestorableSQLDatabasesClient(subscriptionID string, credential azcore.To // account. This helps in scenario where database was accidentally deleted to get the deletion // time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - location - Cosmos DB region, with spaces between words and each word capitalized. // - instanceID - The instanceId GUID of a restorable database account. // - options - RestorableSQLDatabasesClientListOptions contains the optional parameters for the RestorableSQLDatabasesClient.NewListPager @@ -95,7 +95,7 @@ func (client *RestorableSQLDatabasesClient) listCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablesqldatabases_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/restorablesqldatabases_client_example_test.go index 393a13f311c4..a22a90a87ea1 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablesqldatabases_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablesqldatabases_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBRestorableSqlDatabaseList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBRestorableSqlDatabaseList.json func ExampleRestorableSQLDatabasesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablesqlresources_client.go b/sdk/resourcemanager/cosmos/armcosmos/restorablesqlresources_client.go index 41e86ddc686d..e9da2a0c4085 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablesqlresources_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablesqlresources_client.go @@ -48,7 +48,7 @@ func NewRestorableSQLResourcesClient(subscriptionID string, credential azcore.To // This helps in scenarios to validate what resources exist at given timestamp and location. // This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - location - Cosmos DB region, with spaces between words and each word capitalized. // - instanceID - The instanceId GUID of a restorable database account. // - options - RestorableSQLResourcesClientListOptions contains the optional parameters for the RestorableSQLResourcesClient.NewListPager @@ -95,7 +95,7 @@ func (client *RestorableSQLResourcesClient) listCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") if options != nil && options.RestoreLocation != nil { reqQP.Set("restoreLocation", *options.RestoreLocation) } diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablesqlresources_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/restorablesqlresources_client_example_test.go index 94f19eb1d6e6..c46a0a8c9cbf 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablesqlresources_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablesqlresources_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBRestorableSqlResourceList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBRestorableSqlResourceList.json func ExampleRestorableSQLResourcesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorabletableresources_client.go b/sdk/resourcemanager/cosmos/armcosmos/restorabletableresources_client.go index e2e874781ad1..e40bf4ae1c4a 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorabletableresources_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorabletableresources_client.go @@ -48,7 +48,7 @@ func NewRestorableTableResourcesClient(subscriptionID string, credential azcore. // to validate what resources exist at given timestamp and location. This API requires // 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - location - Cosmos DB region, with spaces between words and each word capitalized. // - instanceID - The instanceId GUID of a restorable database account. // - options - RestorableTableResourcesClientListOptions contains the optional parameters for the RestorableTableResourcesClient.NewListPager @@ -95,7 +95,7 @@ func (client *RestorableTableResourcesClient) listCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") if options != nil && options.RestoreLocation != nil { reqQP.Set("restoreLocation", *options.RestoreLocation) } diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorabletableresources_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/restorabletableresources_client_example_test.go index 8854c36cad6e..bd8d323113a2 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorabletableresources_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorabletableresources_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBRestorableTableResourceList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBRestorableTableResourceList.json func ExampleRestorableTableResourcesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorabletables_client.go b/sdk/resourcemanager/cosmos/armcosmos/restorabletables_client.go index afd60c71b6ac..054b9cea8870 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorabletables_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorabletables_client.go @@ -48,7 +48,7 @@ func NewRestorableTablesClient(subscriptionID string, credential azcore.TokenCre // table was accidentally deleted. This API requires // 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - location - Cosmos DB region, with spaces between words and each word capitalized. // - instanceID - The instanceId GUID of a restorable database account. // - options - RestorableTablesClientListOptions contains the optional parameters for the RestorableTablesClient.NewListPager @@ -95,7 +95,7 @@ func (client *RestorableTablesClient) listCreateRequest(ctx context.Context, loc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") if options != nil && options.StartTime != nil { reqQP.Set("startTime", *options.StartTime) } diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorabletables_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/restorabletables_client_example_test.go index 4246ce22c1c6..f28efd988174 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorabletables_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorabletables_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBRestorableTableList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBRestorableTableList.json func ExampleRestorableTablesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/service_client.go b/sdk/resourcemanager/cosmos/armcosmos/service_client.go index 7e33694810b3..be53a960f731 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/service_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/service_client.go @@ -47,7 +47,7 @@ func NewServiceClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreate - Creates a service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - serviceName - Cosmos DB service name. @@ -68,7 +68,7 @@ func (client *ServiceClient) BeginCreate(ctx context.Context, resourceGroupName // Create - Creates a service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *ServiceClient) create(ctx context.Context, resourceGroupName string, accountName string, serviceName string, createUpdateParameters ServiceResourceCreateUpdateParameters, options *ServiceClientBeginCreateOptions) (*http.Response, error) { req, err := client.createCreateRequest(ctx, resourceGroupName, accountName, serviceName, createUpdateParameters, options) if err != nil { @@ -108,7 +108,7 @@ func (client *ServiceClient) createCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, createUpdateParameters) @@ -117,7 +117,7 @@ func (client *ServiceClient) createCreateRequest(ctx context.Context, resourceGr // BeginDelete - Deletes service with the given serviceName. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - serviceName - Cosmos DB service name. @@ -137,7 +137,7 @@ func (client *ServiceClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Deletes service with the given serviceName. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *ServiceClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, serviceName string, options *ServiceClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, serviceName, options) if err != nil { @@ -177,7 +177,7 @@ func (client *ServiceClient) deleteCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -186,7 +186,7 @@ func (client *ServiceClient) deleteCreateRequest(ctx context.Context, resourceGr // Get - Gets the status of service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - serviceName - Cosmos DB service name. @@ -230,7 +230,7 @@ func (client *ServiceClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -247,7 +247,7 @@ func (client *ServiceClient) getHandleResponse(resp *http.Response) (ServiceClie // NewListPager - Gets the status of service. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - ServiceClientListOptions contains the optional parameters for the ServiceClient.NewListPager method. @@ -293,7 +293,7 @@ func (client *ServiceClient) listCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/service_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/service_client_example_test.go index 752fe5ef6d11..ffd5320239bc 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/service_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/service_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBServicesList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBServicesList.json func ExampleServiceClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -66,7 +66,7 @@ func ExampleServiceClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDataTransferServiceCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDataTransferServiceCreate.json func ExampleServiceClient_BeginCreate_dataTransferServiceCreate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -114,7 +114,7 @@ func ExampleServiceClient_BeginCreate_dataTransferServiceCreate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBGraphAPIComputeServiceCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBGraphAPIComputeServiceCreate.json func ExampleServiceClient_BeginCreate_graphApiComputeServiceCreate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -164,7 +164,7 @@ func ExampleServiceClient_BeginCreate_graphApiComputeServiceCreate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMaterializedViewsBuilderServiceCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMaterializedViewsBuilderServiceCreate.json func ExampleServiceClient_BeginCreate_materializedViewsBuilderServiceCreate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -212,7 +212,7 @@ func ExampleServiceClient_BeginCreate_materializedViewsBuilderServiceCreate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlDedicatedGatewayServiceCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlDedicatedGatewayServiceCreate.json func ExampleServiceClient_BeginCreate_sqlDedicatedGatewayServiceCreate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -262,7 +262,7 @@ func ExampleServiceClient_BeginCreate_sqlDedicatedGatewayServiceCreate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDataTransferServiceGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDataTransferServiceGet.json func ExampleServiceClient_Get_dataTransferServiceGet() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -300,7 +300,7 @@ func ExampleServiceClient_Get_dataTransferServiceGet() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBGraphAPIComputeServiceGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBGraphAPIComputeServiceGet.json func ExampleServiceClient_Get_graphApiComputeServiceGet() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -340,7 +340,7 @@ func ExampleServiceClient_Get_graphApiComputeServiceGet() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMaterializedViewsBuilderServiceGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMaterializedViewsBuilderServiceGet.json func ExampleServiceClient_Get_materializedViewsBuilderServiceGet() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -378,7 +378,7 @@ func ExampleServiceClient_Get_materializedViewsBuilderServiceGet() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlDedicatedGatewayServiceGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlDedicatedGatewayServiceGet.json func ExampleServiceClient_Get_sqlDedicatedGatewayServiceGet() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -418,7 +418,7 @@ func ExampleServiceClient_Get_sqlDedicatedGatewayServiceGet() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBDataTransferServiceDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBDataTransferServiceDelete.json func ExampleServiceClient_BeginDelete_dataTransferServiceDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -439,7 +439,7 @@ func ExampleServiceClient_BeginDelete_dataTransferServiceDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBGraphAPIComputeServiceDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBGraphAPIComputeServiceDelete.json func ExampleServiceClient_BeginDelete_graphApiComputeServiceDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -460,7 +460,7 @@ func ExampleServiceClient_BeginDelete_graphApiComputeServiceDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBMaterializedViewsBuilderServiceDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBMaterializedViewsBuilderServiceDelete.json func ExampleServiceClient_BeginDelete_materializedViewsBuilderServiceDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -481,7 +481,7 @@ func ExampleServiceClient_BeginDelete_materializedViewsBuilderServiceDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlDedicatedGatewayServiceDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlDedicatedGatewayServiceDelete.json func ExampleServiceClient_BeginDelete_sqlDedicatedGatewayServiceDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/sqlresources_client.go b/sdk/resourcemanager/cosmos/armcosmos/sqlresources_client.go index e3714aff01fd..1782374125b4 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/sqlresources_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/sqlresources_client.go @@ -48,7 +48,7 @@ func NewSQLResourcesClient(subscriptionID string, credential azcore.TokenCredent // such as the Azure Powershell (instead of directly). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -72,7 +72,7 @@ func (client *SQLResourcesClient) BeginCreateUpdateClientEncryptionKey(ctx conte // as the Azure Powershell (instead of directly). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *SQLResourcesClient) createUpdateClientEncryptionKey(ctx context.Context, resourceGroupName string, accountName string, databaseName string, clientEncryptionKeyName string, createUpdateClientEncryptionKeyParameters ClientEncryptionKeyCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateClientEncryptionKeyOptions) (*http.Response, error) { req, err := client.createUpdateClientEncryptionKeyCreateRequest(ctx, resourceGroupName, accountName, databaseName, clientEncryptionKeyName, createUpdateClientEncryptionKeyParameters, options) if err != nil { @@ -116,7 +116,7 @@ func (client *SQLResourcesClient) createUpdateClientEncryptionKeyCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, createUpdateClientEncryptionKeyParameters) @@ -125,7 +125,7 @@ func (client *SQLResourcesClient) createUpdateClientEncryptionKeyCreateRequest(c // BeginCreateUpdateSQLContainer - Create or update an Azure Cosmos DB SQL container // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -148,7 +148,7 @@ func (client *SQLResourcesClient) BeginCreateUpdateSQLContainer(ctx context.Cont // CreateUpdateSQLContainer - Create or update an Azure Cosmos DB SQL container // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *SQLResourcesClient) createUpdateSQLContainer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, createUpdateSQLContainerParameters SQLContainerCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateSQLContainerOptions) (*http.Response, error) { req, err := client.createUpdateSQLContainerCreateRequest(ctx, resourceGroupName, accountName, databaseName, containerName, createUpdateSQLContainerParameters, options) if err != nil { @@ -192,7 +192,7 @@ func (client *SQLResourcesClient) createUpdateSQLContainerCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, createUpdateSQLContainerParameters) @@ -201,7 +201,7 @@ func (client *SQLResourcesClient) createUpdateSQLContainerCreateRequest(ctx cont // BeginCreateUpdateSQLDatabase - Create or update an Azure Cosmos DB SQL database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -223,7 +223,7 @@ func (client *SQLResourcesClient) BeginCreateUpdateSQLDatabase(ctx context.Conte // CreateUpdateSQLDatabase - Create or update an Azure Cosmos DB SQL database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *SQLResourcesClient) createUpdateSQLDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, createUpdateSQLDatabaseParameters SQLDatabaseCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateSQLDatabaseOptions) (*http.Response, error) { req, err := client.createUpdateSQLDatabaseCreateRequest(ctx, resourceGroupName, accountName, databaseName, createUpdateSQLDatabaseParameters, options) if err != nil { @@ -263,7 +263,7 @@ func (client *SQLResourcesClient) createUpdateSQLDatabaseCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, createUpdateSQLDatabaseParameters) @@ -272,7 +272,7 @@ func (client *SQLResourcesClient) createUpdateSQLDatabaseCreateRequest(ctx conte // BeginCreateUpdateSQLRoleAssignment - Creates or updates an Azure Cosmos DB SQL Role Assignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - roleAssignmentID - The GUID for the Role Assignment. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. @@ -294,7 +294,7 @@ func (client *SQLResourcesClient) BeginCreateUpdateSQLRoleAssignment(ctx context // CreateUpdateSQLRoleAssignment - Creates or updates an Azure Cosmos DB SQL Role Assignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *SQLResourcesClient) createUpdateSQLRoleAssignment(ctx context.Context, roleAssignmentID string, resourceGroupName string, accountName string, createUpdateSQLRoleAssignmentParameters SQLRoleAssignmentCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateSQLRoleAssignmentOptions) (*http.Response, error) { req, err := client.createUpdateSQLRoleAssignmentCreateRequest(ctx, roleAssignmentID, resourceGroupName, accountName, createUpdateSQLRoleAssignmentParameters, options) if err != nil { @@ -334,7 +334,7 @@ func (client *SQLResourcesClient) createUpdateSQLRoleAssignmentCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, createUpdateSQLRoleAssignmentParameters) @@ -343,7 +343,7 @@ func (client *SQLResourcesClient) createUpdateSQLRoleAssignmentCreateRequest(ctx // BeginCreateUpdateSQLRoleDefinition - Creates or updates an Azure Cosmos DB SQL Role Definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - roleDefinitionID - The GUID for the Role Definition. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. @@ -365,7 +365,7 @@ func (client *SQLResourcesClient) BeginCreateUpdateSQLRoleDefinition(ctx context // CreateUpdateSQLRoleDefinition - Creates or updates an Azure Cosmos DB SQL Role Definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *SQLResourcesClient) createUpdateSQLRoleDefinition(ctx context.Context, roleDefinitionID string, resourceGroupName string, accountName string, createUpdateSQLRoleDefinitionParameters SQLRoleDefinitionCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateSQLRoleDefinitionOptions) (*http.Response, error) { req, err := client.createUpdateSQLRoleDefinitionCreateRequest(ctx, roleDefinitionID, resourceGroupName, accountName, createUpdateSQLRoleDefinitionParameters, options) if err != nil { @@ -405,7 +405,7 @@ func (client *SQLResourcesClient) createUpdateSQLRoleDefinitionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, createUpdateSQLRoleDefinitionParameters) @@ -414,7 +414,7 @@ func (client *SQLResourcesClient) createUpdateSQLRoleDefinitionCreateRequest(ctx // BeginCreateUpdateSQLStoredProcedure - Create or update an Azure Cosmos DB SQL storedProcedure // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -438,7 +438,7 @@ func (client *SQLResourcesClient) BeginCreateUpdateSQLStoredProcedure(ctx contex // CreateUpdateSQLStoredProcedure - Create or update an Azure Cosmos DB SQL storedProcedure // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *SQLResourcesClient) createUpdateSQLStoredProcedure(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, storedProcedureName string, createUpdateSQLStoredProcedureParameters SQLStoredProcedureCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateSQLStoredProcedureOptions) (*http.Response, error) { req, err := client.createUpdateSQLStoredProcedureCreateRequest(ctx, resourceGroupName, accountName, databaseName, containerName, storedProcedureName, createUpdateSQLStoredProcedureParameters, options) if err != nil { @@ -486,7 +486,7 @@ func (client *SQLResourcesClient) createUpdateSQLStoredProcedureCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, createUpdateSQLStoredProcedureParameters) @@ -495,7 +495,7 @@ func (client *SQLResourcesClient) createUpdateSQLStoredProcedureCreateRequest(ct // BeginCreateUpdateSQLTrigger - Create or update an Azure Cosmos DB SQL trigger // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -519,7 +519,7 @@ func (client *SQLResourcesClient) BeginCreateUpdateSQLTrigger(ctx context.Contex // CreateUpdateSQLTrigger - Create or update an Azure Cosmos DB SQL trigger // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *SQLResourcesClient) createUpdateSQLTrigger(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, triggerName string, createUpdateSQLTriggerParameters SQLTriggerCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateSQLTriggerOptions) (*http.Response, error) { req, err := client.createUpdateSQLTriggerCreateRequest(ctx, resourceGroupName, accountName, databaseName, containerName, triggerName, createUpdateSQLTriggerParameters, options) if err != nil { @@ -567,7 +567,7 @@ func (client *SQLResourcesClient) createUpdateSQLTriggerCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, createUpdateSQLTriggerParameters) @@ -576,7 +576,7 @@ func (client *SQLResourcesClient) createUpdateSQLTriggerCreateRequest(ctx contex // BeginCreateUpdateSQLUserDefinedFunction - Create or update an Azure Cosmos DB SQL userDefinedFunction // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -600,7 +600,7 @@ func (client *SQLResourcesClient) BeginCreateUpdateSQLUserDefinedFunction(ctx co // CreateUpdateSQLUserDefinedFunction - Create or update an Azure Cosmos DB SQL userDefinedFunction // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *SQLResourcesClient) createUpdateSQLUserDefinedFunction(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, userDefinedFunctionName string, createUpdateSQLUserDefinedFunctionParameters SQLUserDefinedFunctionCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateSQLUserDefinedFunctionOptions) (*http.Response, error) { req, err := client.createUpdateSQLUserDefinedFunctionCreateRequest(ctx, resourceGroupName, accountName, databaseName, containerName, userDefinedFunctionName, createUpdateSQLUserDefinedFunctionParameters, options) if err != nil { @@ -648,7 +648,7 @@ func (client *SQLResourcesClient) createUpdateSQLUserDefinedFunctionCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, createUpdateSQLUserDefinedFunctionParameters) @@ -657,7 +657,7 @@ func (client *SQLResourcesClient) createUpdateSQLUserDefinedFunctionCreateReques // BeginDeleteSQLContainer - Deletes an existing Azure Cosmos DB SQL container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -679,7 +679,7 @@ func (client *SQLResourcesClient) BeginDeleteSQLContainer(ctx context.Context, r // DeleteSQLContainer - Deletes an existing Azure Cosmos DB SQL container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *SQLResourcesClient) deleteSQLContainer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, options *SQLResourcesClientBeginDeleteSQLContainerOptions) (*http.Response, error) { req, err := client.deleteSQLContainerCreateRequest(ctx, resourceGroupName, accountName, databaseName, containerName, options) if err != nil { @@ -723,7 +723,7 @@ func (client *SQLResourcesClient) deleteSQLContainerCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -731,7 +731,7 @@ func (client *SQLResourcesClient) deleteSQLContainerCreateRequest(ctx context.Co // BeginDeleteSQLDatabase - Deletes an existing Azure Cosmos DB SQL database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -752,7 +752,7 @@ func (client *SQLResourcesClient) BeginDeleteSQLDatabase(ctx context.Context, re // DeleteSQLDatabase - Deletes an existing Azure Cosmos DB SQL database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *SQLResourcesClient) deleteSQLDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *SQLResourcesClientBeginDeleteSQLDatabaseOptions) (*http.Response, error) { req, err := client.deleteSQLDatabaseCreateRequest(ctx, resourceGroupName, accountName, databaseName, options) if err != nil { @@ -792,7 +792,7 @@ func (client *SQLResourcesClient) deleteSQLDatabaseCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -800,7 +800,7 @@ func (client *SQLResourcesClient) deleteSQLDatabaseCreateRequest(ctx context.Con // BeginDeleteSQLRoleAssignment - Deletes an existing Azure Cosmos DB SQL Role Assignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - roleAssignmentID - The GUID for the Role Assignment. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. @@ -821,7 +821,7 @@ func (client *SQLResourcesClient) BeginDeleteSQLRoleAssignment(ctx context.Conte // DeleteSQLRoleAssignment - Deletes an existing Azure Cosmos DB SQL Role Assignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *SQLResourcesClient) deleteSQLRoleAssignment(ctx context.Context, roleAssignmentID string, resourceGroupName string, accountName string, options *SQLResourcesClientBeginDeleteSQLRoleAssignmentOptions) (*http.Response, error) { req, err := client.deleteSQLRoleAssignmentCreateRequest(ctx, roleAssignmentID, resourceGroupName, accountName, options) if err != nil { @@ -861,7 +861,7 @@ func (client *SQLResourcesClient) deleteSQLRoleAssignmentCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -870,7 +870,7 @@ func (client *SQLResourcesClient) deleteSQLRoleAssignmentCreateRequest(ctx conte // BeginDeleteSQLRoleDefinition - Deletes an existing Azure Cosmos DB SQL Role Definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - roleDefinitionID - The GUID for the Role Definition. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. @@ -891,7 +891,7 @@ func (client *SQLResourcesClient) BeginDeleteSQLRoleDefinition(ctx context.Conte // DeleteSQLRoleDefinition - Deletes an existing Azure Cosmos DB SQL Role Definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *SQLResourcesClient) deleteSQLRoleDefinition(ctx context.Context, roleDefinitionID string, resourceGroupName string, accountName string, options *SQLResourcesClientBeginDeleteSQLRoleDefinitionOptions) (*http.Response, error) { req, err := client.deleteSQLRoleDefinitionCreateRequest(ctx, roleDefinitionID, resourceGroupName, accountName, options) if err != nil { @@ -931,7 +931,7 @@ func (client *SQLResourcesClient) deleteSQLRoleDefinitionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -940,7 +940,7 @@ func (client *SQLResourcesClient) deleteSQLRoleDefinitionCreateRequest(ctx conte // BeginDeleteSQLStoredProcedure - Deletes an existing Azure Cosmos DB SQL storedProcedure. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -963,7 +963,7 @@ func (client *SQLResourcesClient) BeginDeleteSQLStoredProcedure(ctx context.Cont // DeleteSQLStoredProcedure - Deletes an existing Azure Cosmos DB SQL storedProcedure. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *SQLResourcesClient) deleteSQLStoredProcedure(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, storedProcedureName string, options *SQLResourcesClientBeginDeleteSQLStoredProcedureOptions) (*http.Response, error) { req, err := client.deleteSQLStoredProcedureCreateRequest(ctx, resourceGroupName, accountName, databaseName, containerName, storedProcedureName, options) if err != nil { @@ -1011,7 +1011,7 @@ func (client *SQLResourcesClient) deleteSQLStoredProcedureCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -1019,7 +1019,7 @@ func (client *SQLResourcesClient) deleteSQLStoredProcedureCreateRequest(ctx cont // BeginDeleteSQLTrigger - Deletes an existing Azure Cosmos DB SQL trigger. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1042,7 +1042,7 @@ func (client *SQLResourcesClient) BeginDeleteSQLTrigger(ctx context.Context, res // DeleteSQLTrigger - Deletes an existing Azure Cosmos DB SQL trigger. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *SQLResourcesClient) deleteSQLTrigger(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, triggerName string, options *SQLResourcesClientBeginDeleteSQLTriggerOptions) (*http.Response, error) { req, err := client.deleteSQLTriggerCreateRequest(ctx, resourceGroupName, accountName, databaseName, containerName, triggerName, options) if err != nil { @@ -1090,7 +1090,7 @@ func (client *SQLResourcesClient) deleteSQLTriggerCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -1098,7 +1098,7 @@ func (client *SQLResourcesClient) deleteSQLTriggerCreateRequest(ctx context.Cont // BeginDeleteSQLUserDefinedFunction - Deletes an existing Azure Cosmos DB SQL userDefinedFunction. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1121,7 +1121,7 @@ func (client *SQLResourcesClient) BeginDeleteSQLUserDefinedFunction(ctx context. // DeleteSQLUserDefinedFunction - Deletes an existing Azure Cosmos DB SQL userDefinedFunction. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *SQLResourcesClient) deleteSQLUserDefinedFunction(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, userDefinedFunctionName string, options *SQLResourcesClientBeginDeleteSQLUserDefinedFunctionOptions) (*http.Response, error) { req, err := client.deleteSQLUserDefinedFunctionCreateRequest(ctx, resourceGroupName, accountName, databaseName, containerName, userDefinedFunctionName, options) if err != nil { @@ -1169,7 +1169,7 @@ func (client *SQLResourcesClient) deleteSQLUserDefinedFunctionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -1177,7 +1177,7 @@ func (client *SQLResourcesClient) deleteSQLUserDefinedFunctionCreateRequest(ctx // GetClientEncryptionKey - Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1227,7 +1227,7 @@ func (client *SQLResourcesClient) getClientEncryptionKeyCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1245,7 +1245,7 @@ func (client *SQLResourcesClient) getClientEncryptionKeyHandleResponse(resp *htt // GetSQLContainer - Gets the SQL container under an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1295,7 +1295,7 @@ func (client *SQLResourcesClient) getSQLContainerCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1313,7 +1313,7 @@ func (client *SQLResourcesClient) getSQLContainerHandleResponse(resp *http.Respo // GetSQLContainerThroughput - Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1363,7 +1363,7 @@ func (client *SQLResourcesClient) getSQLContainerThroughputCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1381,7 +1381,7 @@ func (client *SQLResourcesClient) getSQLContainerThroughputHandleResponse(resp * // GetSQLDatabase - Gets the SQL database under an existing Azure Cosmos DB database account with the provided name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1426,7 +1426,7 @@ func (client *SQLResourcesClient) getSQLDatabaseCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1445,7 +1445,7 @@ func (client *SQLResourcesClient) getSQLDatabaseHandleResponse(resp *http.Respon // with the provided name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1490,7 +1490,7 @@ func (client *SQLResourcesClient) getSQLDatabaseThroughputCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1508,7 +1508,7 @@ func (client *SQLResourcesClient) getSQLDatabaseThroughputHandleResponse(resp *h // GetSQLRoleAssignment - Retrieves the properties of an existing Azure Cosmos DB SQL Role Assignment with the given Id. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - roleAssignmentID - The GUID for the Role Assignment. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. @@ -1553,7 +1553,7 @@ func (client *SQLResourcesClient) getSQLRoleAssignmentCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1571,7 +1571,7 @@ func (client *SQLResourcesClient) getSQLRoleAssignmentHandleResponse(resp *http. // GetSQLRoleDefinition - Retrieves the properties of an existing Azure Cosmos DB SQL Role Definition with the given Id. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - roleDefinitionID - The GUID for the Role Definition. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. @@ -1616,7 +1616,7 @@ func (client *SQLResourcesClient) getSQLRoleDefinitionCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1634,7 +1634,7 @@ func (client *SQLResourcesClient) getSQLRoleDefinitionHandleResponse(resp *http. // GetSQLStoredProcedure - Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1689,7 +1689,7 @@ func (client *SQLResourcesClient) getSQLStoredProcedureCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1707,7 +1707,7 @@ func (client *SQLResourcesClient) getSQLStoredProcedureHandleResponse(resp *http // GetSQLTrigger - Gets the SQL trigger under an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1762,7 +1762,7 @@ func (client *SQLResourcesClient) getSQLTriggerCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1780,7 +1780,7 @@ func (client *SQLResourcesClient) getSQLTriggerHandleResponse(resp *http.Respons // GetSQLUserDefinedFunction - Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1835,7 +1835,7 @@ func (client *SQLResourcesClient) getSQLUserDefinedFunctionCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1852,7 +1852,7 @@ func (client *SQLResourcesClient) getSQLUserDefinedFunctionHandleResponse(resp * // NewListClientEncryptionKeysPager - Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1904,7 +1904,7 @@ func (client *SQLResourcesClient) listClientEncryptionKeysCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1919,87 +1919,9 @@ func (client *SQLResourcesClient) listClientEncryptionKeysHandleResponse(resp *h return result, nil } -// BeginListSQLContainerPartitionMerge - Merges the partitions of a SQL Container -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - databaseName - Cosmos DB database name. -// - containerName - Cosmos DB container name. -// - mergeParameters - The parameters for the merge operation. -// - options - SQLResourcesClientBeginListSQLContainerPartitionMergeOptions contains the optional parameters for the SQLResourcesClient.BeginListSQLContainerPartitionMerge -// method. -func (client *SQLResourcesClient) BeginListSQLContainerPartitionMerge(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, mergeParameters MergeParameters, options *SQLResourcesClientBeginListSQLContainerPartitionMergeOptions) (*runtime.Poller[SQLResourcesClientListSQLContainerPartitionMergeResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.listSQLContainerPartitionMerge(ctx, resourceGroupName, accountName, databaseName, containerName, mergeParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLResourcesClientListSQLContainerPartitionMergeResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[SQLResourcesClientListSQLContainerPartitionMergeResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// ListSQLContainerPartitionMerge - Merges the partitions of a SQL Container -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -func (client *SQLResourcesClient) listSQLContainerPartitionMerge(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, mergeParameters MergeParameters, options *SQLResourcesClientBeginListSQLContainerPartitionMergeOptions) (*http.Response, error) { - req, err := client.listSQLContainerPartitionMergeCreateRequest(ctx, resourceGroupName, accountName, databaseName, containerName, mergeParameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// listSQLContainerPartitionMergeCreateRequest creates the ListSQLContainerPartitionMerge request. -func (client *SQLResourcesClient) listSQLContainerPartitionMergeCreateRequest(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, mergeParameters MergeParameters, options *SQLResourcesClientBeginListSQLContainerPartitionMergeOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/partitionMerge" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if databaseName == "" { - return nil, errors.New("parameter databaseName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) - if containerName == "" { - return nil, errors.New("parameter containerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, mergeParameters) -} - // NewListSQLContainersPager - Lists the SQL container under an existing Azure Cosmos DB database account. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2051,7 +1973,7 @@ func (client *SQLResourcesClient) listSQLContainersCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2068,7 +1990,7 @@ func (client *SQLResourcesClient) listSQLContainersHandleResponse(resp *http.Res // NewListSQLDatabasesPager - Lists the SQL databases under an existing Azure Cosmos DB database account. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - SQLResourcesClientListSQLDatabasesOptions contains the optional parameters for the SQLResourcesClient.NewListSQLDatabasesPager @@ -2115,7 +2037,7 @@ func (client *SQLResourcesClient) listSQLDatabasesCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2132,7 +2054,7 @@ func (client *SQLResourcesClient) listSQLDatabasesHandleResponse(resp *http.Resp // NewListSQLRoleAssignmentsPager - Retrieves the list of all Azure Cosmos DB SQL Role Assignments. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - SQLResourcesClientListSQLRoleAssignmentsOptions contains the optional parameters for the SQLResourcesClient.NewListSQLRoleAssignmentsPager @@ -2179,7 +2101,7 @@ func (client *SQLResourcesClient) listSQLRoleAssignmentsCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2196,7 +2118,7 @@ func (client *SQLResourcesClient) listSQLRoleAssignmentsHandleResponse(resp *htt // NewListSQLRoleDefinitionsPager - Retrieves the list of all Azure Cosmos DB SQL Role Definitions. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - SQLResourcesClientListSQLRoleDefinitionsOptions contains the optional parameters for the SQLResourcesClient.NewListSQLRoleDefinitionsPager @@ -2243,7 +2165,7 @@ func (client *SQLResourcesClient) listSQLRoleDefinitionsCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2260,7 +2182,7 @@ func (client *SQLResourcesClient) listSQLRoleDefinitionsHandleResponse(resp *htt // NewListSQLStoredProceduresPager - Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2317,7 +2239,7 @@ func (client *SQLResourcesClient) listSQLStoredProceduresCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2334,7 +2256,7 @@ func (client *SQLResourcesClient) listSQLStoredProceduresHandleResponse(resp *ht // NewListSQLTriggersPager - Lists the SQL trigger under an existing Azure Cosmos DB database account. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2391,7 +2313,7 @@ func (client *SQLResourcesClient) listSQLTriggersCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2408,7 +2330,7 @@ func (client *SQLResourcesClient) listSQLTriggersHandleResponse(resp *http.Respo // NewListSQLUserDefinedFunctionsPager - Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2465,7 +2387,7 @@ func (client *SQLResourcesClient) listSQLUserDefinedFunctionsCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2483,7 +2405,7 @@ func (client *SQLResourcesClient) listSQLUserDefinedFunctionsHandleResponse(resp // BeginMigrateSQLContainerToAutoscale - Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2505,7 +2427,7 @@ func (client *SQLResourcesClient) BeginMigrateSQLContainerToAutoscale(ctx contex // MigrateSQLContainerToAutoscale - Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *SQLResourcesClient) migrateSQLContainerToAutoscale(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, options *SQLResourcesClientBeginMigrateSQLContainerToAutoscaleOptions) (*http.Response, error) { req, err := client.migrateSQLContainerToAutoscaleCreateRequest(ctx, resourceGroupName, accountName, databaseName, containerName, options) if err != nil { @@ -2549,7 +2471,7 @@ func (client *SQLResourcesClient) migrateSQLContainerToAutoscaleCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2558,7 +2480,7 @@ func (client *SQLResourcesClient) migrateSQLContainerToAutoscaleCreateRequest(ct // BeginMigrateSQLContainerToManualThroughput - Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2580,7 +2502,7 @@ func (client *SQLResourcesClient) BeginMigrateSQLContainerToManualThroughput(ctx // MigrateSQLContainerToManualThroughput - Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *SQLResourcesClient) migrateSQLContainerToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, options *SQLResourcesClientBeginMigrateSQLContainerToManualThroughputOptions) (*http.Response, error) { req, err := client.migrateSQLContainerToManualThroughputCreateRequest(ctx, resourceGroupName, accountName, databaseName, containerName, options) if err != nil { @@ -2624,7 +2546,7 @@ func (client *SQLResourcesClient) migrateSQLContainerToManualThroughputCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2633,7 +2555,7 @@ func (client *SQLResourcesClient) migrateSQLContainerToManualThroughputCreateReq // BeginMigrateSQLDatabaseToAutoscale - Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2654,7 +2576,7 @@ func (client *SQLResourcesClient) BeginMigrateSQLDatabaseToAutoscale(ctx context // MigrateSQLDatabaseToAutoscale - Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *SQLResourcesClient) migrateSQLDatabaseToAutoscale(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *SQLResourcesClientBeginMigrateSQLDatabaseToAutoscaleOptions) (*http.Response, error) { req, err := client.migrateSQLDatabaseToAutoscaleCreateRequest(ctx, resourceGroupName, accountName, databaseName, options) if err != nil { @@ -2694,7 +2616,7 @@ func (client *SQLResourcesClient) migrateSQLDatabaseToAutoscaleCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2703,7 +2625,7 @@ func (client *SQLResourcesClient) migrateSQLDatabaseToAutoscaleCreateRequest(ctx // BeginMigrateSQLDatabaseToManualThroughput - Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2724,7 +2646,7 @@ func (client *SQLResourcesClient) BeginMigrateSQLDatabaseToManualThroughput(ctx // MigrateSQLDatabaseToManualThroughput - Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *SQLResourcesClient) migrateSQLDatabaseToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *SQLResourcesClientBeginMigrateSQLDatabaseToManualThroughputOptions) (*http.Response, error) { req, err := client.migrateSQLDatabaseToManualThroughputCreateRequest(ctx, resourceGroupName, accountName, databaseName, options) if err != nil { @@ -2764,7 +2686,7 @@ func (client *SQLResourcesClient) migrateSQLDatabaseToManualThroughputCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2773,7 +2695,7 @@ func (client *SQLResourcesClient) migrateSQLDatabaseToManualThroughputCreateRequ // BeginRetrieveContinuousBackupInformation - Retrieves continuous backup information for a container resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2798,7 +2720,7 @@ func (client *SQLResourcesClient) BeginRetrieveContinuousBackupInformation(ctx c // RetrieveContinuousBackupInformation - Retrieves continuous backup information for a container resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *SQLResourcesClient) retrieveContinuousBackupInformation(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, location ContinuousBackupRestoreLocation, options *SQLResourcesClientBeginRetrieveContinuousBackupInformationOptions) (*http.Response, error) { req, err := client.retrieveContinuousBackupInformationCreateRequest(ctx, resourceGroupName, accountName, databaseName, containerName, location, options) if err != nil { @@ -2842,318 +2764,16 @@ func (client *SQLResourcesClient) retrieveContinuousBackupInformationCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, location) } -// BeginSQLContainerRedistributeThroughput - Redistribute throughput for an Azure Cosmos DB SQL container -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - databaseName - Cosmos DB database name. -// - containerName - Cosmos DB container name. -// - redistributeThroughputParameters - The parameters to provide for redistributing throughput for the current SQL container. -// - options - SQLResourcesClientBeginSQLContainerRedistributeThroughputOptions contains the optional parameters for the SQLResourcesClient.BeginSQLContainerRedistributeThroughput -// method. -func (client *SQLResourcesClient) BeginSQLContainerRedistributeThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, redistributeThroughputParameters RedistributeThroughputParameters, options *SQLResourcesClientBeginSQLContainerRedistributeThroughputOptions) (*runtime.Poller[SQLResourcesClientSQLContainerRedistributeThroughputResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.sQLContainerRedistributeThroughput(ctx, resourceGroupName, accountName, databaseName, containerName, redistributeThroughputParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLResourcesClientSQLContainerRedistributeThroughputResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[SQLResourcesClientSQLContainerRedistributeThroughputResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// SQLContainerRedistributeThroughput - Redistribute throughput for an Azure Cosmos DB SQL container -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -func (client *SQLResourcesClient) sQLContainerRedistributeThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, redistributeThroughputParameters RedistributeThroughputParameters, options *SQLResourcesClientBeginSQLContainerRedistributeThroughputOptions) (*http.Response, error) { - req, err := client.sqlContainerRedistributeThroughputCreateRequest(ctx, resourceGroupName, accountName, databaseName, containerName, redistributeThroughputParameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// sqlContainerRedistributeThroughputCreateRequest creates the SQLContainerRedistributeThroughput request. -func (client *SQLResourcesClient) sqlContainerRedistributeThroughputCreateRequest(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, redistributeThroughputParameters RedistributeThroughputParameters, options *SQLResourcesClientBeginSQLContainerRedistributeThroughputOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/redistributeThroughput" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if databaseName == "" { - return nil, errors.New("parameter databaseName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) - if containerName == "" { - return nil, errors.New("parameter containerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, redistributeThroughputParameters) -} - -// BeginSQLContainerRetrieveThroughputDistribution - Retrieve throughput distribution for an Azure Cosmos DB SQL container -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - databaseName - Cosmos DB database name. -// - containerName - Cosmos DB container name. -// - retrieveThroughputParameters - The parameters to provide for retrieving throughput distribution for the current SQL container. -// - options - SQLResourcesClientBeginSQLContainerRetrieveThroughputDistributionOptions contains the optional parameters for -// the SQLResourcesClient.BeginSQLContainerRetrieveThroughputDistribution method. -func (client *SQLResourcesClient) BeginSQLContainerRetrieveThroughputDistribution(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, retrieveThroughputParameters RetrieveThroughputParameters, options *SQLResourcesClientBeginSQLContainerRetrieveThroughputDistributionOptions) (*runtime.Poller[SQLResourcesClientSQLContainerRetrieveThroughputDistributionResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.sQLContainerRetrieveThroughputDistribution(ctx, resourceGroupName, accountName, databaseName, containerName, retrieveThroughputParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLResourcesClientSQLContainerRetrieveThroughputDistributionResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[SQLResourcesClientSQLContainerRetrieveThroughputDistributionResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// SQLContainerRetrieveThroughputDistribution - Retrieve throughput distribution for an Azure Cosmos DB SQL container -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -func (client *SQLResourcesClient) sQLContainerRetrieveThroughputDistribution(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, retrieveThroughputParameters RetrieveThroughputParameters, options *SQLResourcesClientBeginSQLContainerRetrieveThroughputDistributionOptions) (*http.Response, error) { - req, err := client.sqlContainerRetrieveThroughputDistributionCreateRequest(ctx, resourceGroupName, accountName, databaseName, containerName, retrieveThroughputParameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// sqlContainerRetrieveThroughputDistributionCreateRequest creates the SQLContainerRetrieveThroughputDistribution request. -func (client *SQLResourcesClient) sqlContainerRetrieveThroughputDistributionCreateRequest(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, retrieveThroughputParameters RetrieveThroughputParameters, options *SQLResourcesClientBeginSQLContainerRetrieveThroughputDistributionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/retrieveThroughputDistribution" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if databaseName == "" { - return nil, errors.New("parameter databaseName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) - if containerName == "" { - return nil, errors.New("parameter containerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, retrieveThroughputParameters) -} - -// BeginSQLDatabaseRedistributeThroughput - Redistribute throughput for an Azure Cosmos DB SQL database -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - databaseName - Cosmos DB database name. -// - redistributeThroughputParameters - The parameters to provide for redistributing throughput for the current SQL database. -// - options - SQLResourcesClientBeginSQLDatabaseRedistributeThroughputOptions contains the optional parameters for the SQLResourcesClient.BeginSQLDatabaseRedistributeThroughput -// method. -func (client *SQLResourcesClient) BeginSQLDatabaseRedistributeThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, redistributeThroughputParameters RedistributeThroughputParameters, options *SQLResourcesClientBeginSQLDatabaseRedistributeThroughputOptions) (*runtime.Poller[SQLResourcesClientSQLDatabaseRedistributeThroughputResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.sQLDatabaseRedistributeThroughput(ctx, resourceGroupName, accountName, databaseName, redistributeThroughputParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLResourcesClientSQLDatabaseRedistributeThroughputResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[SQLResourcesClientSQLDatabaseRedistributeThroughputResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// SQLDatabaseRedistributeThroughput - Redistribute throughput for an Azure Cosmos DB SQL database -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -func (client *SQLResourcesClient) sQLDatabaseRedistributeThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, redistributeThroughputParameters RedistributeThroughputParameters, options *SQLResourcesClientBeginSQLDatabaseRedistributeThroughputOptions) (*http.Response, error) { - req, err := client.sqlDatabaseRedistributeThroughputCreateRequest(ctx, resourceGroupName, accountName, databaseName, redistributeThroughputParameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// sqlDatabaseRedistributeThroughputCreateRequest creates the SQLDatabaseRedistributeThroughput request. -func (client *SQLResourcesClient) sqlDatabaseRedistributeThroughputCreateRequest(ctx context.Context, resourceGroupName string, accountName string, databaseName string, redistributeThroughputParameters RedistributeThroughputParameters, options *SQLResourcesClientBeginSQLDatabaseRedistributeThroughputOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/redistributeThroughput" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if databaseName == "" { - return nil, errors.New("parameter databaseName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, redistributeThroughputParameters) -} - -// BeginSQLDatabaseRetrieveThroughputDistribution - Retrieve throughput distribution for an Azure Cosmos DB SQL database -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - accountName - Cosmos DB database account name. -// - databaseName - Cosmos DB database name. -// - retrieveThroughputParameters - The parameters to provide for retrieving throughput distribution for the current SQL database. -// - options - SQLResourcesClientBeginSQLDatabaseRetrieveThroughputDistributionOptions contains the optional parameters for -// the SQLResourcesClient.BeginSQLDatabaseRetrieveThroughputDistribution method. -func (client *SQLResourcesClient) BeginSQLDatabaseRetrieveThroughputDistribution(ctx context.Context, resourceGroupName string, accountName string, databaseName string, retrieveThroughputParameters RetrieveThroughputParameters, options *SQLResourcesClientBeginSQLDatabaseRetrieveThroughputDistributionOptions) (*runtime.Poller[SQLResourcesClientSQLDatabaseRetrieveThroughputDistributionResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.sQLDatabaseRetrieveThroughputDistribution(ctx, resourceGroupName, accountName, databaseName, retrieveThroughputParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLResourcesClientSQLDatabaseRetrieveThroughputDistributionResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[SQLResourcesClientSQLDatabaseRetrieveThroughputDistributionResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// SQLDatabaseRetrieveThroughputDistribution - Retrieve throughput distribution for an Azure Cosmos DB SQL database -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-11-15-preview -func (client *SQLResourcesClient) sQLDatabaseRetrieveThroughputDistribution(ctx context.Context, resourceGroupName string, accountName string, databaseName string, retrieveThroughputParameters RetrieveThroughputParameters, options *SQLResourcesClientBeginSQLDatabaseRetrieveThroughputDistributionOptions) (*http.Response, error) { - req, err := client.sqlDatabaseRetrieveThroughputDistributionCreateRequest(ctx, resourceGroupName, accountName, databaseName, retrieveThroughputParameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// sqlDatabaseRetrieveThroughputDistributionCreateRequest creates the SQLDatabaseRetrieveThroughputDistribution request. -func (client *SQLResourcesClient) sqlDatabaseRetrieveThroughputDistributionCreateRequest(ctx context.Context, resourceGroupName string, accountName string, databaseName string, retrieveThroughputParameters RetrieveThroughputParameters, options *SQLResourcesClientBeginSQLDatabaseRetrieveThroughputDistributionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/retrieveThroughputDistribution" - 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 accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if databaseName == "" { - return nil, errors.New("parameter databaseName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) - 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", "2022-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, retrieveThroughputParameters) -} - // BeginUpdateSQLContainerThroughput - Update RUs per second of an Azure Cosmos DB SQL container // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -3176,7 +2796,7 @@ func (client *SQLResourcesClient) BeginUpdateSQLContainerThroughput(ctx context. // UpdateSQLContainerThroughput - Update RUs per second of an Azure Cosmos DB SQL container // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *SQLResourcesClient) updateSQLContainerThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *SQLResourcesClientBeginUpdateSQLContainerThroughputOptions) (*http.Response, error) { req, err := client.updateSQLContainerThroughputCreateRequest(ctx, resourceGroupName, accountName, databaseName, containerName, updateThroughputParameters, options) if err != nil { @@ -3220,7 +2840,7 @@ func (client *SQLResourcesClient) updateSQLContainerThroughputCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, updateThroughputParameters) @@ -3229,7 +2849,7 @@ func (client *SQLResourcesClient) updateSQLContainerThroughputCreateRequest(ctx // BeginUpdateSQLDatabaseThroughput - Update RUs per second of an Azure Cosmos DB SQL database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -3251,7 +2871,7 @@ func (client *SQLResourcesClient) BeginUpdateSQLDatabaseThroughput(ctx context.C // UpdateSQLDatabaseThroughput - Update RUs per second of an Azure Cosmos DB SQL database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *SQLResourcesClient) updateSQLDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *SQLResourcesClientBeginUpdateSQLDatabaseThroughputOptions) (*http.Response, error) { req, err := client.updateSQLDatabaseThroughputCreateRequest(ctx, resourceGroupName, accountName, databaseName, updateThroughputParameters, options) if err != nil { @@ -3291,7 +2911,7 @@ func (client *SQLResourcesClient) updateSQLDatabaseThroughputCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, updateThroughputParameters) diff --git a/sdk/resourcemanager/cosmos/armcosmos/sqlresources_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/sqlresources_client_example_test.go index b2149cb770ad..c091e9ff78ad 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/sqlresources_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/sqlresources_client_example_test.go @@ -13,14 +13,12 @@ import ( "context" "log" - "time" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlDatabaseList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlDatabaseList.json func ExampleSQLResourcesClient_NewListSQLDatabasesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -66,7 +64,7 @@ func ExampleSQLResourcesClient_NewListSQLDatabasesPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlDatabaseGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlDatabaseGet.json func ExampleSQLResourcesClient_GetSQLDatabase() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -104,8 +102,8 @@ func ExampleSQLResourcesClient_GetSQLDatabase() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlDatabaseCreateUpdate.json -func ExampleSQLResourcesClient_BeginCreateUpdateSQLDatabase_cosmosDbSqlDatabaseCreateUpdate() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlDatabaseCreateUpdate.json +func ExampleSQLResourcesClient_BeginCreateUpdateSQLDatabase() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -153,61 +151,7 @@ func ExampleSQLResourcesClient_BeginCreateUpdateSQLDatabase_cosmosDbSqlDatabaseC // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlDatabaseRestore.json -func ExampleSQLResourcesClient_BeginCreateUpdateSQLDatabase_cosmosDbSqlDatabaseRestore() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSQLResourcesClient().BeginCreateUpdateSQLDatabase(ctx, "rg1", "ddb1", "databaseName", armcosmos.SQLDatabaseCreateUpdateParameters{ - Location: to.Ptr("West US"), - Tags: map[string]*string{}, - Properties: &armcosmos.SQLDatabaseCreateUpdateProperties{ - Options: &armcosmos.CreateUpdateOptions{}, - Resource: &armcosmos.SQLDatabaseResource{ - CreateMode: to.Ptr(armcosmos.CreateModeRestore), - ID: to.Ptr("databaseName"), - RestoreParameters: &armcosmos.ResourceRestoreParameters{ - RestoreSource: to.Ptr("/subscriptions/subid/providers/Microsoft.DocumentDB/locations/WestUS/restorableDatabaseAccounts/restorableDatabaseAccountId"), - RestoreTimestampInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-20T18:28:00Z"); return t }()), - }, - }, - }, - }, 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.SQLDatabaseGetResults = armcosmos.SQLDatabaseGetResults{ - // Name: to.Ptr("databaseName"), - // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName"), - // Location: to.Ptr("West US"), - // Tags: map[string]*string{ - // }, - // Properties: &armcosmos.SQLDatabaseGetProperties{ - // Resource: &armcosmos.SQLDatabaseGetPropertiesResource{ - // Etag: to.Ptr("\"00000a00-0000-0000-0000-56672f920000\""), - // Rid: to.Ptr("CqNBAA=="), - // Ts: to.Ptr[float32](1449602962), - // ID: to.Ptr("databaseName"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlDatabaseDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlDatabaseDelete.json func ExampleSQLResourcesClient_BeginDeleteSQLDatabase() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -228,7 +172,7 @@ func ExampleSQLResourcesClient_BeginDeleteSQLDatabase() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlDatabaseThroughputGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlDatabaseThroughputGet.json func ExampleSQLResourcesClient_GetSQLDatabaseThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -266,7 +210,7 @@ func ExampleSQLResourcesClient_GetSQLDatabaseThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlDatabaseThroughputUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlDatabaseThroughputUpdate.json func ExampleSQLResourcesClient_BeginUpdateSQLDatabaseThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -316,7 +260,7 @@ func ExampleSQLResourcesClient_BeginUpdateSQLDatabaseThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlDatabaseMigrateToAutoscale.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlDatabaseMigrateToAutoscale.json func ExampleSQLResourcesClient_BeginMigrateSQLDatabaseToAutoscale() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -355,7 +299,7 @@ func ExampleSQLResourcesClient_BeginMigrateSQLDatabaseToAutoscale() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlDatabaseMigrateToManualThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlDatabaseMigrateToManualThroughput.json func ExampleSQLResourcesClient_BeginMigrateSQLDatabaseToManualThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -391,177 +335,7 @@ func ExampleSQLResourcesClient_BeginMigrateSQLDatabaseToManualThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlClientEncryptionKeysList.json -func ExampleSQLResourcesClient_NewListClientEncryptionKeysPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSQLResourcesClient().NewListClientEncryptionKeysPager("rgName", "accountName", "databaseName", 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.ClientEncryptionKeysListResult = armcosmos.ClientEncryptionKeysListResult{ - // Value: []*armcosmos.ClientEncryptionKeyGetResults{ - // { - // Name: to.Ptr("cekName1"), - // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/clientEncryptionKey"), - // ID: to.Ptr("/subscriptions/subId/resourceGroups/rgName/providers/Microsoft.DocumentDB/databaseAccounts/accountName/sqlDatabases/databaseName/clientEncryptionKeys/cekName1"), - // Properties: &armcosmos.ClientEncryptionKeyGetProperties{ - // Resource: &armcosmos.ClientEncryptionKeyGetPropertiesResource{ - // EncryptionAlgorithm: to.Ptr("AEAD_AES_256_CBC_HMAC_SHA256"), - // ID: to.Ptr("cekName1"), - // KeyWrapMetadata: &armcosmos.KeyWrapMetadata{ - // Name: to.Ptr("customerManagedKey1"), - // Type: to.Ptr("AzureKeyVault"), - // Algorithm: to.Ptr("RSA-OAEP"), - // Value: to.Ptr("AzureKeyVault Key URL for customerManagedKey1"), - // }, - // WrappedDataEncryptionKey: []byte("VGhpcyBpcyBhY3R1YWxseSBhbiBhcnJheSBvZiBieXRlcy4gVGhpcyByZXF1ZXN0L3Jlc3BvbnNlIGlzIGJlaW5nIHByZXNlbnRlZCBhcyBhIHN0cmluZyBmb3IgcmVhZGFiaWxpdHkgaW4gdGhlIGV4YW1wbGU="), - // Etag: to.Ptr("00000000-0000-0000-7a1f-bc0828e801d7"), - // Rid: to.Ptr("nAMyAAAAAADPw1kKAgAAAA=="), - // Ts: to.Ptr[float32](1626425552), - // }, - // }, - // }, - // { - // Name: to.Ptr("cekName2"), - // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/clientEncryptionKey"), - // ID: to.Ptr("/subscriptions/subId/resourceGroups/rgName/providers/Microsoft.DocumentDB/databaseAccounts/accountName/sqlDatabases/databaseName/clientEncryptionKeys/cekName2"), - // Properties: &armcosmos.ClientEncryptionKeyGetProperties{ - // Resource: &armcosmos.ClientEncryptionKeyGetPropertiesResource{ - // EncryptionAlgorithm: to.Ptr("AEAD_AES_256_CBC_HMAC_SHA256"), - // ID: to.Ptr("cekName2"), - // KeyWrapMetadata: &armcosmos.KeyWrapMetadata{ - // Name: to.Ptr("customerManagedKey2"), - // Type: to.Ptr("AzureKeyVault"), - // Algorithm: to.Ptr("RSA-OAEP"), - // Value: to.Ptr("AzureKeyVault Key URL for customerManagedKey2"), - // }, - // WrappedDataEncryptionKey: []byte("VGhpcyBpcyBhY3R1YWxseSBhbiBhcnJheSBvZiBieXRlcy4gVGhpcyByZXF1ZXN0L3Jlc3BvbnNlIGlzIGJlaW5nIHByZXNlbnRlZCBhcyBhIHN0cmluZyBmb3IgcmVhZGFiaWxpdHkgaW4gdGhlIGV4YW1wbGU="), - // Etag: to.Ptr("00000000-0000-0000-7a21-7788a38c01d7"), - // Rid: to.Ptr("nAMyAAAAAAAWWfxHAgAAAA=="), - // Ts: to.Ptr[float32](1626425631), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlClientEncryptionKeyGet.json -func ExampleSQLResourcesClient_GetClientEncryptionKey() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLResourcesClient().GetClientEncryptionKey(ctx, "rgName", "accountName", "databaseName", "cekName", 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.ClientEncryptionKeyGetResults = armcosmos.ClientEncryptionKeyGetResults{ - // Name: to.Ptr("cekName"), - // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/clientEncryptionKey"), - // ID: to.Ptr("/subscriptions/subId/resourceGroups/rgName/providers/Microsoft.DocumentDB/databaseAccounts/accountName/sqlDatabases/databaseName/clientEncryptionKeys/cekName"), - // Properties: &armcosmos.ClientEncryptionKeyGetProperties{ - // Resource: &armcosmos.ClientEncryptionKeyGetPropertiesResource{ - // EncryptionAlgorithm: to.Ptr("AEAD_AES_256_CBC_HMAC_SHA256"), - // ID: to.Ptr("cekName"), - // KeyWrapMetadata: &armcosmos.KeyWrapMetadata{ - // Name: to.Ptr("customerManagedKey"), - // Type: to.Ptr("AzureKeyVault"), - // Algorithm: to.Ptr("RSA-OAEP"), - // Value: to.Ptr("AzureKeyVault Key URL"), - // }, - // WrappedDataEncryptionKey: []byte("VGhpcyBpcyBhY3R1YWxseSBhbiBhcnJheSBvZiBieXRlcy4gVGhpcyByZXF1ZXN0L3Jlc3BvbnNlIGlzIGJlaW5nIHByZXNlbnRlZCBhcyBhIHN0cmluZyBmb3IgcmVhZGFiaWxpdHkgaW4gdGhlIGV4YW1wbGU="), - // Etag: to.Ptr("00000000-0000-0000-7a1f-bc0828e801d7"), - // Rid: to.Ptr("tNc4AAAAAAAQkjzWAgAAAA=="), - // Ts: to.Ptr[float32](1626425552), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlClientEncryptionKeyCreateUpdate.json -func ExampleSQLResourcesClient_BeginCreateUpdateClientEncryptionKey() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSQLResourcesClient().BeginCreateUpdateClientEncryptionKey(ctx, "rgName", "accountName", "databaseName", "cekName", armcosmos.ClientEncryptionKeyCreateUpdateParameters{ - Properties: &armcosmos.ClientEncryptionKeyCreateUpdateProperties{ - Resource: &armcosmos.ClientEncryptionKeyResource{ - EncryptionAlgorithm: to.Ptr("AEAD_AES_256_CBC_HMAC_SHA256"), - ID: to.Ptr("cekName"), - KeyWrapMetadata: &armcosmos.KeyWrapMetadata{ - Name: to.Ptr("customerManagedKey"), - Type: to.Ptr("AzureKeyVault"), - Algorithm: to.Ptr("RSA-OAEP"), - Value: to.Ptr("AzureKeyVault Key URL"), - }, - WrappedDataEncryptionKey: []byte("VGhpcyBpcyBhY3R1YWxseSBhbiBhcnJheSBvZiBieXRlcy4gVGhpcyByZXF1ZXN0L3Jlc3BvbnNlIGlzIGJlaW5nIHByZXNlbnRlZCBhcyBhIHN0cmluZyBmb3IgcmVhZGFiaWxpdHkgaW4gdGhlIGV4YW1wbGU="), - }, - }, - }, 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.ClientEncryptionKeyGetResults = armcosmos.ClientEncryptionKeyGetResults{ - // Name: to.Ptr("cekName"), - // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/clientEncryptionKey"), - // ID: to.Ptr("/subscriptions/subId/resourceGroups/rgName/providers/Microsoft.DocumentDB/databaseAccounts/accountName/sqlDatabases/databaseName/clientEncryptionKeys/cekName"), - // Properties: &armcosmos.ClientEncryptionKeyGetProperties{ - // Resource: &armcosmos.ClientEncryptionKeyGetPropertiesResource{ - // EncryptionAlgorithm: to.Ptr("AEAD_AES_256_CBC_HMAC_SHA256"), - // ID: to.Ptr("cekName"), - // KeyWrapMetadata: &armcosmos.KeyWrapMetadata{ - // Name: to.Ptr("customerManagedKey"), - // Type: to.Ptr("AzureKeyVault"), - // Algorithm: to.Ptr("RSA-OAEP"), - // Value: to.Ptr("AzureKeyVault Key URL"), - // }, - // WrappedDataEncryptionKey: []byte("VGhpcyBpcyBhY3R1YWxseSBhbiBhcnJheSBvZiBieXRlcy4gVGhpcyByZXF1ZXN0L3Jlc3BvbnNlIGlzIGJlaW5nIHByZXNlbnRlZCBhcyBhIHN0cmluZyBmb3IgcmVhZGFiaWxpdHkgaW4gdGhlIGV4YW1wbGU="), - // Etag: to.Ptr("00000000-0000-0000-7a1f-bc0828e801d7"), - // Rid: to.Ptr("tNc4AAAAAAAQkjzWAgAAAA=="), - // Ts: to.Ptr[float32](1626425552), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlContainerList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlContainerList.json func ExampleSQLResourcesClient_NewListSQLContainersPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -785,7 +559,7 @@ func ExampleSQLResourcesClient_NewListSQLContainersPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlContainerGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlContainerGet.json func ExampleSQLResourcesClient_GetSQLContainer() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -872,8 +646,8 @@ func ExampleSQLResourcesClient_GetSQLContainer() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlContainerCreateUpdate.json -func ExampleSQLResourcesClient_BeginCreateUpdateSQLContainer_cosmosDbSqlContainerCreateUpdate() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlContainerCreateUpdate.json +func ExampleSQLResourcesClient_BeginCreateUpdateSQLContainer() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -897,6 +671,7 @@ func ExampleSQLResourcesClient_BeginCreateUpdateSQLContainer_cosmosDbSqlContaine EncryptionAlgorithm: to.Ptr("AEAD_AES_256_CBC_HMAC_SHA256"), EncryptionType: to.Ptr("Deterministic"), }}, + PolicyFormatVersion: to.Ptr[int32](2), }, ConflictResolutionPolicy: &armcosmos.ConflictResolutionPolicy{ ConflictResolutionPath: to.Ptr("/path"), @@ -1015,109 +790,7 @@ func ExampleSQLResourcesClient_BeginCreateUpdateSQLContainer_cosmosDbSqlContaine // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlContainerRestore.json -func ExampleSQLResourcesClient_BeginCreateUpdateSQLContainer_cosmosDbSqlContainerRestore() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSQLResourcesClient().BeginCreateUpdateSQLContainer(ctx, "rg1", "ddb1", "databaseName", "containerName", armcosmos.SQLContainerCreateUpdateParameters{ - Location: to.Ptr("West US"), - Tags: map[string]*string{}, - Properties: &armcosmos.SQLContainerCreateUpdateProperties{ - Options: &armcosmos.CreateUpdateOptions{}, - Resource: &armcosmos.SQLContainerResource{ - CreateMode: to.Ptr(armcosmos.CreateModeRestore), - ID: to.Ptr("containerName"), - RestoreParameters: &armcosmos.ResourceRestoreParameters{ - RestoreSource: to.Ptr("/subscriptions/subid/providers/Microsoft.DocumentDB/locations/WestUS/restorableDatabaseAccounts/restorableDatabaseAccountId"), - RestoreTimestampInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-20T18:28:00Z"); return t }()), - }, - }, - }, - }, 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.SQLContainerGetResults = armcosmos.SQLContainerGetResults{ - // Name: to.Ptr("containerName"), - // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/sqlContainers"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/containers/containerName"), - // Location: to.Ptr("West US"), - // Tags: map[string]*string{ - // }, - // Properties: &armcosmos.SQLContainerGetProperties{ - // Resource: &armcosmos.SQLContainerGetPropertiesResource{ - // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), - // Rid: to.Ptr("PD5DALigDgw="), - // Ts: to.Ptr[float32](1459200611), - // ClientEncryptionPolicy: &armcosmos.ClientEncryptionPolicy{ - // IncludedPaths: []*armcosmos.ClientEncryptionIncludedPath{ - // { - // Path: to.Ptr("/path"), - // ClientEncryptionKeyID: to.Ptr("keyId"), - // EncryptionAlgorithm: to.Ptr("AEAD_AES_256_CBC_HMAC_SHA256"), - // EncryptionType: to.Ptr("Deterministic"), - // }}, - // PolicyFormatVersion: to.Ptr[int32](1), - // }, - // ConflictResolutionPolicy: &armcosmos.ConflictResolutionPolicy{ - // ConflictResolutionPath: to.Ptr("/path"), - // Mode: to.Ptr(armcosmos.ConflictResolutionModeLastWriterWins), - // }, - // DefaultTTL: to.Ptr[int32](100), - // ID: to.Ptr("containerName"), - // IndexingPolicy: &armcosmos.IndexingPolicy{ - // Automatic: to.Ptr(true), - // ExcludedPaths: []*armcosmos.ExcludedPath{ - // }, - // IncludedPaths: []*armcosmos.IncludedPath{ - // { - // Path: to.Ptr("/*"), - // Indexes: []*armcosmos.Indexes{ - // { - // DataType: to.Ptr(armcosmos.DataTypeString), - // Kind: to.Ptr(armcosmos.IndexKindRange), - // Precision: to.Ptr[int32](-1), - // }, - // { - // DataType: to.Ptr(armcosmos.DataTypeNumber), - // Kind: to.Ptr(armcosmos.IndexKindRange), - // Precision: to.Ptr[int32](-1), - // }}, - // }}, - // IndexingMode: to.Ptr(armcosmos.IndexingModeConsistent), - // }, - // PartitionKey: &armcosmos.ContainerPartitionKey{ - // Kind: to.Ptr(armcosmos.PartitionKindHash), - // Paths: []*string{ - // to.Ptr("/AccountNumber")}, - // }, - // UniqueKeyPolicy: &armcosmos.UniqueKeyPolicy{ - // UniqueKeys: []*armcosmos.UniqueKey{ - // { - // Paths: []*string{ - // to.Ptr("/testPath")}, - // }}, - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlContainerDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlContainerDelete.json func ExampleSQLResourcesClient_BeginDeleteSQLContainer() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1138,60 +811,7 @@ func ExampleSQLResourcesClient_BeginDeleteSQLContainer() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlContainerPartitionMerge.json -func ExampleSQLResourcesClient_BeginListSQLContainerPartitionMerge() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSQLResourcesClient().BeginListSQLContainerPartitionMerge(ctx, "rgName", "ddb1", "databaseName", "containerName", armcosmos.MergeParameters{ - IsDryRun: to.Ptr(false), - }, 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.PhysicalPartitionStorageInfoCollection = armcosmos.PhysicalPartitionStorageInfoCollection{ - // PhysicalPartitionStorageInfoCollection: []*armcosmos.PhysicalPartitionStorageInfo{ - // { - // ID: to.Ptr("0"), - // StorageInKB: to.Ptr[float64](333), - // }, - // { - // ID: to.Ptr("1"), - // StorageInKB: to.Ptr[float64](305), - // }, - // { - // ID: to.Ptr("177"), - // StorageInKB: to.Ptr[float64](368), - // }, - // { - // ID: to.Ptr("178"), - // StorageInKB: to.Ptr[float64](96313), - // }, - // { - // ID: to.Ptr("5"), - // StorageInKB: to.Ptr[float64](194), - // }, - // { - // ID: to.Ptr("6"), - // StorageInKB: to.Ptr[float64](331), - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlContainerThroughputGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlContainerThroughputGet.json func ExampleSQLResourcesClient_GetSQLContainerThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1229,7 +849,7 @@ func ExampleSQLResourcesClient_GetSQLContainerThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlContainerThroughputUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlContainerThroughputUpdate.json func ExampleSQLResourcesClient_BeginUpdateSQLContainerThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1279,7 +899,7 @@ func ExampleSQLResourcesClient_BeginUpdateSQLContainerThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlContainerMigrateToAutoscale.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlContainerMigrateToAutoscale.json func ExampleSQLResourcesClient_BeginMigrateSQLContainerToAutoscale() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1318,7 +938,7 @@ func ExampleSQLResourcesClient_BeginMigrateSQLContainerToAutoscale() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlContainerMigrateToManualThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlContainerMigrateToManualThroughput.json func ExampleSQLResourcesClient_BeginMigrateSQLContainerToManualThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1354,59 +974,8 @@ func ExampleSQLResourcesClient_BeginMigrateSQLContainerToManualThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlDatabaseRetrieveThroughputDistribution.json -func ExampleSQLResourcesClient_BeginSQLDatabaseRetrieveThroughputDistribution() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSQLResourcesClient().BeginSQLDatabaseRetrieveThroughputDistribution(ctx, "rg1", "ddb1", "databaseName", armcosmos.RetrieveThroughputParameters{ - Properties: &armcosmos.RetrieveThroughputProperties{ - Resource: &armcosmos.RetrieveThroughputPropertiesResource{ - PhysicalPartitionIDs: []*armcosmos.PhysicalPartitionID{ - { - ID: to.Ptr("0"), - }, - { - ID: to.Ptr("1"), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PhysicalPartitionThroughputInfoResult = armcosmos.PhysicalPartitionThroughputInfoResult{ - // Properties: &armcosmos.PhysicalPartitionThroughputInfoResultProperties{ - // Resource: &armcosmos.PhysicalPartitionThroughputInfoResultPropertiesResource{ - // PhysicalPartitionThroughputInfo: []*armcosmos.PhysicalPartitionThroughputInfoResource{ - // { - // ID: to.Ptr("0"), - // Throughput: to.Ptr[float64](5000), - // }, - // { - // ID: to.Ptr("1"), - // Throughput: to.Ptr[float64](5000), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlDatabaseRedistributeThroughput.json -func ExampleSQLResourcesClient_BeginSQLDatabaseRedistributeThroughput() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlClientEncryptionKeysList.json +func ExampleSQLResourcesClient_NewListClientEncryptionKeysPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -1416,67 +985,67 @@ func ExampleSQLResourcesClient_BeginSQLDatabaseRedistributeThroughput() { if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := clientFactory.NewSQLResourcesClient().BeginSQLDatabaseRedistributeThroughput(ctx, "rg1", "ddb1", "databaseName", armcosmos.RedistributeThroughputParameters{ - Properties: &armcosmos.RedistributeThroughputProperties{ - Resource: &armcosmos.RedistributeThroughputPropertiesResource{ - SourcePhysicalPartitionThroughputInfo: []*armcosmos.PhysicalPartitionThroughputInfoResource{ - { - ID: to.Ptr("2"), - Throughput: to.Ptr[float64](5000), - }, - { - ID: to.Ptr("3"), - }}, - TargetPhysicalPartitionThroughputInfo: []*armcosmos.PhysicalPartitionThroughputInfoResource{ - { - ID: to.Ptr("0"), - Throughput: to.Ptr[float64](5000), - }, - { - ID: to.Ptr("1"), - Throughput: to.Ptr[float64](5000), - }}, - ThroughputPolicy: to.Ptr(armcosmos.ThroughputPolicyTypeCustom), - }, - }, - }, 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) + pager := clientFactory.NewSQLResourcesClient().NewListClientEncryptionKeysPager("rgName", "accountName", "databaseName", 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.ClientEncryptionKeysListResult = armcosmos.ClientEncryptionKeysListResult{ + // Value: []*armcosmos.ClientEncryptionKeyGetResults{ + // { + // Name: to.Ptr("cekName1"), + // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/clientEncryptionKey"), + // ID: to.Ptr("/subscriptions/subId/resourceGroups/rgName/providers/Microsoft.DocumentDB/databaseAccounts/accountName/sqlDatabases/databaseName/clientEncryptionKeys/cekName1"), + // Properties: &armcosmos.ClientEncryptionKeyGetProperties{ + // Resource: &armcosmos.ClientEncryptionKeyGetPropertiesResource{ + // EncryptionAlgorithm: to.Ptr("AEAD_AES_256_CBC_HMAC_SHA256"), + // ID: to.Ptr("cekName1"), + // KeyWrapMetadata: &armcosmos.KeyWrapMetadata{ + // Name: to.Ptr("customerManagedKey1"), + // Type: to.Ptr("AzureKeyVault"), + // Algorithm: to.Ptr("RSA-OAEP"), + // Value: to.Ptr("AzureKeyVault Key URL for customerManagedKey1"), + // }, + // WrappedDataEncryptionKey: []byte("U3dhZ2dlciByb2Nrcw=="), + // Etag: to.Ptr("00000000-0000-0000-7a1f-bc0828e801d7"), + // Rid: to.Ptr("nAMyAAAAAADPw1kKAgAAAA=="), + // Ts: to.Ptr[float32](1626425552), + // }, + // }, + // }, + // { + // Name: to.Ptr("cekName2"), + // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/clientEncryptionKey"), + // ID: to.Ptr("/subscriptions/subId/resourceGroups/rgName/providers/Microsoft.DocumentDB/databaseAccounts/accountName/sqlDatabases/databaseName/clientEncryptionKeys/cekName2"), + // Properties: &armcosmos.ClientEncryptionKeyGetProperties{ + // Resource: &armcosmos.ClientEncryptionKeyGetPropertiesResource{ + // EncryptionAlgorithm: to.Ptr("AEAD_AES_256_CBC_HMAC_SHA256"), + // ID: to.Ptr("cekName2"), + // KeyWrapMetadata: &armcosmos.KeyWrapMetadata{ + // Name: to.Ptr("customerManagedKey2"), + // Type: to.Ptr("AzureKeyVault"), + // Algorithm: to.Ptr("RSA-OAEP"), + // Value: to.Ptr("AzureKeyVault Key URL for customerManagedKey2"), + // }, + // WrappedDataEncryptionKey: []byte("U3dhZ2dlciByb2Nrcw=="), + // Etag: to.Ptr("00000000-0000-0000-7a21-7788a38c01d7"), + // Rid: to.Ptr("nAMyAAAAAAAWWfxHAgAAAA=="), + // Ts: to.Ptr[float32](1626425631), + // }, + // }, + // }}, + // } } - // 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.PhysicalPartitionThroughputInfoResult = armcosmos.PhysicalPartitionThroughputInfoResult{ - // Properties: &armcosmos.PhysicalPartitionThroughputInfoResultProperties{ - // Resource: &armcosmos.PhysicalPartitionThroughputInfoResultPropertiesResource{ - // PhysicalPartitionThroughputInfo: []*armcosmos.PhysicalPartitionThroughputInfoResource{ - // { - // ID: to.Ptr("0"), - // Throughput: to.Ptr[float64](5000), - // }, - // { - // ID: to.Ptr("1"), - // Throughput: to.Ptr[float64](5000), - // }, - // { - // ID: to.Ptr("2"), - // Throughput: to.Ptr[float64](5000), - // }, - // { - // ID: to.Ptr("3"), - // Throughput: to.Ptr[float64](3000), - // }}, - // }, - // }, - // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlContainerRetrieveThroughputDistribution.json -func ExampleSQLResourcesClient_BeginSQLContainerRetrieveThroughputDistribution() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlClientEncryptionKeyGet.json +func ExampleSQLResourcesClient_GetClientEncryptionKey() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -1486,48 +1055,38 @@ func ExampleSQLResourcesClient_BeginSQLContainerRetrieveThroughputDistribution() if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := clientFactory.NewSQLResourcesClient().BeginSQLContainerRetrieveThroughputDistribution(ctx, "rg1", "ddb1", "databaseName", "containerName", armcosmos.RetrieveThroughputParameters{ - Properties: &armcosmos.RetrieveThroughputProperties{ - Resource: &armcosmos.RetrieveThroughputPropertiesResource{ - PhysicalPartitionIDs: []*armcosmos.PhysicalPartitionID{ - { - ID: to.Ptr("0"), - }, - { - ID: to.Ptr("1"), - }}, - }, - }, - }, nil) + res, err := clientFactory.NewSQLResourcesClient().GetClientEncryptionKey(ctx, "rgName", "accountName", "databaseName", "cekName", 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.PhysicalPartitionThroughputInfoResult = armcosmos.PhysicalPartitionThroughputInfoResult{ - // Properties: &armcosmos.PhysicalPartitionThroughputInfoResultProperties{ - // Resource: &armcosmos.PhysicalPartitionThroughputInfoResultPropertiesResource{ - // PhysicalPartitionThroughputInfo: []*armcosmos.PhysicalPartitionThroughputInfoResource{ - // { - // ID: to.Ptr("0"), - // Throughput: to.Ptr[float64](5000), - // }, - // { - // ID: to.Ptr("1"), - // Throughput: to.Ptr[float64](5000), - // }}, + // res.ClientEncryptionKeyGetResults = armcosmos.ClientEncryptionKeyGetResults{ + // Name: to.Ptr("cekName"), + // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/clientEncryptionKey"), + // ID: to.Ptr("/subscriptions/subId/resourceGroups/rgName/providers/Microsoft.DocumentDB/databaseAccounts/accountName/sqlDatabases/databaseName/clientEncryptionKeys/cekName"), + // Properties: &armcosmos.ClientEncryptionKeyGetProperties{ + // Resource: &armcosmos.ClientEncryptionKeyGetPropertiesResource{ + // EncryptionAlgorithm: to.Ptr("AEAD_AES_256_CBC_HMAC_SHA256"), + // ID: to.Ptr("cekName"), + // KeyWrapMetadata: &armcosmos.KeyWrapMetadata{ + // Name: to.Ptr("customerManagedKey"), + // Type: to.Ptr("AzureKeyVault"), + // Algorithm: to.Ptr("RSA-OAEP"), + // Value: to.Ptr("AzureKeyVault Key URL"), + // }, + // WrappedDataEncryptionKey: []byte("U3dhZ2dlciByb2Nrcw=="), + // Etag: to.Ptr("00000000-0000-0000-7a1f-bc0828e801d7"), + // Rid: to.Ptr("tNc4AAAAAAAQkjzWAgAAAA=="), + // Ts: to.Ptr[float32](1626425552), // }, // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlContainerRedistributeThroughput.json -func ExampleSQLResourcesClient_BeginSQLContainerRedistributeThroughput() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlClientEncryptionKeyCreateUpdate.json +func ExampleSQLResourcesClient_BeginCreateUpdateClientEncryptionKey() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -1537,27 +1096,18 @@ func ExampleSQLResourcesClient_BeginSQLContainerRedistributeThroughput() { if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := clientFactory.NewSQLResourcesClient().BeginSQLContainerRedistributeThroughput(ctx, "rg1", "ddb1", "databaseName", "containerName", armcosmos.RedistributeThroughputParameters{ - Properties: &armcosmos.RedistributeThroughputProperties{ - Resource: &armcosmos.RedistributeThroughputPropertiesResource{ - SourcePhysicalPartitionThroughputInfo: []*armcosmos.PhysicalPartitionThroughputInfoResource{ - { - ID: to.Ptr("2"), - Throughput: to.Ptr[float64](5000), - }, - { - ID: to.Ptr("3"), - }}, - TargetPhysicalPartitionThroughputInfo: []*armcosmos.PhysicalPartitionThroughputInfoResource{ - { - ID: to.Ptr("0"), - Throughput: to.Ptr[float64](5000), - }, - { - ID: to.Ptr("1"), - Throughput: to.Ptr[float64](5000), - }}, - ThroughputPolicy: to.Ptr(armcosmos.ThroughputPolicyTypeCustom), + poller, err := clientFactory.NewSQLResourcesClient().BeginCreateUpdateClientEncryptionKey(ctx, "rgName", "accountName", "databaseName", "cekName", armcosmos.ClientEncryptionKeyCreateUpdateParameters{ + Properties: &armcosmos.ClientEncryptionKeyCreateUpdateProperties{ + Resource: &armcosmos.ClientEncryptionKeyResource{ + EncryptionAlgorithm: to.Ptr("AEAD_AES_256_CBC_HMAC_SHA256"), + ID: to.Ptr("cekName"), + KeyWrapMetadata: &armcosmos.KeyWrapMetadata{ + Name: to.Ptr("customerManagedKey"), + Type: to.Ptr("AzureKeyVault"), + Algorithm: to.Ptr("RSA-OAEP"), + Value: to.Ptr("AzureKeyVault Key URL"), + }, + WrappedDataEncryptionKey: []byte("U3dhZ2dlciByb2Nrcw=="), }, }, }, nil) @@ -1571,32 +1121,30 @@ func ExampleSQLResourcesClient_BeginSQLContainerRedistributeThroughput() { // 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.PhysicalPartitionThroughputInfoResult = armcosmos.PhysicalPartitionThroughputInfoResult{ - // Properties: &armcosmos.PhysicalPartitionThroughputInfoResultProperties{ - // Resource: &armcosmos.PhysicalPartitionThroughputInfoResultPropertiesResource{ - // PhysicalPartitionThroughputInfo: []*armcosmos.PhysicalPartitionThroughputInfoResource{ - // { - // ID: to.Ptr("0"), - // Throughput: to.Ptr[float64](5000), - // }, - // { - // ID: to.Ptr("1"), - // Throughput: to.Ptr[float64](5000), - // }, - // { - // ID: to.Ptr("2"), - // Throughput: to.Ptr[float64](5000), - // }, - // { - // ID: to.Ptr("3"), - // Throughput: to.Ptr[float64](3000), - // }}, + // res.ClientEncryptionKeyGetResults = armcosmos.ClientEncryptionKeyGetResults{ + // Name: to.Ptr("cekName"), + // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/clientEncryptionKey"), + // ID: to.Ptr("/subscriptions/subId/resourceGroups/rgName/providers/Microsoft.DocumentDB/databaseAccounts/accountName/sqlDatabases/databaseName/clientEncryptionKeys/cekName"), + // Properties: &armcosmos.ClientEncryptionKeyGetProperties{ + // Resource: &armcosmos.ClientEncryptionKeyGetPropertiesResource{ + // EncryptionAlgorithm: to.Ptr("AEAD_AES_256_CBC_HMAC_SHA256"), + // ID: to.Ptr("cekName"), + // KeyWrapMetadata: &armcosmos.KeyWrapMetadata{ + // Name: to.Ptr("customerManagedKey"), + // Type: to.Ptr("AzureKeyVault"), + // Algorithm: to.Ptr("RSA-OAEP"), + // Value: to.Ptr("AzureKeyVault Key URL"), + // }, + // WrappedDataEncryptionKey: []byte("U3dhZ2dlciByb2Nrcw=="), + // Etag: to.Ptr("00000000-0000-0000-7a1f-bc0828e801d7"), + // Rid: to.Ptr("tNc4AAAAAAAQkjzWAgAAAA=="), + // Ts: to.Ptr[float32](1626425552), // }, // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlStoredProcedureList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlStoredProcedureList.json func ExampleSQLResourcesClient_NewListSQLStoredProceduresPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1638,7 +1186,7 @@ func ExampleSQLResourcesClient_NewListSQLStoredProceduresPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlStoredProcedureGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlStoredProcedureGet.json func ExampleSQLResourcesClient_GetSQLStoredProcedure() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1672,7 +1220,7 @@ func ExampleSQLResourcesClient_GetSQLStoredProcedure() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlStoredProcedureCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlStoredProcedureCreateUpdate.json func ExampleSQLResourcesClient_BeginCreateUpdateSQLStoredProcedure() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1718,7 +1266,7 @@ func ExampleSQLResourcesClient_BeginCreateUpdateSQLStoredProcedure() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlStoredProcedureDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlStoredProcedureDelete.json func ExampleSQLResourcesClient_BeginDeleteSQLStoredProcedure() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1739,7 +1287,7 @@ func ExampleSQLResourcesClient_BeginDeleteSQLStoredProcedure() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlUserDefinedFunctionList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlUserDefinedFunctionList.json func ExampleSQLResourcesClient_NewListSQLUserDefinedFunctionsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1781,7 +1329,7 @@ func ExampleSQLResourcesClient_NewListSQLUserDefinedFunctionsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlUserDefinedFunctionGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlUserDefinedFunctionGet.json func ExampleSQLResourcesClient_GetSQLUserDefinedFunction() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1815,7 +1363,7 @@ func ExampleSQLResourcesClient_GetSQLUserDefinedFunction() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlUserDefinedFunctionCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlUserDefinedFunctionCreateUpdate.json func ExampleSQLResourcesClient_BeginCreateUpdateSQLUserDefinedFunction() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1861,7 +1409,7 @@ func ExampleSQLResourcesClient_BeginCreateUpdateSQLUserDefinedFunction() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlUserDefinedFunctionDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlUserDefinedFunctionDelete.json func ExampleSQLResourcesClient_BeginDeleteSQLUserDefinedFunction() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1882,7 +1430,7 @@ func ExampleSQLResourcesClient_BeginDeleteSQLUserDefinedFunction() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlTriggerList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlTriggerList.json func ExampleSQLResourcesClient_NewListSQLTriggersPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1926,7 +1474,7 @@ func ExampleSQLResourcesClient_NewListSQLTriggersPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlTriggerGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlTriggerGet.json func ExampleSQLResourcesClient_GetSQLTrigger() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1962,7 +1510,7 @@ func ExampleSQLResourcesClient_GetSQLTrigger() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlTriggerCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlTriggerCreateUpdate.json func ExampleSQLResourcesClient_BeginCreateUpdateSQLTrigger() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2012,7 +1560,7 @@ func ExampleSQLResourcesClient_BeginCreateUpdateSQLTrigger() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlTriggerDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlTriggerDelete.json func ExampleSQLResourcesClient_BeginDeleteSQLTrigger() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2033,7 +1581,7 @@ func ExampleSQLResourcesClient_BeginDeleteSQLTrigger() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlRoleDefinitionGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlRoleDefinitionGet.json func ExampleSQLResourcesClient_GetSQLRoleDefinition() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2073,7 +1621,7 @@ func ExampleSQLResourcesClient_GetSQLRoleDefinition() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlRoleDefinitionCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlRoleDefinitionCreateUpdate.json func ExampleSQLResourcesClient_BeginCreateUpdateSQLRoleDefinition() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2130,7 +1678,7 @@ func ExampleSQLResourcesClient_BeginCreateUpdateSQLRoleDefinition() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlRoleDefinitionDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlRoleDefinitionDelete.json func ExampleSQLResourcesClient_BeginDeleteSQLRoleDefinition() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2151,7 +1699,7 @@ func ExampleSQLResourcesClient_BeginDeleteSQLRoleDefinition() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlRoleDefinitionList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlRoleDefinitionList.json func ExampleSQLResourcesClient_NewListSQLRoleDefinitionsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2199,7 +1747,7 @@ func ExampleSQLResourcesClient_NewListSQLRoleDefinitionsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlRoleAssignmentGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlRoleAssignmentGet.json func ExampleSQLResourcesClient_GetSQLRoleAssignment() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2229,7 +1777,7 @@ func ExampleSQLResourcesClient_GetSQLRoleAssignment() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlRoleAssignmentCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlRoleAssignmentCreateUpdate.json func ExampleSQLResourcesClient_BeginCreateUpdateSQLRoleAssignment() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2269,7 +1817,7 @@ func ExampleSQLResourcesClient_BeginCreateUpdateSQLRoleAssignment() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlRoleAssignmentDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlRoleAssignmentDelete.json func ExampleSQLResourcesClient_BeginDeleteSQLRoleAssignment() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2290,7 +1838,7 @@ func ExampleSQLResourcesClient_BeginDeleteSQLRoleAssignment() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlRoleAssignmentList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlRoleAssignmentList.json func ExampleSQLResourcesClient_NewListSQLRoleAssignmentsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2328,7 +1876,7 @@ func ExampleSQLResourcesClient_NewListSQLRoleAssignmentsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBSqlContainerBackupInformation.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBSqlContainerBackupInformation.json func ExampleSQLResourcesClient_BeginRetrieveContinuousBackupInformation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/tableresources_client.go b/sdk/resourcemanager/cosmos/armcosmos/tableresources_client.go index 9889cf599065..c6951515009b 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/tableresources_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/tableresources_client.go @@ -47,7 +47,7 @@ func NewTableResourcesClient(subscriptionID string, credential azcore.TokenCrede // BeginCreateUpdateTable - Create or update an Azure Cosmos DB Table // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - tableName - Cosmos DB table name. @@ -69,7 +69,7 @@ func (client *TableResourcesClient) BeginCreateUpdateTable(ctx context.Context, // CreateUpdateTable - Create or update an Azure Cosmos DB Table // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *TableResourcesClient) createUpdateTable(ctx context.Context, resourceGroupName string, accountName string, tableName string, createUpdateTableParameters TableCreateUpdateParameters, options *TableResourcesClientBeginCreateUpdateTableOptions) (*http.Response, error) { req, err := client.createUpdateTableCreateRequest(ctx, resourceGroupName, accountName, tableName, createUpdateTableParameters, options) if err != nil { @@ -109,7 +109,7 @@ func (client *TableResourcesClient) createUpdateTableCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, createUpdateTableParameters) @@ -118,7 +118,7 @@ func (client *TableResourcesClient) createUpdateTableCreateRequest(ctx context.C // BeginDeleteTable - Deletes an existing Azure Cosmos DB Table. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - tableName - Cosmos DB table name. @@ -139,7 +139,7 @@ func (client *TableResourcesClient) BeginDeleteTable(ctx context.Context, resour // DeleteTable - Deletes an existing Azure Cosmos DB Table. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *TableResourcesClient) deleteTable(ctx context.Context, resourceGroupName string, accountName string, tableName string, options *TableResourcesClientBeginDeleteTableOptions) (*http.Response, error) { req, err := client.deleteTableCreateRequest(ctx, resourceGroupName, accountName, tableName, options) if err != nil { @@ -179,7 +179,7 @@ func (client *TableResourcesClient) deleteTableCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -187,7 +187,7 @@ func (client *TableResourcesClient) deleteTableCreateRequest(ctx context.Context // GetTable - Gets the Tables under an existing Azure Cosmos DB database account with the provided name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - tableName - Cosmos DB table name. @@ -231,7 +231,7 @@ func (client *TableResourcesClient) getTableCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -250,7 +250,7 @@ func (client *TableResourcesClient) getTableHandleResponse(resp *http.Response) // name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - tableName - Cosmos DB table name. @@ -295,7 +295,7 @@ func (client *TableResourcesClient) getTableThroughputCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -312,7 +312,7 @@ func (client *TableResourcesClient) getTableThroughputHandleResponse(resp *http. // NewListTablesPager - Lists the Tables under an existing Azure Cosmos DB database account. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - TableResourcesClientListTablesOptions contains the optional parameters for the TableResourcesClient.NewListTablesPager @@ -359,7 +359,7 @@ func (client *TableResourcesClient) listTablesCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -377,7 +377,7 @@ func (client *TableResourcesClient) listTablesHandleResponse(resp *http.Response // BeginMigrateTableToAutoscale - Migrate an Azure Cosmos DB Table from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - tableName - Cosmos DB table name. @@ -398,7 +398,7 @@ func (client *TableResourcesClient) BeginMigrateTableToAutoscale(ctx context.Con // MigrateTableToAutoscale - Migrate an Azure Cosmos DB Table from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *TableResourcesClient) migrateTableToAutoscale(ctx context.Context, resourceGroupName string, accountName string, tableName string, options *TableResourcesClientBeginMigrateTableToAutoscaleOptions) (*http.Response, error) { req, err := client.migrateTableToAutoscaleCreateRequest(ctx, resourceGroupName, accountName, tableName, options) if err != nil { @@ -438,7 +438,7 @@ func (client *TableResourcesClient) migrateTableToAutoscaleCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -447,7 +447,7 @@ func (client *TableResourcesClient) migrateTableToAutoscaleCreateRequest(ctx con // BeginMigrateTableToManualThroughput - Migrate an Azure Cosmos DB Table from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - tableName - Cosmos DB table name. @@ -468,7 +468,7 @@ func (client *TableResourcesClient) BeginMigrateTableToManualThroughput(ctx cont // MigrateTableToManualThroughput - Migrate an Azure Cosmos DB Table from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *TableResourcesClient) migrateTableToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, tableName string, options *TableResourcesClientBeginMigrateTableToManualThroughputOptions) (*http.Response, error) { req, err := client.migrateTableToManualThroughputCreateRequest(ctx, resourceGroupName, accountName, tableName, options) if err != nil { @@ -508,7 +508,7 @@ func (client *TableResourcesClient) migrateTableToManualThroughputCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -517,7 +517,7 @@ func (client *TableResourcesClient) migrateTableToManualThroughputCreateRequest( // BeginRetrieveContinuousBackupInformation - Retrieves continuous backup information for a table. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - tableName - Cosmos DB table name. @@ -541,7 +541,7 @@ func (client *TableResourcesClient) BeginRetrieveContinuousBackupInformation(ctx // RetrieveContinuousBackupInformation - Retrieves continuous backup information for a table. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *TableResourcesClient) retrieveContinuousBackupInformation(ctx context.Context, resourceGroupName string, accountName string, tableName string, location ContinuousBackupRestoreLocation, options *TableResourcesClientBeginRetrieveContinuousBackupInformationOptions) (*http.Response, error) { req, err := client.retrieveContinuousBackupInformationCreateRequest(ctx, resourceGroupName, accountName, tableName, location, options) if err != nil { @@ -581,7 +581,7 @@ func (client *TableResourcesClient) retrieveContinuousBackupInformationCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, location) @@ -590,7 +590,7 @@ func (client *TableResourcesClient) retrieveContinuousBackupInformationCreateReq // BeginUpdateTableThroughput - Update RUs per second of an Azure Cosmos DB Table // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - tableName - Cosmos DB table name. @@ -612,7 +612,7 @@ func (client *TableResourcesClient) BeginUpdateTableThroughput(ctx context.Conte // UpdateTableThroughput - Update RUs per second of an Azure Cosmos DB Table // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2022-11-15 func (client *TableResourcesClient) updateTableThroughput(ctx context.Context, resourceGroupName string, accountName string, tableName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *TableResourcesClientBeginUpdateTableThroughputOptions) (*http.Response, error) { req, err := client.updateTableThroughputCreateRequest(ctx, resourceGroupName, accountName, tableName, updateThroughputParameters, options) if err != nil { @@ -652,7 +652,7 @@ func (client *TableResourcesClient) updateTableThroughputCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2022-11-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, updateThroughputParameters) diff --git a/sdk/resourcemanager/cosmos/armcosmos/tableresources_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/tableresources_client_example_test.go index 82f71884c9be..ede4d300e398 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/tableresources_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/tableresources_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBTableList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBTableList.json func ExampleTableResourcesClient_NewListTablesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -59,7 +59,7 @@ func ExampleTableResourcesClient_NewListTablesPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBTableGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBTableGet.json func ExampleTableResourcesClient_GetTable() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -95,7 +95,7 @@ func ExampleTableResourcesClient_GetTable() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBTableCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBTableCreateUpdate.json func ExampleTableResourcesClient_BeginCreateUpdateTable() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -139,7 +139,7 @@ func ExampleTableResourcesClient_BeginCreateUpdateTable() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBTableDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBTableDelete.json func ExampleTableResourcesClient_BeginDeleteTable() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -160,7 +160,7 @@ func ExampleTableResourcesClient_BeginDeleteTable() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBTableThroughputGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBTableThroughputGet.json func ExampleTableResourcesClient_GetTableThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -198,7 +198,7 @@ func ExampleTableResourcesClient_GetTableThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBTableThroughputUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBTableThroughputUpdate.json func ExampleTableResourcesClient_BeginUpdateTableThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -248,7 +248,7 @@ func ExampleTableResourcesClient_BeginUpdateTableThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBTableMigrateToAutoscale.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBTableMigrateToAutoscale.json func ExampleTableResourcesClient_BeginMigrateTableToAutoscale() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -287,7 +287,7 @@ func ExampleTableResourcesClient_BeginMigrateTableToAutoscale() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBTableMigrateToManualThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBTableMigrateToManualThroughput.json func ExampleTableResourcesClient_BeginMigrateTableToManualThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -323,7 +323,7 @@ func ExampleTableResourcesClient_BeginMigrateTableToManualThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-11-15-preview/examples/CosmosDBTableBackupInformation.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-11-15/examples/CosmosDBTableBackupInformation.json func ExampleTableResourcesClient_BeginRetrieveContinuousBackupInformation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/eventhub/armeventhub/CHANGELOG.md b/sdk/resourcemanager/eventhub/armeventhub/CHANGELOG.md index c5de5effa7d2..7acbdf4b229a 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/CHANGELOG.md +++ b/sdk/resourcemanager/eventhub/armeventhub/CHANGELOG.md @@ -1,94 +1,11 @@ # Release History -## 1.1.0-beta.2 (2023-03-27) +## 1.1.0 (2023-04-06) ### Features Added - New struct `ClientFactory` which is a client factory used to create any client in this module -## 1.1.0-beta.1 (2022-05-19) -### Features Added - -- New const `ResourceAssociationAccessModeLearningMode` -- New const `MetricIDIncomingMessages` -- New const `NetworkSecurityPerimeterConfigurationProvisioningStateAccepted` -- New const `PublicNetworkAccessSecuredByPerimeter` -- New const `ResourceAssociationAccessModeNoAssociationMode` -- New const `ApplicationGroupPolicyTypeThrottlingPolicy` -- New const `NetworkSecurityPerimeterConfigurationProvisioningStateCanceled` -- New const `NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded` -- New const `PublicNetworkAccessFlagSecuredByPerimeter` -- New const `NetworkSecurityPerimeterConfigurationProvisioningStateFailed` -- New const `NetworkSecurityPerimeterConfigurationProvisioningStateDeleted` -- New const `NetworkSecurityPerimeterConfigurationProvisioningStateInvalidResponse` -- New const `NetworkSecurityPerimeterConfigurationProvisioningStateUnknown` -- New const `NetworkSecurityPerimeterConfigurationProvisioningStateCreating` -- New const `MetricIDOutgoingBytes` -- New const `NspAccessRuleDirectionInbound` -- New const `MetricIDIncomingBytes` -- New const `PublicNetworkAccessEnabled` -- New const `NspAccessRuleDirectionOutbound` -- New const `TLSVersionOne2` -- New const `NetworkSecurityPerimeterConfigurationProvisioningStateUpdating` -- New const `PublicNetworkAccessDisabled` -- New const `TLSVersionOne1` -- New const `ResourceAssociationAccessModeEnforcedMode` -- New const `TLSVersionOne0` -- New const `NetworkSecurityPerimeterConfigurationProvisioningStateSucceededWithIssues` -- New const `MetricIDOutgoingMessages` -- New const `ResourceAssociationAccessModeUnspecifiedMode` -- New const `NetworkSecurityPerimeterConfigurationProvisioningStateDeleting` -- New const `ResourceAssociationAccessModeAuditMode` -- New function `PossibleTLSVersionValues() []TLSVersion` -- New function `NetworkSecurityPerimeterConfigurationProperties.MarshalJSON() ([]byte, error)` -- New function `*ThrottlingPolicy.GetApplicationGroupPolicy() *ApplicationGroupPolicy` -- New function `*ThrottlingPolicy.UnmarshalJSON([]byte) error` -- New function `PossibleMetricIDValues() []MetricID` -- New function `NetworkSecurityPerimeterConfigurationPropertiesProfile.MarshalJSON() ([]byte, error)` -- New function `ThrottlingPolicy.MarshalJSON() ([]byte, error)` -- New function `PossibleApplicationGroupPolicyTypeValues() []ApplicationGroupPolicyType` -- New function `*ApplicationGroupPolicy.GetApplicationGroupPolicy() *ApplicationGroupPolicy` -- New function `NspAccessRuleProperties.MarshalJSON() ([]byte, error)` -- New function `*ApplicationGroupProperties.UnmarshalJSON([]byte) error` -- New function `ApplicationGroupProperties.MarshalJSON() ([]byte, error)` -- New function `PossibleResourceAssociationAccessModeValues() []ResourceAssociationAccessMode` -- New function `PossibleNetworkSecurityPerimeterConfigurationProvisioningStateValues() []NetworkSecurityPerimeterConfigurationProvisioningState` -- New function `PossibleNspAccessRuleDirectionValues() []NspAccessRuleDirection` -- New function `PossiblePublicNetworkAccessValues() []PublicNetworkAccess` -- New function `NetworkSecurityPerimeterConfiguration.MarshalJSON() ([]byte, error)` -- New struct `ApplicationGroup` -- New struct `ApplicationGroupClientCreateOrUpdateApplicationGroupOptions` -- New struct `ApplicationGroupClientCreateOrUpdateApplicationGroupResponse` -- New struct `ApplicationGroupClientDeleteOptions` -- New struct `ApplicationGroupClientDeleteResponse` -- New struct `ApplicationGroupClientGetOptions` -- New struct `ApplicationGroupClientGetResponse` -- New struct `ApplicationGroupClientListByNamespaceOptions` -- New struct `ApplicationGroupClientListByNamespaceResponse` -- New struct `ApplicationGroupListResult` -- New struct `ApplicationGroupPolicy` -- New struct `ApplicationGroupProperties` -- New struct `NetworkSecurityPerimeter` -- New struct `NetworkSecurityPerimeterConfiguration` -- New struct `NetworkSecurityPerimeterConfigurationClientListOptions` -- New struct `NetworkSecurityPerimeterConfigurationClientListResponse` -- New struct `NetworkSecurityPerimeterConfigurationList` -- New struct `NetworkSecurityPerimeterConfigurationProperties` -- New struct `NetworkSecurityPerimeterConfigurationPropertiesProfile` -- New struct `NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation` -- New struct `NetworkSecurityPerimeterConfigurationsClientBeginCreateOrUpdateOptions` -- New struct `NetworkSecurityPerimeterConfigurationsClientCreateOrUpdateResponse` -- New struct `NspAccessRule` -- New struct `NspAccessRuleProperties` -- New struct `NspAccessRulePropertiesSubscriptionsItem` -- New struct `ProvisioningIssue` -- New struct `ProvisioningIssueProperties` -- New struct `ThrottlingPolicy` -- New field `SupportsScaling` in struct `ClusterProperties` -- New field `PublicNetworkAccess` in struct `EHNamespaceProperties` -- New field `MinimumTLSVersion` in struct `EHNamespaceProperties` - - ## 1.0.0 (2022-05-16) The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. diff --git a/sdk/resourcemanager/eventhub/armeventhub/applicationgroup_client.go b/sdk/resourcemanager/eventhub/armeventhub/applicationgroup_client.go deleted file mode 100644 index 38b812d0c0b2..000000000000 --- a/sdk/resourcemanager/eventhub/armeventhub/applicationgroup_client.go +++ /dev/null @@ -1,295 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armeventhub - -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" -) - -// ApplicationGroupClient contains the methods for the ApplicationGroup group. -// Don't use this type directly, use NewApplicationGroupClient() instead. -type ApplicationGroupClient struct { - internal *arm.Client - subscriptionID string -} - -// NewApplicationGroupClient creates a new instance of ApplicationGroupClient with the specified values. -// - subscriptionID - Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewApplicationGroupClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGroupClient, error) { - cl, err := arm.NewClient(moduleName+".ApplicationGroupClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &ApplicationGroupClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// CreateOrUpdateApplicationGroup - Creates or updates an ApplicationGroup for a Namespace. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-01-01-preview -// - resourceGroupName - Name of the resource group within the azure subscription. -// - namespaceName - The Namespace name -// - applicationGroupName - The Application Group name -// - parameters - The ApplicationGroup. -// - options - ApplicationGroupClientCreateOrUpdateApplicationGroupOptions contains the optional parameters for the ApplicationGroupClient.CreateOrUpdateApplicationGroup -// method. -func (client *ApplicationGroupClient) CreateOrUpdateApplicationGroup(ctx context.Context, resourceGroupName string, namespaceName string, applicationGroupName string, parameters ApplicationGroup, options *ApplicationGroupClientCreateOrUpdateApplicationGroupOptions) (ApplicationGroupClientCreateOrUpdateApplicationGroupResponse, error) { - req, err := client.createOrUpdateApplicationGroupCreateRequest(ctx, resourceGroupName, namespaceName, applicationGroupName, parameters, options) - if err != nil { - return ApplicationGroupClientCreateOrUpdateApplicationGroupResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ApplicationGroupClientCreateOrUpdateApplicationGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGroupClientCreateOrUpdateApplicationGroupResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateApplicationGroupHandleResponse(resp) -} - -// createOrUpdateApplicationGroupCreateRequest creates the CreateOrUpdateApplicationGroup request. -func (client *ApplicationGroupClient) createOrUpdateApplicationGroupCreateRequest(ctx context.Context, resourceGroupName string, namespaceName string, applicationGroupName string, parameters ApplicationGroup, options *ApplicationGroupClientCreateOrUpdateApplicationGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if namespaceName == "" { - return nil, errors.New("parameter namespaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) - if applicationGroupName == "" { - return nil, errors.New("parameter applicationGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) - 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.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// createOrUpdateApplicationGroupHandleResponse handles the CreateOrUpdateApplicationGroup response. -func (client *ApplicationGroupClient) createOrUpdateApplicationGroupHandleResponse(resp *http.Response) (ApplicationGroupClientCreateOrUpdateApplicationGroupResponse, error) { - result := ApplicationGroupClientCreateOrUpdateApplicationGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGroup); err != nil { - return ApplicationGroupClientCreateOrUpdateApplicationGroupResponse{}, err - } - return result, nil -} - -// Delete - Deletes an ApplicationGroup for a Namespace. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-01-01-preview -// - resourceGroupName - Name of the resource group within the azure subscription. -// - namespaceName - The Namespace name -// - applicationGroupName - The Application Group name -// - options - ApplicationGroupClientDeleteOptions contains the optional parameters for the ApplicationGroupClient.Delete method. -func (client *ApplicationGroupClient) Delete(ctx context.Context, resourceGroupName string, namespaceName string, applicationGroupName string, options *ApplicationGroupClientDeleteOptions) (ApplicationGroupClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, namespaceName, applicationGroupName, options) - if err != nil { - return ApplicationGroupClientDeleteResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ApplicationGroupClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ApplicationGroupClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return ApplicationGroupClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ApplicationGroupClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, namespaceName string, applicationGroupName string, options *ApplicationGroupClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if namespaceName == "" { - return nil, errors.New("parameter namespaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) - if applicationGroupName == "" { - return nil, errors.New("parameter applicationGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) - 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.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets an ApplicationGroup for a Namespace. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-01-01-preview -// - resourceGroupName - Name of the resource group within the azure subscription. -// - namespaceName - The Namespace name -// - applicationGroupName - The Application Group name -// - options - ApplicationGroupClientGetOptions contains the optional parameters for the ApplicationGroupClient.Get method. -func (client *ApplicationGroupClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, applicationGroupName string, options *ApplicationGroupClientGetOptions) (ApplicationGroupClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, namespaceName, applicationGroupName, options) - if err != nil { - return ApplicationGroupClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ApplicationGroupClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGroupClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ApplicationGroupClient) getCreateRequest(ctx context.Context, resourceGroupName string, namespaceName string, applicationGroupName string, options *ApplicationGroupClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if namespaceName == "" { - return nil, errors.New("parameter namespaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) - if applicationGroupName == "" { - return nil, errors.New("parameter applicationGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) - 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", "2022-01-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 *ApplicationGroupClient) getHandleResponse(resp *http.Response) (ApplicationGroupClientGetResponse, error) { - result := ApplicationGroupClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGroup); err != nil { - return ApplicationGroupClientGetResponse{}, err - } - return result, nil -} - -// NewListByNamespacePager - Gets a list of application groups for a Namespace. -// -// Generated from API version 2022-01-01-preview -// - resourceGroupName - Name of the resource group within the azure subscription. -// - namespaceName - The Namespace name -// - options - ApplicationGroupClientListByNamespaceOptions contains the optional parameters for the ApplicationGroupClient.NewListByNamespacePager -// method. -func (client *ApplicationGroupClient) NewListByNamespacePager(resourceGroupName string, namespaceName string, options *ApplicationGroupClientListByNamespaceOptions) *runtime.Pager[ApplicationGroupClientListByNamespaceResponse] { - return runtime.NewPager(runtime.PagingHandler[ApplicationGroupClientListByNamespaceResponse]{ - More: func(page ApplicationGroupClientListByNamespaceResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ApplicationGroupClientListByNamespaceResponse) (ApplicationGroupClientListByNamespaceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByNamespaceCreateRequest(ctx, resourceGroupName, namespaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ApplicationGroupClientListByNamespaceResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ApplicationGroupClientListByNamespaceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGroupClientListByNamespaceResponse{}, runtime.NewResponseError(resp) - } - return client.listByNamespaceHandleResponse(resp) - }, - }) -} - -// listByNamespaceCreateRequest creates the ListByNamespace request. -func (client *ApplicationGroupClient) listByNamespaceCreateRequest(ctx context.Context, resourceGroupName string, namespaceName string, options *ApplicationGroupClientListByNamespaceOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if namespaceName == "" { - return nil, errors.New("parameter namespaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) - 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", "2022-01-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByNamespaceHandleResponse handles the ListByNamespace response. -func (client *ApplicationGroupClient) listByNamespaceHandleResponse(resp *http.Response) (ApplicationGroupClientListByNamespaceResponse, error) { - result := ApplicationGroupClientListByNamespaceResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGroupListResult); err != nil { - return ApplicationGroupClientListByNamespaceResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/eventhub/armeventhub/applicationgroup_client_example_test.go b/sdk/resourcemanager/eventhub/armeventhub/applicationgroup_client_example_test.go deleted file mode 100644 index 4a1ed0e41335..000000000000 --- a/sdk/resourcemanager/eventhub/armeventhub/applicationgroup_client_example_test.go +++ /dev/null @@ -1,244 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armeventhub_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/ApplicationGroup/ApplicationGroupListByNamespace.json -func ExampleApplicationGroupClient_NewListByNamespacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armeventhub.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewApplicationGroupClient().NewListByNamespacePager("contosotest", "contoso-ua-test-eh-system-1", 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.ApplicationGroupListResult = armeventhub.ApplicationGroupListResult{ - // Value: []*armeventhub.ApplicationGroup{ - // { - // Name: to.Ptr("appGroup1"), - // Type: to.Ptr("Microsoft.EventHub/Namespaces/ApplicationGroups"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosotest/providers/Microsoft.EventHub/namespaces/contoso-ua-test-eh-system-1/applicationgroups/appGroup1"), - // Location: to.Ptr("EAST US 2 EUAP"), - // Properties: &armeventhub.ApplicationGroupProperties{ - // ClientAppGroupIdentifier: to.Ptr("SASKeyName=KeyName"), - // IsEnabled: to.Ptr(true), - // Policies: []armeventhub.ApplicationGroupPolicyClassification{ - // &armeventhub.ThrottlingPolicy{ - // Name: to.Ptr("ThrottlingPolicy1"), - // Type: to.Ptr(armeventhub.ApplicationGroupPolicyTypeThrottlingPolicy), - // MetricID: to.Ptr(armeventhub.MetricIDIncomingMessages), - // RateLimitThreshold: to.Ptr[int64](7912), - // }, - // &armeventhub.ThrottlingPolicy{ - // Name: to.Ptr("ThrottlingPolicy2"), - // Type: to.Ptr(armeventhub.ApplicationGroupPolicyTypeThrottlingPolicy), - // MetricID: to.Ptr(armeventhub.MetricIDIncomingBytes), - // RateLimitThreshold: to.Ptr[int64](3951729), - // }, - // &armeventhub.ThrottlingPolicy{ - // Name: to.Ptr("ThrottlingPolicy3"), - // Type: to.Ptr(armeventhub.ApplicationGroupPolicyTypeThrottlingPolicy), - // MetricID: to.Ptr(armeventhub.MetricIDOutgoingBytes), - // RateLimitThreshold: to.Ptr[int64](245175), - // }}, - // }, - // }, - // { - // Name: to.Ptr("appGroup2"), - // Type: to.Ptr("Microsoft.EventHub/Namespaces/ApplicationGroups"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosotest/providers/Microsoft.EventHub/namespaces/contoso-ua-test-eh-system-1/applicationgroups/appGroup2"), - // Location: to.Ptr("EAST US 2 EUAP"), - // Properties: &armeventhub.ApplicationGroupProperties{ - // ClientAppGroupIdentifier: to.Ptr("AADAppID=Guid"), - // IsEnabled: to.Ptr(false), - // Policies: []armeventhub.ApplicationGroupPolicyClassification{ - // &armeventhub.ThrottlingPolicy{ - // Name: to.Ptr("ThrottlingPolicy1"), - // Type: to.Ptr(armeventhub.ApplicationGroupPolicyTypeThrottlingPolicy), - // MetricID: to.Ptr(armeventhub.MetricIDIncomingMessages), - // RateLimitThreshold: to.Ptr[int64](9984), - // }, - // &armeventhub.ThrottlingPolicy{ - // Name: to.Ptr("ThrottlingPolicy2"), - // Type: to.Ptr(armeventhub.ApplicationGroupPolicyTypeThrottlingPolicy), - // MetricID: to.Ptr(armeventhub.MetricIDIncomingBytes), - // RateLimitThreshold: to.Ptr[int64](7823412), - // }, - // &armeventhub.ThrottlingPolicy{ - // Name: to.Ptr("ThrottlingPolicy3"), - // Type: to.Ptr(armeventhub.ApplicationGroupPolicyTypeThrottlingPolicy), - // MetricID: to.Ptr(armeventhub.MetricIDOutgoingBytes), - // RateLimitThreshold: to.Ptr[int64](331665), - // }}, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/ApplicationGroup/ApplicationGroupCreate.json -func ExampleApplicationGroupClient_CreateOrUpdateApplicationGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armeventhub.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewApplicationGroupClient().CreateOrUpdateApplicationGroup(ctx, "contosotest", "contoso-ua-test-eh-system-1", "appGroup1", armeventhub.ApplicationGroup{ - Properties: &armeventhub.ApplicationGroupProperties{ - ClientAppGroupIdentifier: to.Ptr("SASKeyName=KeyName"), - IsEnabled: to.Ptr(true), - Policies: []armeventhub.ApplicationGroupPolicyClassification{ - &armeventhub.ThrottlingPolicy{ - Name: to.Ptr("ThrottlingPolicy1"), - Type: to.Ptr(armeventhub.ApplicationGroupPolicyTypeThrottlingPolicy), - MetricID: to.Ptr(armeventhub.MetricIDIncomingMessages), - RateLimitThreshold: to.Ptr[int64](7912), - }, - &armeventhub.ThrottlingPolicy{ - Name: to.Ptr("ThrottlingPolicy2"), - Type: to.Ptr(armeventhub.ApplicationGroupPolicyTypeThrottlingPolicy), - MetricID: to.Ptr(armeventhub.MetricIDIncomingBytes), - RateLimitThreshold: to.Ptr[int64](3951729), - }, - &armeventhub.ThrottlingPolicy{ - Name: to.Ptr("ThrottlingPolicy3"), - Type: to.Ptr(armeventhub.ApplicationGroupPolicyTypeThrottlingPolicy), - MetricID: to.Ptr(armeventhub.MetricIDOutgoingBytes), - RateLimitThreshold: to.Ptr[int64](245175), - }}, - }, - }, 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.ApplicationGroup = armeventhub.ApplicationGroup{ - // Name: to.Ptr("appGroup1"), - // Type: to.Ptr("Microsoft.EventHub/Namespaces/ApplicationGroups"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosotest/providers/Microsoft.EventHub/namespaces/contoso-ua-test-eh-system-1/applicationgroups/appGroup1"), - // Location: to.Ptr("EAST US 2 EUAP"), - // Properties: &armeventhub.ApplicationGroupProperties{ - // ClientAppGroupIdentifier: to.Ptr("SASKeyName=KeyName"), - // IsEnabled: to.Ptr(true), - // Policies: []armeventhub.ApplicationGroupPolicyClassification{ - // &armeventhub.ThrottlingPolicy{ - // Name: to.Ptr("ThrottlingPolicy1"), - // Type: to.Ptr(armeventhub.ApplicationGroupPolicyTypeThrottlingPolicy), - // MetricID: to.Ptr(armeventhub.MetricIDIncomingMessages), - // RateLimitThreshold: to.Ptr[int64](7912), - // }, - // &armeventhub.ThrottlingPolicy{ - // Name: to.Ptr("ThrottlingPolicy2"), - // Type: to.Ptr(armeventhub.ApplicationGroupPolicyTypeThrottlingPolicy), - // MetricID: to.Ptr(armeventhub.MetricIDIncomingBytes), - // RateLimitThreshold: to.Ptr[int64](3951729), - // }, - // &armeventhub.ThrottlingPolicy{ - // Name: to.Ptr("ThrottlingPolicy3"), - // Type: to.Ptr(armeventhub.ApplicationGroupPolicyTypeThrottlingPolicy), - // MetricID: to.Ptr(armeventhub.MetricIDOutgoingBytes), - // RateLimitThreshold: to.Ptr[int64](245175), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/ApplicationGroup/ApplicationGroupDelete.json -func ExampleApplicationGroupClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armeventhub.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewApplicationGroupClient().Delete(ctx, "contosotest", "contoso-ua-test-eh-system-1", "appGroup1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/ApplicationGroup/ApplicationGroupGet.json -func ExampleApplicationGroupClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armeventhub.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewApplicationGroupClient().Get(ctx, "contosotest", "contoso-ua-test-eh-system-1", "appGroup1", 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.ApplicationGroup = armeventhub.ApplicationGroup{ - // Name: to.Ptr("appGroup1"), - // Type: to.Ptr("Microsoft.EventHub/Namespaces/ApplicationGroups"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosotest/providers/Microsoft.EventHub/namespaces/contoso-ua-test-eh-system-1/applicationgroups/appGroup1"), - // Location: to.Ptr("EAST US 2 EUAP"), - // Properties: &armeventhub.ApplicationGroupProperties{ - // ClientAppGroupIdentifier: to.Ptr("SASKeyName=KeyName"), - // IsEnabled: to.Ptr(true), - // Policies: []armeventhub.ApplicationGroupPolicyClassification{ - // &armeventhub.ThrottlingPolicy{ - // Name: to.Ptr("ThrottlingPolicy1"), - // Type: to.Ptr(armeventhub.ApplicationGroupPolicyTypeThrottlingPolicy), - // MetricID: to.Ptr(armeventhub.MetricIDIncomingMessages), - // RateLimitThreshold: to.Ptr[int64](7912), - // }, - // &armeventhub.ThrottlingPolicy{ - // Name: to.Ptr("ThrottlingPolicy2"), - // Type: to.Ptr(armeventhub.ApplicationGroupPolicyTypeThrottlingPolicy), - // MetricID: to.Ptr(armeventhub.MetricIDIncomingBytes), - // RateLimitThreshold: to.Ptr[int64](3951729), - // }, - // &armeventhub.ThrottlingPolicy{ - // Name: to.Ptr("ThrottlingPolicy3"), - // Type: to.Ptr(armeventhub.ApplicationGroupPolicyTypeThrottlingPolicy), - // MetricID: to.Ptr(armeventhub.MetricIDOutgoingBytes), - // RateLimitThreshold: to.Ptr[int64](245175), - // }}, - // }, - // } -} diff --git a/sdk/resourcemanager/eventhub/armeventhub/assets.json b/sdk/resourcemanager/eventhub/armeventhub/assets.json index 30ff099453b3..09f0631e3814 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/assets.json +++ b/sdk/resourcemanager/eventhub/armeventhub/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/resourcemanager/eventhub/armeventhub", - "Tag": "go/resourcemanager/eventhub/armeventhub_7a00df637a" + "Tag": "go/resourcemanager/eventhub/armeventhub_18f486a536" } diff --git a/sdk/resourcemanager/eventhub/armeventhub/autorest.md b/sdk/resourcemanager/eventhub/armeventhub/autorest.md index 284ad975c323..442f806244c6 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/autorest.md +++ b/sdk/resourcemanager/eventhub/armeventhub/autorest.md @@ -5,8 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.0-beta.2 +module-version: 1.1.0 +tag: package-2021-11 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/eventhub/armeventhub/client_factory.go b/sdk/resourcemanager/eventhub/armeventhub/client_factory.go index b65f9f9fe0b6..5ce889168791 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/client_factory.go +++ b/sdk/resourcemanager/eventhub/armeventhub/client_factory.go @@ -44,6 +44,11 @@ func (c *ClientFactory) NewClustersClient() *ClustersClient { return subClient } +func (c *ClientFactory) NewConfigurationClient() *ConfigurationClient { + subClient, _ := NewConfigurationClient(c.subscriptionID, c.credential, c.options) + return subClient +} + func (c *ClientFactory) NewNamespacesClient() *NamespacesClient { subClient, _ := NewNamespacesClient(c.subscriptionID, c.credential, c.options) return subClient @@ -59,18 +64,13 @@ func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesCli return subClient } -func (c *ClientFactory) NewNetworkSecurityPerimeterConfigurationClient() *NetworkSecurityPerimeterConfigurationClient { - subClient, _ := NewNetworkSecurityPerimeterConfigurationClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewNetworkSecurityPerimeterConfigurationsClient() *NetworkSecurityPerimeterConfigurationsClient { - subClient, _ := NewNetworkSecurityPerimeterConfigurationsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewConfigurationClient() *ConfigurationClient { - subClient, _ := NewConfigurationClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewEventHubsClient() *EventHubsClient { + subClient, _ := NewEventHubsClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -79,27 +79,12 @@ func (c *ClientFactory) NewDisasterRecoveryConfigsClient() *DisasterRecoveryConf return subClient } -func (c *ClientFactory) NewEventHubsClient() *EventHubsClient { - subClient, _ := NewEventHubsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - func (c *ClientFactory) NewConsumerGroupsClient() *ConsumerGroupsClient { subClient, _ := NewConsumerGroupsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) - return subClient -} - func (c *ClientFactory) NewSchemaRegistryClient() *SchemaRegistryClient { subClient, _ := NewSchemaRegistryClient(c.subscriptionID, c.credential, c.options) return subClient } - -func (c *ClientFactory) NewApplicationGroupClient() *ApplicationGroupClient { - subClient, _ := NewApplicationGroupClient(c.subscriptionID, c.credential, c.options) - return subClient -} diff --git a/sdk/resourcemanager/eventhub/armeventhub/clusters_client.go b/sdk/resourcemanager/eventhub/armeventhub/clusters_client.go index 3b751f11c500..a0878417100e 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/clusters_client.go +++ b/sdk/resourcemanager/eventhub/armeventhub/clusters_client.go @@ -48,7 +48,7 @@ func NewClustersClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreateOrUpdate - Creates or updates an instance of an Event Hubs Cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - clusterName - The name of the Event Hubs Cluster. // - parameters - Parameters for creating a eventhub cluster resource. @@ -69,7 +69,7 @@ func (client *ClustersClient) BeginCreateOrUpdate(ctx context.Context, resourceG // CreateOrUpdate - Creates or updates an instance of an Event Hubs Cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 func (client *ClustersClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, parameters Cluster, options *ClustersClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, clusterName, parameters, options) if err != nil { @@ -105,7 +105,7 @@ func (client *ClustersClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -114,7 +114,7 @@ func (client *ClustersClient) createOrUpdateCreateRequest(ctx context.Context, r // BeginDelete - Deletes an existing Event Hubs Cluster. This operation is idempotent. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - clusterName - The name of the Event Hubs Cluster. // - options - ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method. @@ -133,7 +133,7 @@ func (client *ClustersClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Deletes an existing Event Hubs Cluster. This operation is idempotent. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 func (client *ClustersClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, options) if err != nil { @@ -169,7 +169,7 @@ func (client *ClustersClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -178,7 +178,7 @@ func (client *ClustersClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Gets the resource description of the specified Event Hubs Cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - clusterName - The name of the Event Hubs Cluster. // - options - ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method. @@ -217,7 +217,7 @@ func (client *ClustersClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -235,7 +235,7 @@ func (client *ClustersClient) getHandleResponse(resp *http.Response) (ClustersCl // ListAvailableClusterRegion - List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - options - ClustersClientListAvailableClusterRegionOptions contains the optional parameters for the ClustersClient.ListAvailableClusterRegion // method. func (client *ClustersClient) ListAvailableClusterRegion(ctx context.Context, options *ClustersClientListAvailableClusterRegionOptions) (ClustersClientListAvailableClusterRegionResponse, error) { @@ -265,7 +265,7 @@ func (client *ClustersClient) listAvailableClusterRegionCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -282,7 +282,7 @@ func (client *ClustersClient) listAvailableClusterRegionHandleResponse(resp *htt // NewListByResourceGroupPager - Lists the available Event Hubs Clusters within an ARM resource group // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - options - ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager // method. @@ -330,7 +330,7 @@ func (client *ClustersClient) listByResourceGroupCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -347,7 +347,7 @@ func (client *ClustersClient) listByResourceGroupHandleResponse(resp *http.Respo // NewListBySubscriptionPager - Lists the available Event Hubs Clusters within an ARM resource group // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - options - ClustersClientListBySubscriptionOptions contains the optional parameters for the ClustersClient.NewListBySubscriptionPager // method. func (client *ClustersClient) NewListBySubscriptionPager(options *ClustersClientListBySubscriptionOptions) *runtime.Pager[ClustersClientListBySubscriptionResponse] { @@ -390,7 +390,7 @@ func (client *ClustersClient) listBySubscriptionCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -408,7 +408,7 @@ func (client *ClustersClient) listBySubscriptionHandleResponse(resp *http.Respon // ListNamespaces - List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - clusterName - The name of the Event Hubs Cluster. // - options - ClustersClientListNamespacesOptions contains the optional parameters for the ClustersClient.ListNamespaces method. @@ -447,7 +447,7 @@ func (client *ClustersClient) listNamespacesCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -465,7 +465,7 @@ func (client *ClustersClient) listNamespacesHandleResponse(resp *http.Response) // BeginUpdate - Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - clusterName - The name of the Event Hubs Cluster. // - parameters - The properties of the Event Hubs Cluster which should be updated. @@ -485,7 +485,7 @@ func (client *ClustersClient) BeginUpdate(ctx context.Context, resourceGroupName // Update - Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 func (client *ClustersClient) update(ctx context.Context, resourceGroupName string, clusterName string, parameters Cluster, options *ClustersClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, clusterName, parameters, options) if err != nil { @@ -521,7 +521,7 @@ func (client *ClustersClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/eventhub/armeventhub/clusters_client_example_test.go b/sdk/resourcemanager/eventhub/armeventhub/clusters_client_example_test.go index 9fac632d11df..db3fc06d1d43 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/clusters_client_example_test.go +++ b/sdk/resourcemanager/eventhub/armeventhub/clusters_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/Clusters/ListAvailableClustersGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/Clusters/ListAvailableClustersGet.json func ExampleClustersClient_ListAvailableClusterRegion() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -47,7 +47,7 @@ func ExampleClustersClient_ListAvailableClusterRegion() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/Clusters/ClustersListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/Clusters/ClustersListBySubscription.json func ExampleClustersClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -92,7 +92,7 @@ func ExampleClustersClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/Clusters/ClustersListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/Clusters/ClustersListByResourceGroup.json func ExampleClustersClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -137,7 +137,7 @@ func ExampleClustersClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/Clusters/ClusterGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/Clusters/ClusterGet.json func ExampleClustersClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -176,7 +176,7 @@ func ExampleClustersClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/Clusters/ClusterPut.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/Clusters/ClusterPut.json func ExampleClustersClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -229,7 +229,7 @@ func ExampleClustersClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/Clusters/ClusterPatch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/Clusters/ClusterPatch.json func ExampleClustersClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -278,7 +278,7 @@ func ExampleClustersClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/Clusters/ClusterDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/Clusters/ClusterDelete.json func ExampleClustersClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -299,7 +299,7 @@ func ExampleClustersClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/Clusters/ListNamespacesInClusterGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/Clusters/ListNamespacesInClusterGet.json func ExampleClustersClient_ListNamespaces() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/eventhub/armeventhub/configuration_client.go b/sdk/resourcemanager/eventhub/armeventhub/configuration_client.go index dffdced849a8..94962560e745 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/configuration_client.go +++ b/sdk/resourcemanager/eventhub/armeventhub/configuration_client.go @@ -49,7 +49,7 @@ func NewConfigurationClient(subscriptionID string, credential azcore.TokenCreden // on the cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - clusterName - The name of the Event Hubs Cluster. // - options - ConfigurationClientGetOptions contains the optional parameters for the ConfigurationClient.Get method. @@ -88,7 +88,7 @@ func (client *ConfigurationClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -107,7 +107,7 @@ func (client *ConfigurationClient) getHandleResponse(resp *http.Response) (Confi // not specified in the request body unmodified. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - clusterName - The name of the Event Hubs Cluster. // - parameters - Parameters for creating an Event Hubs Cluster resource. @@ -147,7 +147,7 @@ func (client *ConfigurationClient) patchCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/eventhub/armeventhub/configuration_client_example_test.go b/sdk/resourcemanager/eventhub/armeventhub/configuration_client_example_test.go index 4d04fdbdfe50..cccbd9d4ee84 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/configuration_client_example_test.go +++ b/sdk/resourcemanager/eventhub/armeventhub/configuration_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/Clusters/ClusterQuotaConfigurationPatch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/Clusters/ClusterQuotaConfigurationPatch.json func ExampleConfigurationClient_Patch() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -49,7 +49,7 @@ func ExampleConfigurationClient_Patch() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/Clusters/ClusterQuotaConfigurationGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/Clusters/ClusterQuotaConfigurationGet.json func ExampleConfigurationClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/eventhub/armeventhub/constants.go b/sdk/resourcemanager/eventhub/armeventhub/constants.go index ab6ea3996cbf..85e743862446 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/constants.go +++ b/sdk/resourcemanager/eventhub/armeventhub/constants.go @@ -11,7 +11,7 @@ package armeventhub const ( moduleName = "armeventhub" - moduleVersion = "v1.1.0-beta.2" + moduleVersion = "v1.1.0" ) type AccessRights string @@ -31,20 +31,6 @@ func PossibleAccessRightsValues() []AccessRights { } } -// ApplicationGroupPolicyType - Application Group Policy types -type ApplicationGroupPolicyType string - -const ( - ApplicationGroupPolicyTypeThrottlingPolicy ApplicationGroupPolicyType = "ThrottlingPolicy" -) - -// PossibleApplicationGroupPolicyTypeValues returns the possible values for the ApplicationGroupPolicyType const type. -func PossibleApplicationGroupPolicyTypeValues() []ApplicationGroupPolicyType { - return []ApplicationGroupPolicyType{ - ApplicationGroupPolicyTypeThrottlingPolicy, - } -} - // ClusterSKUName - Name of this SKU. type ClusterSKUName string @@ -202,27 +188,6 @@ func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { } } -// MetricID - Metric Id on which the throttle limit should be set, MetricId can be discovered by hovering over Metric in the -// Metrics section of Event Hub Namespace inside Azure Portal -type MetricID string - -const ( - MetricIDIncomingBytes MetricID = "IncomingBytes" - MetricIDIncomingMessages MetricID = "IncomingMessages" - MetricIDOutgoingBytes MetricID = "OutgoingBytes" - MetricIDOutgoingMessages MetricID = "OutgoingMessages" -) - -// PossibleMetricIDValues returns the possible values for the MetricID const type. -func PossibleMetricIDValues() []MetricID { - return []MetricID{ - MetricIDIncomingBytes, - MetricIDIncomingMessages, - MetricIDOutgoingBytes, - MetricIDOutgoingMessages, - } -} - // NetworkRuleIPAction - The IP Filter Action type NetworkRuleIPAction string @@ -237,56 +202,6 @@ func PossibleNetworkRuleIPActionValues() []NetworkRuleIPAction { } } -// NetworkSecurityPerimeterConfigurationProvisioningState - Provisioning state of NetworkSecurityPerimeter configuration propagation -type NetworkSecurityPerimeterConfigurationProvisioningState string - -const ( - NetworkSecurityPerimeterConfigurationProvisioningStateAccepted NetworkSecurityPerimeterConfigurationProvisioningState = "Accepted" - NetworkSecurityPerimeterConfigurationProvisioningStateCanceled NetworkSecurityPerimeterConfigurationProvisioningState = "Canceled" - NetworkSecurityPerimeterConfigurationProvisioningStateCreating NetworkSecurityPerimeterConfigurationProvisioningState = "Creating" - NetworkSecurityPerimeterConfigurationProvisioningStateDeleted NetworkSecurityPerimeterConfigurationProvisioningState = "Deleted" - NetworkSecurityPerimeterConfigurationProvisioningStateDeleting NetworkSecurityPerimeterConfigurationProvisioningState = "Deleting" - NetworkSecurityPerimeterConfigurationProvisioningStateFailed NetworkSecurityPerimeterConfigurationProvisioningState = "Failed" - NetworkSecurityPerimeterConfigurationProvisioningStateInvalidResponse NetworkSecurityPerimeterConfigurationProvisioningState = "InvalidResponse" - NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded NetworkSecurityPerimeterConfigurationProvisioningState = "Succeeded" - NetworkSecurityPerimeterConfigurationProvisioningStateSucceededWithIssues NetworkSecurityPerimeterConfigurationProvisioningState = "SucceededWithIssues" - NetworkSecurityPerimeterConfigurationProvisioningStateUnknown NetworkSecurityPerimeterConfigurationProvisioningState = "Unknown" - NetworkSecurityPerimeterConfigurationProvisioningStateUpdating NetworkSecurityPerimeterConfigurationProvisioningState = "Updating" -) - -// PossibleNetworkSecurityPerimeterConfigurationProvisioningStateValues returns the possible values for the NetworkSecurityPerimeterConfigurationProvisioningState const type. -func PossibleNetworkSecurityPerimeterConfigurationProvisioningStateValues() []NetworkSecurityPerimeterConfigurationProvisioningState { - return []NetworkSecurityPerimeterConfigurationProvisioningState{ - NetworkSecurityPerimeterConfigurationProvisioningStateAccepted, - NetworkSecurityPerimeterConfigurationProvisioningStateCanceled, - NetworkSecurityPerimeterConfigurationProvisioningStateCreating, - NetworkSecurityPerimeterConfigurationProvisioningStateDeleted, - NetworkSecurityPerimeterConfigurationProvisioningStateDeleting, - NetworkSecurityPerimeterConfigurationProvisioningStateFailed, - NetworkSecurityPerimeterConfigurationProvisioningStateInvalidResponse, - NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded, - NetworkSecurityPerimeterConfigurationProvisioningStateSucceededWithIssues, - NetworkSecurityPerimeterConfigurationProvisioningStateUnknown, - NetworkSecurityPerimeterConfigurationProvisioningStateUpdating, - } -} - -// NspAccessRuleDirection - Direction of Access Rule -type NspAccessRuleDirection string - -const ( - NspAccessRuleDirectionInbound NspAccessRuleDirection = "Inbound" - NspAccessRuleDirectionOutbound NspAccessRuleDirection = "Outbound" -) - -// PossibleNspAccessRuleDirectionValues returns the possible values for the NspAccessRuleDirection const type. -func PossibleNspAccessRuleDirectionValues() []NspAccessRuleDirection { - return []NspAccessRuleDirection{ - NspAccessRuleDirectionInbound, - NspAccessRuleDirectionOutbound, - } -} - // PrivateLinkConnectionStatus - Status of the connection. type PrivateLinkConnectionStatus string @@ -326,33 +241,12 @@ func PossibleProvisioningStateDRValues() []ProvisioningStateDR { } } -// PublicNetworkAccess - This determines if traffic is allowed over public network. By default it is enabled. -type PublicNetworkAccess string - -const ( - PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" - PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" - PublicNetworkAccessSecuredByPerimeter PublicNetworkAccess = "SecuredByPerimeter" -) - -// PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type. -func PossiblePublicNetworkAccessValues() []PublicNetworkAccess { - return []PublicNetworkAccess{ - PublicNetworkAccessDisabled, - PublicNetworkAccessEnabled, - PublicNetworkAccessSecuredByPerimeter, - } -} - -// PublicNetworkAccessFlag - This determines if traffic is allowed over public network. By default it is enabled. If value -// is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security -// perimeter and profile's access rules. +// PublicNetworkAccessFlag - This determines if traffic is allowed over public network. By default it is enabled. type PublicNetworkAccessFlag string const ( - PublicNetworkAccessFlagDisabled PublicNetworkAccessFlag = "Disabled" - PublicNetworkAccessFlagEnabled PublicNetworkAccessFlag = "Enabled" - PublicNetworkAccessFlagSecuredByPerimeter PublicNetworkAccessFlag = "SecuredByPerimeter" + PublicNetworkAccessFlagDisabled PublicNetworkAccessFlag = "Disabled" + PublicNetworkAccessFlagEnabled PublicNetworkAccessFlag = "Enabled" ) // PossiblePublicNetworkAccessFlagValues returns the possible values for the PublicNetworkAccessFlag const type. @@ -360,29 +254,6 @@ func PossiblePublicNetworkAccessFlagValues() []PublicNetworkAccessFlag { return []PublicNetworkAccessFlag{ PublicNetworkAccessFlagDisabled, PublicNetworkAccessFlagEnabled, - PublicNetworkAccessFlagSecuredByPerimeter, - } -} - -// ResourceAssociationAccessMode - Access Mode of the resource association -type ResourceAssociationAccessMode string - -const ( - ResourceAssociationAccessModeAuditMode ResourceAssociationAccessMode = "AuditMode" - ResourceAssociationAccessModeEnforcedMode ResourceAssociationAccessMode = "EnforcedMode" - ResourceAssociationAccessModeLearningMode ResourceAssociationAccessMode = "LearningMode" - ResourceAssociationAccessModeNoAssociationMode ResourceAssociationAccessMode = "NoAssociationMode" - ResourceAssociationAccessModeUnspecifiedMode ResourceAssociationAccessMode = "UnspecifiedMode" -) - -// PossibleResourceAssociationAccessModeValues returns the possible values for the ResourceAssociationAccessMode const type. -func PossibleResourceAssociationAccessModeValues() []ResourceAssociationAccessMode { - return []ResourceAssociationAccessMode{ - ResourceAssociationAccessModeAuditMode, - ResourceAssociationAccessModeEnforcedMode, - ResourceAssociationAccessModeLearningMode, - ResourceAssociationAccessModeNoAssociationMode, - ResourceAssociationAccessModeUnspecifiedMode, } } @@ -472,24 +343,6 @@ func PossibleSchemaTypeValues() []SchemaType { } } -// TLSVersion - The minimum TLS version for the cluster to support, e.g. '1.2' -type TLSVersion string - -const ( - TLSVersionOne0 TLSVersion = "1.0" - TLSVersionOne1 TLSVersion = "1.1" - TLSVersionOne2 TLSVersion = "1.2" -) - -// PossibleTLSVersionValues returns the possible values for the TLSVersion const type. -func PossibleTLSVersionValues() []TLSVersion { - return []TLSVersion{ - TLSVersionOne0, - TLSVersionOne1, - TLSVersionOne2, - } -} - // UnavailableReason - Specifies the reason for the unavailability of the service. type UnavailableReason string diff --git a/sdk/resourcemanager/eventhub/armeventhub/consumergroups_client.go b/sdk/resourcemanager/eventhub/armeventhub/consumergroups_client.go index d76779e944b9..848ccc2348f6 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/consumergroups_client.go +++ b/sdk/resourcemanager/eventhub/armeventhub/consumergroups_client.go @@ -49,7 +49,7 @@ func NewConsumerGroupsClient(subscriptionID string, credential azcore.TokenCrede // CreateOrUpdate - Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - eventHubName - The Event Hub name @@ -100,7 +100,7 @@ func (client *ConsumerGroupsClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -118,7 +118,7 @@ func (client *ConsumerGroupsClient) createOrUpdateHandleResponse(resp *http.Resp // Delete - Deletes a consumer group from the specified Event Hub and resource group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - eventHubName - The Event Hub name @@ -167,7 +167,7 @@ func (client *ConsumerGroupsClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -176,7 +176,7 @@ func (client *ConsumerGroupsClient) deleteCreateRequest(ctx context.Context, res // Get - Gets a description for the specified consumer group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - eventHubName - The Event Hub name @@ -225,7 +225,7 @@ func (client *ConsumerGroupsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -243,7 +243,7 @@ func (client *ConsumerGroupsClient) getHandleResponse(resp *http.Response) (Cons // NewListByEventHubPager - Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists // in the Namespace. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - eventHubName - The Event Hub name @@ -301,7 +301,7 @@ func (client *ConsumerGroupsClient) listByEventHubCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } diff --git a/sdk/resourcemanager/eventhub/armeventhub/consumergroups_client_example_test.go b/sdk/resourcemanager/eventhub/armeventhub/consumergroups_client_example_test.go index a765e1c98e5c..608ce4e44769 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/consumergroups_client_example_test.go +++ b/sdk/resourcemanager/eventhub/armeventhub/consumergroups_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/ConsumerGroup/EHConsumerGroupCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/ConsumerGroup/EHConsumerGroupCreate.json func ExampleConsumerGroupsClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -51,7 +51,7 @@ func ExampleConsumerGroupsClient_CreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/ConsumerGroup/EHConsumerGroupDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/ConsumerGroup/EHConsumerGroupDelete.json func ExampleConsumerGroupsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -68,7 +68,7 @@ func ExampleConsumerGroupsClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/ConsumerGroup/EHConsumerGroupGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/ConsumerGroup/EHConsumerGroupGet.json func ExampleConsumerGroupsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -97,7 +97,7 @@ func ExampleConsumerGroupsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/ConsumerGroup/EHConsumerGroupListByEventHub.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/ConsumerGroup/EHConsumerGroupListByEventHub.json func ExampleConsumerGroupsClient_NewListByEventHubPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/eventhub/armeventhub/disasterrecoveryconfigs_client.go b/sdk/resourcemanager/eventhub/armeventhub/disasterrecoveryconfigs_client.go index b0cfd54e2c2b..d87f6796715b 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/disasterrecoveryconfigs_client.go +++ b/sdk/resourcemanager/eventhub/armeventhub/disasterrecoveryconfigs_client.go @@ -48,7 +48,7 @@ func NewDisasterRecoveryConfigsClient(subscriptionID string, credential azcore.T // BreakPairing - This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - alias - The Disaster Recovery configuration name @@ -93,7 +93,7 @@ func (client *DisasterRecoveryConfigsClient) breakPairingCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -102,7 +102,7 @@ func (client *DisasterRecoveryConfigsClient) breakPairingCreateRequest(ctx conte // CheckNameAvailability - Check the give Namespace name availability. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - parameters - Parameters to check availability of the given Alias name @@ -143,7 +143,7 @@ func (client *DisasterRecoveryConfigsClient) checkNameAvailabilityCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -161,7 +161,7 @@ func (client *DisasterRecoveryConfigsClient) checkNameAvailabilityHandleResponse // CreateOrUpdate - Creates or updates a new Alias(Disaster Recovery configuration) // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - alias - The Disaster Recovery configuration name @@ -207,7 +207,7 @@ func (client *DisasterRecoveryConfigsClient) createOrUpdateCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -225,7 +225,7 @@ func (client *DisasterRecoveryConfigsClient) createOrUpdateHandleResponse(resp * // Delete - Deletes an Alias(Disaster Recovery configuration) // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - alias - The Disaster Recovery configuration name @@ -270,7 +270,7 @@ func (client *DisasterRecoveryConfigsClient) deleteCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -279,7 +279,7 @@ func (client *DisasterRecoveryConfigsClient) deleteCreateRequest(ctx context.Con // FailOver - Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - alias - The Disaster Recovery configuration name @@ -324,7 +324,7 @@ func (client *DisasterRecoveryConfigsClient) failOverCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -333,7 +333,7 @@ func (client *DisasterRecoveryConfigsClient) failOverCreateRequest(ctx context.C // Get - Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - alias - The Disaster Recovery configuration name @@ -378,7 +378,7 @@ func (client *DisasterRecoveryConfigsClient) getCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -396,7 +396,7 @@ func (client *DisasterRecoveryConfigsClient) getHandleResponse(resp *http.Respon // GetAuthorizationRule - Gets an AuthorizationRule for a Namespace by rule name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - alias - The Disaster Recovery configuration name @@ -446,7 +446,7 @@ func (client *DisasterRecoveryConfigsClient) getAuthorizationRuleCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -463,7 +463,7 @@ func (client *DisasterRecoveryConfigsClient) getAuthorizationRuleHandleResponse( // NewListPager - Gets all Alias(Disaster Recovery configurations) // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - options - DisasterRecoveryConfigsClientListOptions contains the optional parameters for the DisasterRecoveryConfigsClient.NewListPager @@ -516,7 +516,7 @@ func (client *DisasterRecoveryConfigsClient) listCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -533,7 +533,7 @@ func (client *DisasterRecoveryConfigsClient) listHandleResponse(resp *http.Respo // NewListAuthorizationRulesPager - Gets a list of authorization rules for a Namespace. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - alias - The Disaster Recovery configuration name @@ -591,7 +591,7 @@ func (client *DisasterRecoveryConfigsClient) listAuthorizationRulesCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -609,7 +609,7 @@ func (client *DisasterRecoveryConfigsClient) listAuthorizationRulesHandleRespons // ListKeys - Gets the primary and secondary connection strings for the Namespace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - alias - The Disaster Recovery configuration name @@ -659,7 +659,7 @@ func (client *DisasterRecoveryConfigsClient) listKeysCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/eventhub/armeventhub/disasterrecoveryconfigs_client_example_test.go b/sdk/resourcemanager/eventhub/armeventhub/disasterrecoveryconfigs_client_example_test.go index e60a20fc27a1..b9ba5c8c573a 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/disasterrecoveryconfigs_client_example_test.go +++ b/sdk/resourcemanager/eventhub/armeventhub/disasterrecoveryconfigs_client_example_test.go @@ -18,133 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/disasterRecoveryConfigs/EHAliasAuthorizationRuleListAll.json -func ExampleDisasterRecoveryConfigsClient_NewListAuthorizationRulesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armeventhub.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDisasterRecoveryConfigsClient().NewListAuthorizationRulesPager("exampleResourceGroup", "sdk-Namespace-9080", "sdk-DisasterRecovery-4047", 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.AuthorizationRuleListResult = armeventhub.AuthorizationRuleListResult{ - // Value: []*armeventhub.AuthorizationRule{ - // { - // Name: to.Ptr("RootManageSharedAccessKey"), - // Type: to.Ptr("Microsoft.EventHub/Namespaces/AuthorizationRules"), - // ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.EventHub/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/RootManageSharedAccessKey"), - // Properties: &armeventhub.AuthorizationRuleProperties{ - // Rights: []*armeventhub.AccessRights{ - // to.Ptr(armeventhub.AccessRightsListen), - // to.Ptr(armeventhub.AccessRightsManage), - // to.Ptr(armeventhub.AccessRightsSend)}, - // }, - // }, - // { - // Name: to.Ptr("sdk-Authrules-1067"), - // Type: to.Ptr("Microsoft.EventHub/Namespaces/AuthorizationRules"), - // ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.EventHub/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/sdk-Authrules-1067"), - // Properties: &armeventhub.AuthorizationRuleProperties{ - // Rights: []*armeventhub.AccessRights{ - // to.Ptr(armeventhub.AccessRightsListen), - // to.Ptr(armeventhub.AccessRightsSend)}, - // }, - // }, - // { - // Name: to.Ptr("sdk-Authrules-1684"), - // Type: to.Ptr("Microsoft.EventHub/Namespaces/AuthorizationRules"), - // ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.EventHub/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/sdk-Authrules-1684"), - // Properties: &armeventhub.AuthorizationRuleProperties{ - // Rights: []*armeventhub.AccessRights{ - // to.Ptr(armeventhub.AccessRightsListen), - // to.Ptr(armeventhub.AccessRightsSend)}, - // }, - // }, - // { - // Name: to.Ptr("sdk-Authrules-4879"), - // Type: to.Ptr("Microsoft.EventHub/Namespaces/AuthorizationRules"), - // ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.EventHub/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/sdk-Authrules-4879"), - // Properties: &armeventhub.AuthorizationRuleProperties{ - // Rights: []*armeventhub.AccessRights{ - // to.Ptr(armeventhub.AccessRightsListen), - // to.Ptr(armeventhub.AccessRightsSend)}, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/disasterRecoveryConfigs/EHAliasAuthorizationRuleGet.json -func ExampleDisasterRecoveryConfigsClient_GetAuthorizationRule() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armeventhub.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDisasterRecoveryConfigsClient().GetAuthorizationRule(ctx, "exampleResourceGroup", "sdk-Namespace-9080", "sdk-DisasterRecovery-4879", "sdk-Authrules-4879", 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.AuthorizationRule = armeventhub.AuthorizationRule{ - // Name: to.Ptr("sdk-Authrules-4879"), - // Type: to.Ptr("Microsoft.EventHub/Namespaces/AuthorizationRules"), - // ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.EventHub/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/sdk-Authrules-4879"), - // Properties: &armeventhub.AuthorizationRuleProperties{ - // Rights: []*armeventhub.AccessRights{ - // to.Ptr(armeventhub.AccessRightsListen), - // to.Ptr(armeventhub.AccessRightsSend)}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/disasterRecoveryConfigs/EHAliasAuthorizationRuleListKey.json -func ExampleDisasterRecoveryConfigsClient_ListKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armeventhub.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDisasterRecoveryConfigsClient().ListKeys(ctx, "exampleResourceGroup", "sdk-Namespace-2702", "sdk-DisasterRecovery-4047", "sdk-Authrules-1746", 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.AccessKeys = armeventhub.AccessKeys{ - // AliasPrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-disasterrecovery-4047.servicebus.windows-int.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=############################################"), - // AliasSecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-disasterrecovery-4047.servicebus.windows-int.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=############################################"), - // KeyName: to.Ptr("sdk-Authrules-1746"), - // PrimaryKey: to.Ptr("############################################"), - // SecondaryKey: to.Ptr("############################################"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/disasterRecoveryConfigs/EHAliasCheckNameAvailability.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/disasterRecoveryConfigs/EHAliasCheckNameAvailability.json func ExampleDisasterRecoveryConfigsClient_CheckNameAvailability() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -171,7 +45,7 @@ func ExampleDisasterRecoveryConfigsClient_CheckNameAvailability() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/disasterRecoveryConfigs/EHAliasList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/disasterRecoveryConfigs/EHAliasList.json func ExampleDisasterRecoveryConfigsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -209,7 +83,7 @@ func ExampleDisasterRecoveryConfigsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/disasterRecoveryConfigs/EHAliasCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/disasterRecoveryConfigs/EHAliasCreate.json func ExampleDisasterRecoveryConfigsClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -243,7 +117,7 @@ func ExampleDisasterRecoveryConfigsClient_CreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/disasterRecoveryConfigs/EHAliasDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/disasterRecoveryConfigs/EHAliasDelete.json func ExampleDisasterRecoveryConfigsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -260,7 +134,7 @@ func ExampleDisasterRecoveryConfigsClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/disasterRecoveryConfigs/EHAliasGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/disasterRecoveryConfigs/EHAliasGet.json func ExampleDisasterRecoveryConfigsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -291,7 +165,7 @@ func ExampleDisasterRecoveryConfigsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/disasterRecoveryConfigs/EHAliasBreakPairing.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/disasterRecoveryConfigs/EHAliasBreakPairing.json func ExampleDisasterRecoveryConfigsClient_BreakPairing() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -308,7 +182,7 @@ func ExampleDisasterRecoveryConfigsClient_BreakPairing() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/disasterRecoveryConfigs/EHAliasFailOver.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/disasterRecoveryConfigs/EHAliasFailOver.json func ExampleDisasterRecoveryConfigsClient_FailOver() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -324,3 +198,129 @@ func ExampleDisasterRecoveryConfigsClient_FailOver() { log.Fatalf("failed to finish the request: %v", err) } } + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/disasterRecoveryConfigs/EHAliasAuthorizationRuleListAll.json +func ExampleDisasterRecoveryConfigsClient_NewListAuthorizationRulesPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armeventhub.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewDisasterRecoveryConfigsClient().NewListAuthorizationRulesPager("exampleResourceGroup", "sdk-Namespace-9080", "sdk-DisasterRecovery-4047", 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.AuthorizationRuleListResult = armeventhub.AuthorizationRuleListResult{ + // Value: []*armeventhub.AuthorizationRule{ + // { + // Name: to.Ptr("RootManageSharedAccessKey"), + // Type: to.Ptr("Microsoft.EventHub/Namespaces/AuthorizationRules"), + // ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.EventHub/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/RootManageSharedAccessKey"), + // Properties: &armeventhub.AuthorizationRuleProperties{ + // Rights: []*armeventhub.AccessRights{ + // to.Ptr(armeventhub.AccessRightsListen), + // to.Ptr(armeventhub.AccessRightsManage), + // to.Ptr(armeventhub.AccessRightsSend)}, + // }, + // }, + // { + // Name: to.Ptr("sdk-Authrules-1067"), + // Type: to.Ptr("Microsoft.EventHub/Namespaces/AuthorizationRules"), + // ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.EventHub/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/sdk-Authrules-1067"), + // Properties: &armeventhub.AuthorizationRuleProperties{ + // Rights: []*armeventhub.AccessRights{ + // to.Ptr(armeventhub.AccessRightsListen), + // to.Ptr(armeventhub.AccessRightsSend)}, + // }, + // }, + // { + // Name: to.Ptr("sdk-Authrules-1684"), + // Type: to.Ptr("Microsoft.EventHub/Namespaces/AuthorizationRules"), + // ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.EventHub/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/sdk-Authrules-1684"), + // Properties: &armeventhub.AuthorizationRuleProperties{ + // Rights: []*armeventhub.AccessRights{ + // to.Ptr(armeventhub.AccessRightsListen), + // to.Ptr(armeventhub.AccessRightsSend)}, + // }, + // }, + // { + // Name: to.Ptr("sdk-Authrules-4879"), + // Type: to.Ptr("Microsoft.EventHub/Namespaces/AuthorizationRules"), + // ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.EventHub/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/sdk-Authrules-4879"), + // Properties: &armeventhub.AuthorizationRuleProperties{ + // Rights: []*armeventhub.AccessRights{ + // to.Ptr(armeventhub.AccessRightsListen), + // to.Ptr(armeventhub.AccessRightsSend)}, + // }, + // }}, + // } + } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/disasterRecoveryConfigs/EHAliasAuthorizationRuleGet.json +func ExampleDisasterRecoveryConfigsClient_GetAuthorizationRule() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armeventhub.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewDisasterRecoveryConfigsClient().GetAuthorizationRule(ctx, "exampleResourceGroup", "sdk-Namespace-9080", "sdk-DisasterRecovery-4879", "sdk-Authrules-4879", 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.AuthorizationRule = armeventhub.AuthorizationRule{ + // Name: to.Ptr("sdk-Authrules-4879"), + // Type: to.Ptr("Microsoft.EventHub/Namespaces/AuthorizationRules"), + // ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.EventHub/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/sdk-Authrules-4879"), + // Properties: &armeventhub.AuthorizationRuleProperties{ + // Rights: []*armeventhub.AccessRights{ + // to.Ptr(armeventhub.AccessRightsListen), + // to.Ptr(armeventhub.AccessRightsSend)}, + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/disasterRecoveryConfigs/EHAliasAuthorizationRuleListKey.json +func ExampleDisasterRecoveryConfigsClient_ListKeys() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armeventhub.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewDisasterRecoveryConfigsClient().ListKeys(ctx, "exampleResourceGroup", "sdk-Namespace-2702", "sdk-DisasterRecovery-4047", "sdk-Authrules-1746", 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.AccessKeys = armeventhub.AccessKeys{ + // AliasPrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-disasterrecovery-4047.servicebus.windows-int.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=############################################"), + // AliasSecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-disasterrecovery-4047.servicebus.windows-int.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=############################################"), + // KeyName: to.Ptr("sdk-Authrules-1746"), + // PrimaryKey: to.Ptr("############################################"), + // SecondaryKey: to.Ptr("############################################"), + // } +} diff --git a/sdk/resourcemanager/eventhub/armeventhub/eventhub_live_test.go b/sdk/resourcemanager/eventhub/armeventhub/eventhub_live_test.go index 15e2d94c968f..c69fa9f2207c 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/eventhub_live_test.go +++ b/sdk/resourcemanager/eventhub/armeventhub/eventhub_live_test.go @@ -392,58 +392,58 @@ func (testsuite *EventhubTestSuite) TestConsumergroups() { } // Microsoft.EventHub/namespaces/applicationGroups -func (testsuite *EventhubTestSuite) TestApplicationgroup() { - var err error - // From step ApplicationGroup_CreateOrUpdateApplicationGroup - fmt.Println("Call operation: ApplicationGroup_CreateOrUpdateApplicationGroup") - applicationGroupClient, err := armeventhub.NewApplicationGroupClient(testsuite.subscriptionId, testsuite.cred, testsuite.options) - testsuite.Require().NoError(err) - _, err = applicationGroupClient.CreateOrUpdateApplicationGroup(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.applicationGroupName, armeventhub.ApplicationGroup{ - Properties: &armeventhub.ApplicationGroupProperties{ - ClientAppGroupIdentifier: to.Ptr("SASKeyName=KeyName"), - IsEnabled: to.Ptr(true), - Policies: []armeventhub.ApplicationGroupPolicyClassification{ - &armeventhub.ThrottlingPolicy{ - Name: to.Ptr("ThrottlingPolicy1"), - Type: to.Ptr(armeventhub.ApplicationGroupPolicyTypeThrottlingPolicy), - MetricID: to.Ptr(armeventhub.MetricIDIncomingMessages), - RateLimitThreshold: to.Ptr[int64](7912), - }, - &armeventhub.ThrottlingPolicy{ - Name: to.Ptr("ThrottlingPolicy2"), - Type: to.Ptr(armeventhub.ApplicationGroupPolicyTypeThrottlingPolicy), - MetricID: to.Ptr(armeventhub.MetricIDIncomingBytes), - RateLimitThreshold: to.Ptr[int64](3951729), - }, - &armeventhub.ThrottlingPolicy{ - Name: to.Ptr("ThrottlingPolicy3"), - Type: to.Ptr(armeventhub.ApplicationGroupPolicyTypeThrottlingPolicy), - MetricID: to.Ptr(armeventhub.MetricIDOutgoingBytes), - RateLimitThreshold: to.Ptr[int64](245175), - }}, - }, - }, nil) - testsuite.Require().NoError(err) - - // From step ApplicationGroup_ListByNamespace - fmt.Println("Call operation: ApplicationGroup_ListByNamespace") - applicationGroupClientNewListByNamespacePager := applicationGroupClient.NewListByNamespacePager(testsuite.resourceGroupName, testsuite.namespaceName, nil) - for applicationGroupClientNewListByNamespacePager.More() { - _, err := applicationGroupClientNewListByNamespacePager.NextPage(testsuite.ctx) - testsuite.Require().NoError(err) - break - } - - // From step ApplicationGroup_Get - fmt.Println("Call operation: ApplicationGroup_Get") - _, err = applicationGroupClient.Get(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.applicationGroupName, nil) - testsuite.Require().NoError(err) - - // From step ApplicationGroup_Delete - fmt.Println("Call operation: ApplicationGroup_Delete") - _, err = applicationGroupClient.Delete(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.applicationGroupName, nil) - testsuite.Require().NoError(err) -} +//func (testsuite *EventhubTestSuite) TestApplicationgroup() { +// var err error +// // From step ApplicationGroup_CreateOrUpdateApplicationGroup +// fmt.Println("Call operation: ApplicationGroup_CreateOrUpdateApplicationGroup") +// applicationGroupClient, err := armeventhub.NewApplicationGroupClient(testsuite.subscriptionId, testsuite.cred, testsuite.options) +// testsuite.Require().NoError(err) +// _, err = applicationGroupClient.CreateOrUpdateApplicationGroup(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.applicationGroupName, armeventhub.ApplicationGroup{ +// Properties: &armeventhub.ApplicationGroupProperties{ +// ClientAppGroupIdentifier: to.Ptr("SASKeyName=KeyName"), +// IsEnabled: to.Ptr(true), +// Policies: []armeventhub.ApplicationGroupPolicyClassification{ +// &armeventhub.ThrottlingPolicy{ +// Name: to.Ptr("ThrottlingPolicy1"), +// Type: to.Ptr(armeventhub.ApplicationGroupPolicyTypeThrottlingPolicy), +// MetricID: to.Ptr(armeventhub.MetricIDIncomingMessages), +// RateLimitThreshold: to.Ptr[int64](7912), +// }, +// &armeventhub.ThrottlingPolicy{ +// Name: to.Ptr("ThrottlingPolicy2"), +// Type: to.Ptr(armeventhub.ApplicationGroupPolicyTypeThrottlingPolicy), +// MetricID: to.Ptr(armeventhub.MetricIDIncomingBytes), +// RateLimitThreshold: to.Ptr[int64](3951729), +// }, +// &armeventhub.ThrottlingPolicy{ +// Name: to.Ptr("ThrottlingPolicy3"), +// Type: to.Ptr(armeventhub.ApplicationGroupPolicyTypeThrottlingPolicy), +// MetricID: to.Ptr(armeventhub.MetricIDOutgoingBytes), +// RateLimitThreshold: to.Ptr[int64](245175), +// }}, +// }, +// }, nil) +// testsuite.Require().NoError(err) +// +// // From step ApplicationGroup_ListByNamespace +// fmt.Println("Call operation: ApplicationGroup_ListByNamespace") +// applicationGroupClientNewListByNamespacePager := applicationGroupClient.NewListByNamespacePager(testsuite.resourceGroupName, testsuite.namespaceName, nil) +// for applicationGroupClientNewListByNamespacePager.More() { +// _, err := applicationGroupClientNewListByNamespacePager.NextPage(testsuite.ctx) +// testsuite.Require().NoError(err) +// break +// } +// +// // From step ApplicationGroup_Get +// fmt.Println("Call operation: ApplicationGroup_Get") +// _, err = applicationGroupClient.Get(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.applicationGroupName, nil) +// testsuite.Require().NoError(err) +// +// // From step ApplicationGroup_Delete +// fmt.Println("Call operation: ApplicationGroup_Delete") +// _, err = applicationGroupClient.Delete(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.applicationGroupName, nil) +// testsuite.Require().NoError(err) +//} // Microsoft.EventHub/namespaces/schemagroups func (testsuite *EventhubTestSuite) TestSchemaregistry() { diff --git a/sdk/resourcemanager/eventhub/armeventhub/eventhubs_client.go b/sdk/resourcemanager/eventhub/armeventhub/eventhubs_client.go index 2b17389b4e02..1907be78423b 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/eventhubs_client.go +++ b/sdk/resourcemanager/eventhub/armeventhub/eventhubs_client.go @@ -49,7 +49,7 @@ func NewEventHubsClient(subscriptionID string, credential azcore.TokenCredential // CreateOrUpdate - Creates or updates a new Event Hub as a nested resource within a Namespace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - eventHubName - The Event Hub name @@ -95,7 +95,7 @@ func (client *EventHubsClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -114,7 +114,7 @@ func (client *EventHubsClient) createOrUpdateHandleResponse(resp *http.Response) // of the AuthorizationRule will take a few seconds to take effect. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - eventHubName - The Event Hub name @@ -165,7 +165,7 @@ func (client *EventHubsClient) createOrUpdateAuthorizationRuleCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -183,7 +183,7 @@ func (client *EventHubsClient) createOrUpdateAuthorizationRuleHandleResponse(res // Delete - Deletes an Event Hub from the specified Namespace and resource group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - eventHubName - The Event Hub name @@ -227,7 +227,7 @@ func (client *EventHubsClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -236,7 +236,7 @@ func (client *EventHubsClient) deleteCreateRequest(ctx context.Context, resource // DeleteAuthorizationRule - Deletes an Event Hub AuthorizationRule. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - eventHubName - The Event Hub name @@ -286,7 +286,7 @@ func (client *EventHubsClient) deleteAuthorizationRuleCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -295,7 +295,7 @@ func (client *EventHubsClient) deleteAuthorizationRuleCreateRequest(ctx context. // Get - Gets an Event Hubs description for the specified Event Hub. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - eventHubName - The Event Hub name @@ -339,7 +339,7 @@ func (client *EventHubsClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -357,7 +357,7 @@ func (client *EventHubsClient) getHandleResponse(resp *http.Response) (EventHubs // GetAuthorizationRule - Gets an AuthorizationRule for an Event Hub by rule name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - eventHubName - The Event Hub name @@ -407,7 +407,7 @@ func (client *EventHubsClient) getAuthorizationRuleCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -424,7 +424,7 @@ func (client *EventHubsClient) getAuthorizationRuleHandleResponse(resp *http.Res // NewListAuthorizationRulesPager - Gets the authorization rules for an Event Hub. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - eventHubName - The Event Hub name @@ -482,7 +482,7 @@ func (client *EventHubsClient) listAuthorizationRulesCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -499,7 +499,7 @@ func (client *EventHubsClient) listAuthorizationRulesHandleResponse(resp *http.R // NewListByNamespacePager - Gets all the Event Hubs in a Namespace. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - options - EventHubsClientListByNamespaceOptions contains the optional parameters for the EventHubsClient.NewListByNamespacePager @@ -552,7 +552,7 @@ func (client *EventHubsClient) listByNamespaceCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } @@ -576,7 +576,7 @@ func (client *EventHubsClient) listByNamespaceHandleResponse(resp *http.Response // ListKeys - Gets the ACS and SAS connection strings for the Event Hub. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - eventHubName - The Event Hub name @@ -625,7 +625,7 @@ func (client *EventHubsClient) listKeysCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -643,7 +643,7 @@ func (client *EventHubsClient) listKeysHandleResponse(resp *http.Response) (Even // RegenerateKeys - Regenerates the ACS and SAS connection strings for the Event Hub. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - eventHubName - The Event Hub name @@ -694,7 +694,7 @@ func (client *EventHubsClient) regenerateKeysCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/eventhub/armeventhub/eventhubs_client_example_test.go b/sdk/resourcemanager/eventhub/armeventhub/eventhubs_client_example_test.go index 22936bd308ce..2b39609604c6 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/eventhubs_client_example_test.go +++ b/sdk/resourcemanager/eventhub/armeventhub/eventhubs_client_example_test.go @@ -18,184 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/EventHubs/EHEventHubAuthorizationRuleListAll.json -func ExampleEventHubsClient_NewListAuthorizationRulesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armeventhub.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEventHubsClient().NewListAuthorizationRulesPager("ArunMonocle", "sdk-Namespace-960", "sdk-EventHub-532", 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.AuthorizationRuleListResult = armeventhub.AuthorizationRuleListResult{ - // Value: []*armeventhub.AuthorizationRule{ - // { - // Name: to.Ptr("sdk-Authrules-2513"), - // Type: to.Ptr("Microsoft.EventHub/Namespaces/EventHubs/AuthorizationRules"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.EventHub/namespaces/sdk-Namespace-960/eventhubs/sdk-EventHub-532/authorizationRules/sdk-Authrules-2513"), - // Properties: &armeventhub.AuthorizationRuleProperties{ - // Rights: []*armeventhub.AccessRights{ - // to.Ptr(armeventhub.AccessRightsListen), - // to.Ptr(armeventhub.AccessRightsSend)}, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/EventHubs/EHEventHubAuthorizationRuleCreate.json -func ExampleEventHubsClient_CreateOrUpdateAuthorizationRule() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armeventhub.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEventHubsClient().CreateOrUpdateAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-960", "sdk-EventHub-532", "sdk-Authrules-2513", armeventhub.AuthorizationRule{ - Properties: &armeventhub.AuthorizationRuleProperties{ - Rights: []*armeventhub.AccessRights{ - to.Ptr(armeventhub.AccessRightsListen), - to.Ptr(armeventhub.AccessRightsSend)}, - }, - }, 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.AuthorizationRule = armeventhub.AuthorizationRule{ - // Name: to.Ptr("sdk-Authrules-2513"), - // Type: to.Ptr("Microsoft.EventHub/Namespaces/EventHubs/AuthorizationRules"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.EventHub/namespaces/sdk-Namespace-960/eventhubs/sdk-EventHub-532/authorizationRules/sdk-Authrules-2513"), - // Properties: &armeventhub.AuthorizationRuleProperties{ - // Rights: []*armeventhub.AccessRights{ - // to.Ptr(armeventhub.AccessRightsListen), - // to.Ptr(armeventhub.AccessRightsSend)}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/EventHubs/EHEventHubAuthorizationRuleGet.json -func ExampleEventHubsClient_GetAuthorizationRule() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armeventhub.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEventHubsClient().GetAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-960", "sdk-EventHub-532", "sdk-Authrules-2513", 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.AuthorizationRule = armeventhub.AuthorizationRule{ - // Name: to.Ptr("sdk-Authrules-2513"), - // Type: to.Ptr("Microsoft.EventHub/Namespaces/EventHubs/AuthorizationRules"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.EventHub/namespaces/sdk-Namespace-960/eventhubs/sdk-EventHub-532/authorizationRules/sdk-Authrules-2513"), - // Properties: &armeventhub.AuthorizationRuleProperties{ - // Rights: []*armeventhub.AccessRights{ - // to.Ptr(armeventhub.AccessRightsListen), - // to.Ptr(armeventhub.AccessRightsSend)}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/EventHubs/EHEventHubAuthorizationRuleDelete.json -func ExampleEventHubsClient_DeleteAuthorizationRule() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armeventhub.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewEventHubsClient().DeleteAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-960", "sdk-EventHub-532", "sdk-Authrules-2513", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/EventHubs/EHEventHubAuthorizationRuleListKey.json -func ExampleEventHubsClient_ListKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armeventhub.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEventHubsClient().ListKeys(ctx, "ArunMonocle", "sdk-namespace-960", "sdk-EventHub-532", "sdk-Authrules-2513", 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.AccessKeys = armeventhub.AccessKeys{ - // KeyName: to.Ptr("sdk-Authrules-2513"), - // PrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-960.servicebus.windows-int.net/;SharedAccessKeyName=sdk-Authrules-2513;SharedAccessKey=############################################;EntityPath=sdk-EventHub-532"), - // PrimaryKey: to.Ptr("############################################"), - // SecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-960.servicebus.windows-int.net/;SharedAccessKeyName=sdk-Authrules-2513;SharedAccessKey=############################################;EntityPath=sdk-EventHub-532"), - // SecondaryKey: to.Ptr("############################################"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/EventHubs/EHEventHubAuthorizationRuleRegenerateKey.json -func ExampleEventHubsClient_RegenerateKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armeventhub.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEventHubsClient().RegenerateKeys(ctx, "ArunMonocle", "sdk-namespace-960", "sdk-EventHub-532", "sdk-Authrules-1534", armeventhub.RegenerateAccessKeyParameters{ - KeyType: to.Ptr(armeventhub.KeyTypePrimaryKey), - }, 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.AccessKeys = armeventhub.AccessKeys{ - // KeyName: to.Ptr("sdk-Authrules-1534"), - // PrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-9027.servicebus.windows-int.net/;SharedAccessKeyName=sdk-Authrules-1534;SharedAccessKey=#############################################;EntityPath=sdk-EventHub-1647"), - // PrimaryKey: to.Ptr("#############################################"), - // SecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-9027.servicebus.windows-int.net/;SharedAccessKeyName=sdk-Authrules-1534;SharedAccessKey=#############################################;EntityPath=sdk-EventHub-1647"), - // SecondaryKey: to.Ptr("#############################################"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/EventHubs/EHEventHubListByNameSpace.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/EventHubs/EHEventHubListByNameSpace.json func ExampleEventHubsClient_NewListByNamespacePager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -256,7 +79,7 @@ func ExampleEventHubsClient_NewListByNamespacePager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/EventHubs/EHEventHubCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/EventHubs/EHEventHubCreate.json func ExampleEventHubsClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -327,7 +150,7 @@ func ExampleEventHubsClient_CreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/EventHubs/EHEventHubDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/EventHubs/EHEventHubDelete.json func ExampleEventHubsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -344,7 +167,7 @@ func ExampleEventHubsClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/EventHubs/EHEventHubGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/EventHubs/EHEventHubGet.json func ExampleEventHubsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -394,3 +217,180 @@ func ExampleEventHubsClient_Get() { // }, // } } + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/EventHubs/EHEventHubAuthorizationRuleListAll.json +func ExampleEventHubsClient_NewListAuthorizationRulesPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armeventhub.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewEventHubsClient().NewListAuthorizationRulesPager("ArunMonocle", "sdk-Namespace-960", "sdk-EventHub-532", 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.AuthorizationRuleListResult = armeventhub.AuthorizationRuleListResult{ + // Value: []*armeventhub.AuthorizationRule{ + // { + // Name: to.Ptr("sdk-Authrules-2513"), + // Type: to.Ptr("Microsoft.EventHub/Namespaces/EventHubs/AuthorizationRules"), + // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.EventHub/namespaces/sdk-Namespace-960/eventhubs/sdk-EventHub-532/authorizationRules/sdk-Authrules-2513"), + // Properties: &armeventhub.AuthorizationRuleProperties{ + // Rights: []*armeventhub.AccessRights{ + // to.Ptr(armeventhub.AccessRightsListen), + // to.Ptr(armeventhub.AccessRightsSend)}, + // }, + // }}, + // } + } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/EventHubs/EHEventHubAuthorizationRuleCreate.json +func ExampleEventHubsClient_CreateOrUpdateAuthorizationRule() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armeventhub.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewEventHubsClient().CreateOrUpdateAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-960", "sdk-EventHub-532", "sdk-Authrules-2513", armeventhub.AuthorizationRule{ + Properties: &armeventhub.AuthorizationRuleProperties{ + Rights: []*armeventhub.AccessRights{ + to.Ptr(armeventhub.AccessRightsListen), + to.Ptr(armeventhub.AccessRightsSend)}, + }, + }, 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.AuthorizationRule = armeventhub.AuthorizationRule{ + // Name: to.Ptr("sdk-Authrules-2513"), + // Type: to.Ptr("Microsoft.EventHub/Namespaces/EventHubs/AuthorizationRules"), + // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.EventHub/namespaces/sdk-Namespace-960/eventhubs/sdk-EventHub-532/authorizationRules/sdk-Authrules-2513"), + // Properties: &armeventhub.AuthorizationRuleProperties{ + // Rights: []*armeventhub.AccessRights{ + // to.Ptr(armeventhub.AccessRightsListen), + // to.Ptr(armeventhub.AccessRightsSend)}, + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/EventHubs/EHEventHubAuthorizationRuleGet.json +func ExampleEventHubsClient_GetAuthorizationRule() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armeventhub.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewEventHubsClient().GetAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-960", "sdk-EventHub-532", "sdk-Authrules-2513", 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.AuthorizationRule = armeventhub.AuthorizationRule{ + // Name: to.Ptr("sdk-Authrules-2513"), + // Type: to.Ptr("Microsoft.EventHub/Namespaces/EventHubs/AuthorizationRules"), + // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.EventHub/namespaces/sdk-Namespace-960/eventhubs/sdk-EventHub-532/authorizationRules/sdk-Authrules-2513"), + // Properties: &armeventhub.AuthorizationRuleProperties{ + // Rights: []*armeventhub.AccessRights{ + // to.Ptr(armeventhub.AccessRightsListen), + // to.Ptr(armeventhub.AccessRightsSend)}, + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/EventHubs/EHEventHubAuthorizationRuleDelete.json +func ExampleEventHubsClient_DeleteAuthorizationRule() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armeventhub.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + _, err = clientFactory.NewEventHubsClient().DeleteAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-960", "sdk-EventHub-532", "sdk-Authrules-2513", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/EventHubs/EHEventHubAuthorizationRuleListKey.json +func ExampleEventHubsClient_ListKeys() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armeventhub.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewEventHubsClient().ListKeys(ctx, "ArunMonocle", "sdk-namespace-960", "sdk-EventHub-532", "sdk-Authrules-2513", 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.AccessKeys = armeventhub.AccessKeys{ + // KeyName: to.Ptr("sdk-Authrules-2513"), + // PrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-960.servicebus.windows-int.net/;SharedAccessKeyName=sdk-Authrules-2513;SharedAccessKey=############################################;EntityPath=sdk-EventHub-532"), + // PrimaryKey: to.Ptr("############################################"), + // SecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-960.servicebus.windows-int.net/;SharedAccessKeyName=sdk-Authrules-2513;SharedAccessKey=############################################;EntityPath=sdk-EventHub-532"), + // SecondaryKey: to.Ptr("############################################"), + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/EventHubs/EHEventHubAuthorizationRuleRegenerateKey.json +func ExampleEventHubsClient_RegenerateKeys() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armeventhub.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewEventHubsClient().RegenerateKeys(ctx, "ArunMonocle", "sdk-namespace-960", "sdk-EventHub-532", "sdk-Authrules-1534", armeventhub.RegenerateAccessKeyParameters{ + KeyType: to.Ptr(armeventhub.KeyTypePrimaryKey), + }, 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.AccessKeys = armeventhub.AccessKeys{ + // KeyName: to.Ptr("sdk-Authrules-1534"), + // PrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-9027.servicebus.windows-int.net/;SharedAccessKeyName=sdk-Authrules-1534;SharedAccessKey=#############################################;EntityPath=sdk-EventHub-1647"), + // PrimaryKey: to.Ptr("#############################################"), + // SecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-9027.servicebus.windows-int.net/;SharedAccessKeyName=sdk-Authrules-1534;SharedAccessKey=#############################################;EntityPath=sdk-EventHub-1647"), + // SecondaryKey: to.Ptr("#############################################"), + // } +} diff --git a/sdk/resourcemanager/eventhub/armeventhub/models.go b/sdk/resourcemanager/eventhub/armeventhub/models.go index aa121fea2606..e2eecbc75836 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/models.go +++ b/sdk/resourcemanager/eventhub/armeventhub/models.go @@ -35,92 +35,6 @@ type AccessKeys struct { SecondaryKey *string `json:"secondaryKey,omitempty" azure:"ro"` } -// ApplicationGroup - The Application Group object -type ApplicationGroup struct { - Properties *ApplicationGroupProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The geo-location where the resource lives - Location *string `json:"location,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system meta data relating to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGroupClientCreateOrUpdateApplicationGroupOptions contains the optional parameters for the ApplicationGroupClient.CreateOrUpdateApplicationGroup -// method. -type ApplicationGroupClientCreateOrUpdateApplicationGroupOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGroupClientDeleteOptions contains the optional parameters for the ApplicationGroupClient.Delete method. -type ApplicationGroupClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGroupClientGetOptions contains the optional parameters for the ApplicationGroupClient.Get method. -type ApplicationGroupClientGetOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGroupClientListByNamespaceOptions contains the optional parameters for the ApplicationGroupClient.NewListByNamespacePager -// method. -type ApplicationGroupClientListByNamespaceOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGroupListResult - The response from the List Application Groups operation. -type ApplicationGroupListResult struct { - // Result of the List Application Groups operation. - Value []*ApplicationGroup `json:"value,omitempty"` - - // READ-ONLY; Link to the next set of results. Not empty if Value contains an incomplete list of Authorization Rules - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// ApplicationGroupPolicyClassification provides polymorphic access to related types. -// Call the interface's GetApplicationGroupPolicy() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ApplicationGroupPolicy, *ThrottlingPolicy -type ApplicationGroupPolicyClassification interface { - // GetApplicationGroupPolicy returns the ApplicationGroupPolicy content of the underlying type. - GetApplicationGroupPolicy() *ApplicationGroupPolicy -} - -// ApplicationGroupPolicy - Properties of the Application Group policy -type ApplicationGroupPolicy struct { - // REQUIRED; The Name of this policy - Name *string `json:"name,omitempty"` - - // REQUIRED; Application Group Policy types - Type *ApplicationGroupPolicyType `json:"type,omitempty"` -} - -// GetApplicationGroupPolicy implements the ApplicationGroupPolicyClassification interface for type ApplicationGroupPolicy. -func (a *ApplicationGroupPolicy) GetApplicationGroupPolicy() *ApplicationGroupPolicy { return a } - -type ApplicationGroupProperties struct { - // REQUIRED; The Unique identifier for application group.Supports SAS(SASKeyName=KeyName) or AAD(AADAppID=Guid) - ClientAppGroupIdentifier *string `json:"clientAppGroupIdentifier,omitempty"` - - // Determines if Application Group is allowed to create connection with namespace or not. Once the isEnabled is set to false, - // all the existing connections of application group gets dropped and no new - // connections will be allowed - IsEnabled *bool `json:"isEnabled,omitempty"` - - // List of group policies that define the behavior of application group. The policies can support resource governance scenarios - // such as limiting ingress or egress traffic. - Policies []ApplicationGroupPolicyClassification `json:"policies,omitempty"` -} - // ArmDisasterRecovery - Single item in List or Get Alias(Disaster Recovery configuration) operation type ArmDisasterRecovery struct { // Properties required to the Create Or Update Alias(Disaster Recovery configurations) @@ -298,9 +212,6 @@ type ClusterListResult struct { // ClusterProperties - Event Hubs Cluster properties supplied in responses in List or Get operations. type ClusterProperties struct { - // A value that indicates whether Scaling is Supported. - SupportsScaling *bool `json:"supportsScaling,omitempty"` - // READ-ONLY; The UTC time when the Event Hubs Cluster was created. CreatedAt *string `json:"createdAt,omitempty" azure:"ro"` @@ -632,15 +543,9 @@ type EHNamespaceProperties struct { // AutoInflateEnabled = true) MaximumThroughputUnits *int32 `json:"maximumThroughputUnits,omitempty"` - // The minimum TLS version for the cluster to support, e.g. '1.2' - MinimumTLSVersion *TLSVersion `json:"minimumTlsVersion,omitempty"` - // List of private endpoint connections. PrivateEndpointConnections []*PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - // This determines if traffic is allowed over public network. By default it is enabled. - PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` - // Enabling this property creates a Standard Event Hubs Namespace in regions supported availability zones. ZoneRedundant *bool `json:"zoneRedundant,omitempty"` @@ -975,9 +880,7 @@ type NetworkRuleSetProperties struct { // List of IpRules IPRules []*NWRuleSetIPRules `json:"ipRules,omitempty"` - // This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then - // Inbound and Outbound communication is controlled by the network security - // perimeter and profile's access rules. + // This determines if traffic is allowed over public network. By default it is enabled. PublicNetworkAccess *PublicNetworkAccessFlag `json:"publicNetworkAccess,omitempty"` // Value that indicates whether Trusted Service Access is Enabled or not. @@ -987,136 +890,6 @@ type NetworkRuleSetProperties struct { VirtualNetworkRules []*NWRuleSetVirtualNetworkRules `json:"virtualNetworkRules,omitempty"` } -// NetworkSecurityPerimeter related information -type NetworkSecurityPerimeter struct { - // Fully qualified identifier of the resource - ID *string `json:"id,omitempty"` - - // Location of the resource - Location *string `json:"location,omitempty"` - - // Guid of the resource - PerimeterGUID *string `json:"perimeterGuid,omitempty"` -} - -// NetworkSecurityPerimeterConfiguration - Network Security Perimeter related configurations of a given namespace -type NetworkSecurityPerimeterConfiguration struct { - // Resource location. - Location *string `json:"location,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Properties of the Network Security Perimeter Configuration - Properties *NetworkSecurityPerimeterConfigurationProperties `json:"properties,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// NetworkSecurityPerimeterConfigurationClientListOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationClient.List -// method. -type NetworkSecurityPerimeterConfigurationClientListOptions struct { - // placeholder for future optional parameters -} - -// NetworkSecurityPerimeterConfigurationList - Result of the List NetworkSecurityPerimeterConfiguration operation. -type NetworkSecurityPerimeterConfigurationList struct { - // READ-ONLY; A collection of NetworkSecurityPerimeterConfigurations - Value []*NetworkSecurityPerimeterConfiguration `json:"value,omitempty" azure:"ro"` -} - -// NetworkSecurityPerimeterConfigurationProperties - Properties of NetworkSecurityPerimeterConfiguration -type NetworkSecurityPerimeterConfigurationProperties struct { - // List of Provisioning Issues if any - ProvisioningIssues []*ProvisioningIssue `json:"provisioningIssues,omitempty"` - - // Provisioning state of NetworkSecurityPerimeter configuration propagation - ProvisioningState *NetworkSecurityPerimeterConfigurationProvisioningState `json:"provisioningState,omitempty"` - - // READ-ONLY; NetworkSecurityPerimeter related information - NetworkSecurityPerimeter *NetworkSecurityPerimeter `json:"networkSecurityPerimeter,omitempty" azure:"ro"` - - // READ-ONLY; Information about current network profile - Profile *NetworkSecurityPerimeterConfigurationPropertiesProfile `json:"profile,omitempty" azure:"ro"` - - // READ-ONLY; Information about resource association - ResourceAssociation *NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation `json:"resourceAssociation,omitempty" azure:"ro"` -} - -// NetworkSecurityPerimeterConfigurationPropertiesProfile - Information about current network profile -type NetworkSecurityPerimeterConfigurationPropertiesProfile struct { - // List of Access Rules - AccessRules []*NspAccessRule `json:"accessRules,omitempty"` - - // Current access rules version - AccessRulesVersion *string `json:"accessRulesVersion,omitempty"` - - // Name of the resource - Name *string `json:"name,omitempty"` -} - -// NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation - Information about resource association -type NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation struct { - // Access Mode of the resource association - AccessMode *ResourceAssociationAccessMode `json:"accessMode,omitempty"` - - // Name of the resource association - Name *string `json:"name,omitempty"` -} - -// NetworkSecurityPerimeterConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationsClient.BeginCreateOrUpdate -// method. -type NetworkSecurityPerimeterConfigurationsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// NspAccessRule - Information of Access Rule in Network Profile -type NspAccessRule struct { - // Fully qualified identifier of the resource - ID *string `json:"id,omitempty"` - - // Name of the resource - Name *string `json:"name,omitempty"` - - // Type of the resource - Type *string `json:"type,omitempty"` - - // READ-ONLY; Properties of Access Rule - Properties *NspAccessRuleProperties `json:"properties,omitempty" azure:"ro"` -} - -// NspAccessRuleProperties - Properties of Access Rule -type NspAccessRuleProperties struct { - // Address prefixes in the CIDR format for inbound rules - AddressPrefixes []*string `json:"addressPrefixes,omitempty"` - - // Direction of Access Rule - Direction *NspAccessRuleDirection `json:"direction,omitempty"` - - // Subscriptions for inbound rules - Subscriptions []*NspAccessRulePropertiesSubscriptionsItem `json:"subscriptions,omitempty"` - - // READ-ONLY; FQDN for outbound rules - FullyQualifiedDomainNames []*string `json:"fullyQualifiedDomainNames,omitempty" azure:"ro"` - - // READ-ONLY; NetworkSecurityPerimeters for inbound rules - NetworkSecurityPerimeters []*NetworkSecurityPerimeter `json:"networkSecurityPerimeters,omitempty" azure:"ro"` -} - -// NspAccessRulePropertiesSubscriptionsItem - Subscription for inbound rule -type NspAccessRulePropertiesSubscriptionsItem struct { - // Fully qualified identifier of subscription - ID *string `json:"id,omitempty"` -} - // Operation - A Event Hub REST API operation type Operation struct { // Display of the operation @@ -1303,24 +1076,6 @@ type Properties struct { UpdatedAt *time.Time `json:"updatedAt,omitempty" azure:"ro"` } -// ProvisioningIssue - Describes Provisioning issue for given NetworkSecurityPerimeterConfiguration -type ProvisioningIssue struct { - // Name of the issue - Name *string `json:"name,omitempty"` - - // READ-ONLY; Properties of Provisioning Issue - Properties *ProvisioningIssueProperties `json:"properties,omitempty" azure:"ro"` -} - -// ProvisioningIssueProperties - Properties of Provisioning Issue -type ProvisioningIssueProperties struct { - // Description of the issue - Description *string `json:"description,omitempty"` - - // Type of Issue - IssueType *string `json:"issueType,omitempty"` -} - // ProxyResource - Common fields that are returned in the response for all Azure Resource Manager resources type ProxyResource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} @@ -1470,30 +1225,6 @@ type SystemData struct { LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` } -// ThrottlingPolicy - Properties of the throttling policy -type ThrottlingPolicy struct { - // REQUIRED; Metric Id on which the throttle limit should be set, MetricId can be discovered by hovering over Metric in the - // Metrics section of Event Hub Namespace inside Azure Portal - MetricID *MetricID `json:"metricId,omitempty"` - - // REQUIRED; The Name of this policy - Name *string `json:"name,omitempty"` - - // REQUIRED; The Threshold limit above which the application group will be throttled.Rate limit is always per second. - RateLimitThreshold *int64 `json:"rateLimitThreshold,omitempty"` - - // REQUIRED; Application Group Policy types - Type *ApplicationGroupPolicyType `json:"type,omitempty"` -} - -// GetApplicationGroupPolicy implements the ApplicationGroupPolicyClassification interface for type ThrottlingPolicy. -func (t *ThrottlingPolicy) GetApplicationGroupPolicy() *ApplicationGroupPolicy { - return &ApplicationGroupPolicy{ - Name: t.Name, - Type: t.Type, - } -} - // TrackedResource - Definition of resource. type TrackedResource struct { // Resource location. diff --git a/sdk/resourcemanager/eventhub/armeventhub/models_serde.go b/sdk/resourcemanager/eventhub/armeventhub/models_serde.go index 1b0a9ff44210..df5ba7be95a4 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/models_serde.go +++ b/sdk/resourcemanager/eventhub/armeventhub/models_serde.go @@ -67,150 +67,6 @@ func (a *AccessKeys) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGroup. -func (a ApplicationGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "systemData", a.SystemData) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGroup. -func (a *ApplicationGroup) 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", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &a.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGroupListResult. -func (a ApplicationGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGroupListResult. -func (a *ApplicationGroupListResult) 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", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGroupPolicy. -func (a ApplicationGroupPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", a.Name) - objectMap["type"] = a.Type - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGroupPolicy. -func (a *ApplicationGroupPolicy) 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", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGroupProperties. -func (a ApplicationGroupProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "clientAppGroupIdentifier", a.ClientAppGroupIdentifier) - populate(objectMap, "isEnabled", a.IsEnabled) - populate(objectMap, "policies", a.Policies) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGroupProperties. -func (a *ApplicationGroupProperties) 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", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "clientAppGroupIdentifier": - err = unpopulate(val, "ClientAppGroupIdentifier", &a.ClientAppGroupIdentifier) - delete(rawMsg, key) - case "isEnabled": - err = unpopulate(val, "IsEnabled", &a.IsEnabled) - delete(rawMsg, key) - case "policies": - a.Policies, err = unmarshalApplicationGroupPolicyClassificationArray(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type ArmDisasterRecovery. func (a ArmDisasterRecovery) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -692,7 +548,6 @@ func (c ClusterProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "createdAt", c.CreatedAt) populate(objectMap, "metricId", c.MetricID) populate(objectMap, "status", c.Status) - populate(objectMap, "supportsScaling", c.SupportsScaling) populate(objectMap, "updatedAt", c.UpdatedAt) return json.Marshal(objectMap) } @@ -715,9 +570,6 @@ func (c *ClusterProperties) UnmarshalJSON(data []byte) error { case "status": err = unpopulate(val, "Status", &c.Status) delete(rawMsg, key) - case "supportsScaling": - err = unpopulate(val, "SupportsScaling", &c.SupportsScaling) - delete(rawMsg, key) case "updatedAt": err = unpopulate(val, "UpdatedAt", &c.UpdatedAt) delete(rawMsg, key) @@ -1165,10 +1017,8 @@ func (e EHNamespaceProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "kafkaEnabled", e.KafkaEnabled) populate(objectMap, "maximumThroughputUnits", e.MaximumThroughputUnits) populate(objectMap, "metricId", e.MetricID) - populate(objectMap, "minimumTlsVersion", e.MinimumTLSVersion) populate(objectMap, "privateEndpointConnections", e.PrivateEndpointConnections) populate(objectMap, "provisioningState", e.ProvisioningState) - populate(objectMap, "publicNetworkAccess", e.PublicNetworkAccess) populate(objectMap, "serviceBusEndpoint", e.ServiceBusEndpoint) populate(objectMap, "status", e.Status) populateTimeRFC3339(objectMap, "updatedAt", e.UpdatedAt) @@ -1212,18 +1062,12 @@ func (e *EHNamespaceProperties) UnmarshalJSON(data []byte) error { case "metricId": err = unpopulate(val, "MetricID", &e.MetricID) delete(rawMsg, key) - case "minimumTlsVersion": - err = unpopulate(val, "MinimumTLSVersion", &e.MinimumTLSVersion) - delete(rawMsg, key) case "privateEndpointConnections": err = unpopulate(val, "PrivateEndpointConnections", &e.PrivateEndpointConnections) delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) delete(rawMsg, key) - case "publicNetworkAccess": - err = unpopulate(val, "PublicNetworkAccess", &e.PublicNetworkAccess) - delete(rawMsg, key) case "serviceBusEndpoint": err = unpopulate(val, "ServiceBusEndpoint", &e.ServiceBusEndpoint) delete(rawMsg, key) @@ -1719,333 +1563,6 @@ func (n *NetworkRuleSetProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeter. -func (n NetworkSecurityPerimeter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", n.ID) - populate(objectMap, "location", n.Location) - populate(objectMap, "perimeterGuid", n.PerimeterGUID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeter. -func (n *NetworkSecurityPerimeter) 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", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &n.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &n.Location) - delete(rawMsg, key) - case "perimeterGuid": - err = unpopulate(val, "PerimeterGUID", &n.PerimeterGUID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfiguration. -func (n NetworkSecurityPerimeterConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", n.ID) - populate(objectMap, "location", n.Location) - populate(objectMap, "name", n.Name) - populate(objectMap, "properties", n.Properties) - populate(objectMap, "tags", n.Tags) - populate(objectMap, "type", n.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterConfiguration. -func (n *NetworkSecurityPerimeterConfiguration) 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", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &n.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &n.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &n.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &n.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &n.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &n.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfigurationList. -func (n NetworkSecurityPerimeterConfigurationList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", n.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterConfigurationList. -func (n *NetworkSecurityPerimeterConfigurationList) 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", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &n.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfigurationProperties. -func (n NetworkSecurityPerimeterConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "networkSecurityPerimeter", n.NetworkSecurityPerimeter) - populate(objectMap, "profile", n.Profile) - populate(objectMap, "provisioningIssues", n.ProvisioningIssues) - populate(objectMap, "provisioningState", n.ProvisioningState) - populate(objectMap, "resourceAssociation", n.ResourceAssociation) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterConfigurationProperties. -func (n *NetworkSecurityPerimeterConfigurationProperties) 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", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "networkSecurityPerimeter": - err = unpopulate(val, "NetworkSecurityPerimeter", &n.NetworkSecurityPerimeter) - delete(rawMsg, key) - case "profile": - err = unpopulate(val, "Profile", &n.Profile) - delete(rawMsg, key) - case "provisioningIssues": - err = unpopulate(val, "ProvisioningIssues", &n.ProvisioningIssues) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &n.ProvisioningState) - delete(rawMsg, key) - case "resourceAssociation": - err = unpopulate(val, "ResourceAssociation", &n.ResourceAssociation) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfigurationPropertiesProfile. -func (n NetworkSecurityPerimeterConfigurationPropertiesProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "accessRules", n.AccessRules) - populate(objectMap, "accessRulesVersion", n.AccessRulesVersion) - populate(objectMap, "name", n.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterConfigurationPropertiesProfile. -func (n *NetworkSecurityPerimeterConfigurationPropertiesProfile) 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", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "accessRules": - err = unpopulate(val, "AccessRules", &n.AccessRules) - delete(rawMsg, key) - case "accessRulesVersion": - err = unpopulate(val, "AccessRulesVersion", &n.AccessRulesVersion) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &n.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation. -func (n NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "accessMode", n.AccessMode) - populate(objectMap, "name", n.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation. -func (n *NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation) 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", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "accessMode": - err = unpopulate(val, "AccessMode", &n.AccessMode) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &n.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NspAccessRule. -func (n NspAccessRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", n.ID) - populate(objectMap, "name", n.Name) - populate(objectMap, "properties", n.Properties) - populate(objectMap, "type", n.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NspAccessRule. -func (n *NspAccessRule) 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", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &n.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &n.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &n.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &n.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NspAccessRuleProperties. -func (n NspAccessRuleProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "addressPrefixes", n.AddressPrefixes) - populate(objectMap, "direction", n.Direction) - populate(objectMap, "fullyQualifiedDomainNames", n.FullyQualifiedDomainNames) - populate(objectMap, "networkSecurityPerimeters", n.NetworkSecurityPerimeters) - populate(objectMap, "subscriptions", n.Subscriptions) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NspAccessRuleProperties. -func (n *NspAccessRuleProperties) 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", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "addressPrefixes": - err = unpopulate(val, "AddressPrefixes", &n.AddressPrefixes) - delete(rawMsg, key) - case "direction": - err = unpopulate(val, "Direction", &n.Direction) - delete(rawMsg, key) - case "fullyQualifiedDomainNames": - err = unpopulate(val, "FullyQualifiedDomainNames", &n.FullyQualifiedDomainNames) - delete(rawMsg, key) - case "networkSecurityPerimeters": - err = unpopulate(val, "NetworkSecurityPerimeters", &n.NetworkSecurityPerimeters) - delete(rawMsg, key) - case "subscriptions": - err = unpopulate(val, "Subscriptions", &n.Subscriptions) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NspAccessRulePropertiesSubscriptionsItem. -func (n NspAccessRulePropertiesSubscriptionsItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", n.ID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NspAccessRulePropertiesSubscriptionsItem. -func (n *NspAccessRulePropertiesSubscriptionsItem) 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", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &n.ID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type Operation. func (o Operation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2455,68 +1972,6 @@ func (p *Properties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ProvisioningIssue. -func (p ProvisioningIssue) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProvisioningIssue. -func (p *ProvisioningIssue) 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", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProvisioningIssueProperties. -func (p ProvisioningIssueProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", p.Description) - populate(objectMap, "issueType", p.IssueType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProvisioningIssueProperties. -func (p *ProvisioningIssueProperties) 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", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &p.Description) - delete(rawMsg, key) - case "issueType": - err = unpopulate(val, "IssueType", &p.IssueType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type ProxyResource. func (p ProxyResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2856,45 +2311,6 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ThrottlingPolicy. -func (t ThrottlingPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "metricId", t.MetricID) - populate(objectMap, "name", t.Name) - populate(objectMap, "rateLimitThreshold", t.RateLimitThreshold) - objectMap["type"] = ApplicationGroupPolicyTypeThrottlingPolicy - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ThrottlingPolicy. -func (t *ThrottlingPolicy) 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", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "metricId": - err = unpopulate(val, "MetricID", &t.MetricID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &t.Name) - delete(rawMsg, key) - case "rateLimitThreshold": - err = unpopulate(val, "RateLimitThreshold", &t.RateLimitThreshold) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &t.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type TrackedResource. func (t TrackedResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) diff --git a/sdk/resourcemanager/eventhub/armeventhub/namespaces_client.go b/sdk/resourcemanager/eventhub/armeventhub/namespaces_client.go index 8dac987eaf78..745012b23e54 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/namespaces_client.go +++ b/sdk/resourcemanager/eventhub/armeventhub/namespaces_client.go @@ -48,7 +48,7 @@ func NewNamespacesClient(subscriptionID string, credential azcore.TokenCredentia // CheckNameAvailability - Check the give Namespace name availability. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - parameters - Parameters to check availability of the given Namespace name // - options - NamespacesClientCheckNameAvailabilityOptions contains the optional parameters for the NamespacesClient.CheckNameAvailability // method. @@ -79,7 +79,7 @@ func (client *NamespacesClient) checkNameAvailabilityCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -98,7 +98,7 @@ func (client *NamespacesClient) checkNameAvailabilityHandleResponse(resp *http.R // operation is idempotent. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - parameters - Parameters for creating a namespace resource. @@ -120,7 +120,7 @@ func (client *NamespacesClient) BeginCreateOrUpdate(ctx context.Context, resourc // is idempotent. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 func (client *NamespacesClient) createOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, parameters EHNamespace, options *NamespacesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, namespaceName, parameters, options) if err != nil { @@ -156,7 +156,7 @@ func (client *NamespacesClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -165,7 +165,7 @@ func (client *NamespacesClient) createOrUpdateCreateRequest(ctx context.Context, // CreateOrUpdateAuthorizationRule - Creates or updates an AuthorizationRule for a Namespace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - authorizationRuleName - The authorization rule name. @@ -211,7 +211,7 @@ func (client *NamespacesClient) createOrUpdateAuthorizationRuleCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -229,7 +229,7 @@ func (client *NamespacesClient) createOrUpdateAuthorizationRuleHandleResponse(re // CreateOrUpdateNetworkRuleSet - Create or update NetworkRuleSet for a Namespace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - parameters - The Namespace IpFilterRule. @@ -270,7 +270,7 @@ func (client *NamespacesClient) createOrUpdateNetworkRuleSetCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -288,7 +288,7 @@ func (client *NamespacesClient) createOrUpdateNetworkRuleSetHandleResponse(resp // BeginDelete - Deletes an existing namespace. This operation also removes all associated resources under the namespace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - options - NamespacesClientBeginDeleteOptions contains the optional parameters for the NamespacesClient.BeginDelete method. @@ -307,7 +307,7 @@ func (client *NamespacesClient) BeginDelete(ctx context.Context, resourceGroupNa // Delete - Deletes an existing namespace. This operation also removes all associated resources under the namespace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 func (client *NamespacesClient) deleteOperation(ctx context.Context, resourceGroupName string, namespaceName string, options *NamespacesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, namespaceName, options) if err != nil { @@ -343,7 +343,7 @@ func (client *NamespacesClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -352,7 +352,7 @@ func (client *NamespacesClient) deleteCreateRequest(ctx context.Context, resourc // DeleteAuthorizationRule - Deletes an AuthorizationRule for a Namespace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - authorizationRuleName - The authorization rule name. @@ -397,7 +397,7 @@ func (client *NamespacesClient) deleteAuthorizationRuleCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -406,7 +406,7 @@ func (client *NamespacesClient) deleteAuthorizationRuleCreateRequest(ctx context // Get - Gets the description of the specified namespace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - options - NamespacesClientGetOptions contains the optional parameters for the NamespacesClient.Get method. @@ -445,7 +445,7 @@ func (client *NamespacesClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -463,7 +463,7 @@ func (client *NamespacesClient) getHandleResponse(resp *http.Response) (Namespac // GetAuthorizationRule - Gets an AuthorizationRule for a Namespace by rule name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - authorizationRuleName - The authorization rule name. @@ -508,7 +508,7 @@ func (client *NamespacesClient) getAuthorizationRuleCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -526,7 +526,7 @@ func (client *NamespacesClient) getAuthorizationRuleHandleResponse(resp *http.Re // GetNetworkRuleSet - Gets NetworkRuleSet for a Namespace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - options - NamespacesClientGetNetworkRuleSetOptions contains the optional parameters for the NamespacesClient.GetNetworkRuleSet @@ -566,7 +566,7 @@ func (client *NamespacesClient) getNetworkRuleSetCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -583,7 +583,7 @@ func (client *NamespacesClient) getNetworkRuleSetHandleResponse(resp *http.Respo // NewListPager - Lists all the available Namespaces within a subscription, irrespective of the resource groups. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - options - NamespacesClientListOptions contains the optional parameters for the NamespacesClient.NewListPager method. func (client *NamespacesClient) NewListPager(options *NamespacesClientListOptions) *runtime.Pager[NamespacesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[NamespacesClientListResponse]{ @@ -625,7 +625,7 @@ func (client *NamespacesClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -642,7 +642,7 @@ func (client *NamespacesClient) listHandleResponse(resp *http.Response) (Namespa // NewListAuthorizationRulesPager - Gets a list of authorization rules for a Namespace. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - options - NamespacesClientListAuthorizationRulesOptions contains the optional parameters for the NamespacesClient.NewListAuthorizationRulesPager @@ -695,7 +695,7 @@ func (client *NamespacesClient) listAuthorizationRulesCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -712,7 +712,7 @@ func (client *NamespacesClient) listAuthorizationRulesHandleResponse(resp *http. // NewListByResourceGroupPager - Lists the available Namespaces within a resource group. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - options - NamespacesClientListByResourceGroupOptions contains the optional parameters for the NamespacesClient.NewListByResourceGroupPager // method. @@ -760,7 +760,7 @@ func (client *NamespacesClient) listByResourceGroupCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -778,7 +778,7 @@ func (client *NamespacesClient) listByResourceGroupHandleResponse(resp *http.Res // ListKeys - Gets the primary and secondary connection strings for the Namespace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - authorizationRuleName - The authorization rule name. @@ -822,7 +822,7 @@ func (client *NamespacesClient) listKeysCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -840,7 +840,7 @@ func (client *NamespacesClient) listKeysHandleResponse(resp *http.Response) (Nam // ListNetworkRuleSet - Gets NetworkRuleSet for a Namespace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - options - NamespacesClientListNetworkRuleSetOptions contains the optional parameters for the NamespacesClient.ListNetworkRuleSet @@ -880,7 +880,7 @@ func (client *NamespacesClient) listNetworkRuleSetCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -898,7 +898,7 @@ func (client *NamespacesClient) listNetworkRuleSetHandleResponse(resp *http.Resp // RegenerateKeys - Regenerates the primary or secondary connection strings for the specified Namespace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - authorizationRuleName - The authorization rule name. @@ -944,7 +944,7 @@ func (client *NamespacesClient) regenerateKeysCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -963,7 +963,7 @@ func (client *NamespacesClient) regenerateKeysHandleResponse(resp *http.Response // is idempotent. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - parameters - Parameters for updating a namespace resource. @@ -1003,7 +1003,7 @@ func (client *NamespacesClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/eventhub/armeventhub/namespaces_client_example_test.go b/sdk/resourcemanager/eventhub/armeventhub/namespaces_client_example_test.go index 5fd3c710e142..5e92960bbf79 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/namespaces_client_example_test.go +++ b/sdk/resourcemanager/eventhub/armeventhub/namespaces_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/EHNameSpaceList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceList.json func ExampleNamespacesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -84,7 +84,6 @@ func ExampleNamespacesClient_NewListPager() { // IsAutoInflateEnabled: to.Ptr(false), // MaximumThroughputUnits: to.Ptr[int32](0), // MetricID: to.Ptr("MetricGUID:NamespaceSample"), - // MinimumTLSVersion: to.Ptr(armeventhub.TLSVersionOne2), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NamespaceSample.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-30T00:30:55.143Z"); return t}()), @@ -100,7 +99,7 @@ func ExampleNamespacesClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/EHNameSpaceListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceListByResourceGroup.json func ExampleNamespacesClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -181,7 +180,7 @@ func ExampleNamespacesClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/EHNameSpaceCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceCreate.json func ExampleNamespacesClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -269,7 +268,6 @@ func ExampleNamespacesClient_BeginCreateOrUpdate() { // KafkaEnabled: to.Ptr(false), // MaximumThroughputUnits: to.Ptr[int32](0), // MetricID: to.Ptr("MetricGUID:NamespaceSample"), - // MinimumTLSVersion: to.Ptr(armeventhub.TLSVersionOne2), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NamespaceSample.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-02-16T22:37:42.29Z"); return t}()), @@ -283,7 +281,7 @@ func ExampleNamespacesClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/EHNameSpaceDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceDelete.json func ExampleNamespacesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -304,7 +302,7 @@ func ExampleNamespacesClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/EHNameSpaceGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceGet.json func ExampleNamespacesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -364,7 +362,6 @@ func ExampleNamespacesClient_Get() { // IsAutoInflateEnabled: to.Ptr(false), // MaximumThroughputUnits: to.Ptr[int32](0), // MetricID: to.Ptr("MetricGUID:NamespaceSample"), - // MinimumTLSVersion: to.Ptr(armeventhub.TLSVersionOne2), // PrivateEndpointConnections: []*armeventhub.PrivateEndpointConnection{ // { // Name: to.Ptr("privateEndpointConnectionName"), @@ -394,7 +391,7 @@ func ExampleNamespacesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/EHNameSpaceUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceUpdate.json func ExampleNamespacesClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -457,7 +454,6 @@ func ExampleNamespacesClient_Update() { // IsAutoInflateEnabled: to.Ptr(false), // MaximumThroughputUnits: to.Ptr[int32](0), // MetricID: to.Ptr("MetricGUID:NamespaceSample"), - // MinimumTLSVersion: to.Ptr(armeventhub.TLSVersionOne1), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NamespaceSample.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-30T00:31:13.657Z"); return t}()), @@ -471,7 +467,7 @@ func ExampleNamespacesClient_Update() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/VirtualNetworkRule/EHNetworkRuleSetCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/VirtualNetworkRule/EHNetworkRuleSetCreate.json func ExampleNamespacesClient_CreateOrUpdateNetworkRuleSet() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -560,6 +556,7 @@ func ExampleNamespacesClient_CreateOrUpdateNetworkRuleSet() { // Action: to.Ptr(armeventhub.NetworkRuleIPActionAllow), // IPMask: to.Ptr("1.1.1.5"), // }}, + // PublicNetworkAccess: to.Ptr(armeventhub.PublicNetworkAccessFlagEnabled), // VirtualNetworkRules: []*armeventhub.NWRuleSetVirtualNetworkRules{ // { // IgnoreMissingVnetServiceEndpoint: to.Ptr(true), @@ -583,7 +580,7 @@ func ExampleNamespacesClient_CreateOrUpdateNetworkRuleSet() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/VirtualNetworkRule/EHNetworkRuleSetGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/VirtualNetworkRule/EHNetworkRuleSetGet.json func ExampleNamespacesClient_GetNetworkRuleSet() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -606,7 +603,7 @@ func ExampleNamespacesClient_GetNetworkRuleSet() { // Type: to.Ptr("Microsoft.EventHub/Namespaces/NetworkRuleSet"), // ID: to.Ptr("/subscriptions/subscriptionid/resourceGroups/resourcegroupid/providers/Microsoft.EventHub/namespaces/sdk-Namespace-9659/networkruleset/default"), // Properties: &armeventhub.NetworkRuleSetProperties{ - // DefaultAction: to.Ptr(armeventhub.DefaultActionDeny), + // DefaultAction: to.Ptr(armeventhub.DefaultActionAllow), // IPRules: []*armeventhub.NWRuleSetIPRules{ // { // Action: to.Ptr(armeventhub.NetworkRuleIPActionAllow), @@ -628,6 +625,7 @@ func ExampleNamespacesClient_GetNetworkRuleSet() { // Action: to.Ptr(armeventhub.NetworkRuleIPActionAllow), // IPMask: to.Ptr("1.1.1.5"), // }}, + // PublicNetworkAccess: to.Ptr(armeventhub.PublicNetworkAccessFlagEnabled), // VirtualNetworkRules: []*armeventhub.NWRuleSetVirtualNetworkRules{ // { // IgnoreMissingVnetServiceEndpoint: to.Ptr(true), @@ -651,7 +649,7 @@ func ExampleNamespacesClient_GetNetworkRuleSet() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/VirtualNetworkRule/EHNetworkRuleSetList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/VirtualNetworkRule/EHNetworkRuleSetList.json func ExampleNamespacesClient_ListNetworkRuleSet() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -722,7 +720,7 @@ func ExampleNamespacesClient_ListNetworkRuleSet() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/EHNameSpaceAuthorizationRuleListAll.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceAuthorizationRuleListAll.json func ExampleNamespacesClient_NewListAuthorizationRulesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -771,7 +769,7 @@ func ExampleNamespacesClient_NewListAuthorizationRulesPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/EHNameSpaceAuthorizationRuleCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceAuthorizationRuleCreate.json func ExampleNamespacesClient_CreateOrUpdateAuthorizationRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -807,7 +805,7 @@ func ExampleNamespacesClient_CreateOrUpdateAuthorizationRule() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/EHNameSpaceAuthorizationRuleDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceAuthorizationRuleDelete.json func ExampleNamespacesClient_DeleteAuthorizationRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -824,7 +822,7 @@ func ExampleNamespacesClient_DeleteAuthorizationRule() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/EHNameSpaceAuthorizationRuleGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceAuthorizationRuleGet.json func ExampleNamespacesClient_GetAuthorizationRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -854,7 +852,7 @@ func ExampleNamespacesClient_GetAuthorizationRule() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/EHNameSpaceAuthorizationRuleListKey.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceAuthorizationRuleListKey.json func ExampleNamespacesClient_ListKeys() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -881,7 +879,7 @@ func ExampleNamespacesClient_ListKeys() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/EHNameSpaceAuthorizationRuleRegenerateKey.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceAuthorizationRuleRegenerateKey.json func ExampleNamespacesClient_RegenerateKeys() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -910,7 +908,7 @@ func ExampleNamespacesClient_RegenerateKeys() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/EHNameSpaceCheckNameAvailability.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceCheckNameAvailability.json func ExampleNamespacesClient_CheckNameAvailability() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/eventhub/armeventhub/networksecurityperimeterconfiguration_client.go b/sdk/resourcemanager/eventhub/armeventhub/networksecurityperimeterconfiguration_client.go deleted file mode 100644 index 7b2e379d0d69..000000000000 --- a/sdk/resourcemanager/eventhub/armeventhub/networksecurityperimeterconfiguration_client.go +++ /dev/null @@ -1,104 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armeventhub - -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" -) - -// NetworkSecurityPerimeterConfigurationClient contains the methods for the NetworkSecurityPerimeterConfiguration group. -// Don't use this type directly, use NewNetworkSecurityPerimeterConfigurationClient() instead. -type NetworkSecurityPerimeterConfigurationClient struct { - internal *arm.Client - subscriptionID string -} - -// NewNetworkSecurityPerimeterConfigurationClient creates a new instance of NetworkSecurityPerimeterConfigurationClient with the specified values. -// - subscriptionID - Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewNetworkSecurityPerimeterConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NetworkSecurityPerimeterConfigurationClient, error) { - cl, err := arm.NewClient(moduleName+".NetworkSecurityPerimeterConfigurationClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &NetworkSecurityPerimeterConfigurationClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// List - Gets list of current NetworkSecurityPerimeterConfiguration for Namespace -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-01-01-preview -// - resourceGroupName - Name of the resource group within the azure subscription. -// - namespaceName - The Namespace name -// - options - NetworkSecurityPerimeterConfigurationClientListOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationClient.List -// method. -func (client *NetworkSecurityPerimeterConfigurationClient) List(ctx context.Context, resourceGroupName string, namespaceName string, options *NetworkSecurityPerimeterConfigurationClientListOptions) (NetworkSecurityPerimeterConfigurationClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, namespaceName, options) - if err != nil { - return NetworkSecurityPerimeterConfigurationClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return NetworkSecurityPerimeterConfigurationClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NetworkSecurityPerimeterConfigurationClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) -} - -// listCreateRequest creates the List request. -func (client *NetworkSecurityPerimeterConfigurationClient) listCreateRequest(ctx context.Context, resourceGroupName string, namespaceName string, options *NetworkSecurityPerimeterConfigurationClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkSecurityPerimeterConfigurations" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if namespaceName == "" { - return nil, errors.New("parameter namespaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) - 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", "2022-01-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *NetworkSecurityPerimeterConfigurationClient) listHandleResponse(resp *http.Response) (NetworkSecurityPerimeterConfigurationClientListResponse, error) { - result := NetworkSecurityPerimeterConfigurationClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.NetworkSecurityPerimeterConfigurationList); err != nil { - return NetworkSecurityPerimeterConfigurationClientListResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/eventhub/armeventhub/networksecurityperimeterconfiguration_client_example_test.go b/sdk/resourcemanager/eventhub/armeventhub/networksecurityperimeterconfiguration_client_example_test.go deleted file mode 100644 index 69090bd33df6..000000000000 --- a/sdk/resourcemanager/eventhub/armeventhub/networksecurityperimeterconfiguration_client_example_test.go +++ /dev/null @@ -1,69 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armeventhub_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/NetworkSecurityPerimeterConfigurationList.json -func ExampleNetworkSecurityPerimeterConfigurationClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armeventhub.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewNetworkSecurityPerimeterConfigurationClient().List(ctx, "SDK-EventHub-4794", "sdk-Namespace-5828", 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.NetworkSecurityPerimeterConfigurationList = armeventhub.NetworkSecurityPerimeterConfigurationList{ - // Value: []*armeventhub.NetworkSecurityPerimeterConfiguration{ - // { - // Name: to.Ptr("resourceAssociation1"), - // Properties: &armeventhub.NetworkSecurityPerimeterConfigurationProperties{ - // NetworkSecurityPerimeter: &armeventhub.NetworkSecurityPerimeter{ - // ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-EventHub-4794/providers/Microsoft.Network/networkSecurityPerimeters/nsp1"), - // Location: to.Ptr("East US"), - // PerimeterGUID: to.Ptr("ce2d5953-5c15-40ca-9d51-cc3f4a63b0f5"), - // }, - // Profile: &armeventhub.NetworkSecurityPerimeterConfigurationPropertiesProfile{ - // Name: to.Ptr("devProfile"), - // AccessRules: []*armeventhub.NspAccessRule{ - // { - // Name: to.Ptr("inVpnRule"), - // Properties: &armeventhub.NspAccessRuleProperties{ - // AddressPrefixes: []*string{ - // to.Ptr("148.0.0.0/8"), - // to.Ptr("152.4.6.0/24")}, - // Direction: to.Ptr(armeventhub.NspAccessRuleDirectionInbound), - // }, - // }}, - // AccessRulesVersion: to.Ptr("10"), - // }, - // ProvisioningState: to.Ptr(armeventhub.NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded), - // ResourceAssociation: &armeventhub.NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation{ - // Name: to.Ptr("association1"), - // }, - // }, - // }}, - // } -} diff --git a/sdk/resourcemanager/eventhub/armeventhub/networksecurityperimeterconfigurations_client.go b/sdk/resourcemanager/eventhub/armeventhub/networksecurityperimeterconfigurations_client.go deleted file mode 100644 index 41db57a5c76c..000000000000 --- a/sdk/resourcemanager/eventhub/armeventhub/networksecurityperimeterconfigurations_client.go +++ /dev/null @@ -1,116 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armeventhub - -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" -) - -// NetworkSecurityPerimeterConfigurationsClient contains the methods for the NetworkSecurityPerimeterConfigurations group. -// Don't use this type directly, use NewNetworkSecurityPerimeterConfigurationsClient() instead. -type NetworkSecurityPerimeterConfigurationsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewNetworkSecurityPerimeterConfigurationsClient creates a new instance of NetworkSecurityPerimeterConfigurationsClient with the specified values. -// - subscriptionID - Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewNetworkSecurityPerimeterConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NetworkSecurityPerimeterConfigurationsClient, error) { - cl, err := arm.NewClient(moduleName+".NetworkSecurityPerimeterConfigurationsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &NetworkSecurityPerimeterConfigurationsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateOrUpdate - Refreshes any information about the association. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-01-01-preview -// - resourceGroupName - Name of the resource group within the azure subscription. -// - namespaceName - The Namespace name -// - resourceAssociationName - The ResourceAssociation Name -// - options - NetworkSecurityPerimeterConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the -// NetworkSecurityPerimeterConfigurationsClient.BeginCreateOrUpdate method. -func (client *NetworkSecurityPerimeterConfigurationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, resourceAssociationName string, options *NetworkSecurityPerimeterConfigurationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[NetworkSecurityPerimeterConfigurationsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, namespaceName, resourceAssociationName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[NetworkSecurityPerimeterConfigurationsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[NetworkSecurityPerimeterConfigurationsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// CreateOrUpdate - Refreshes any information about the association. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-01-01-preview -func (client *NetworkSecurityPerimeterConfigurationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, resourceAssociationName string, options *NetworkSecurityPerimeterConfigurationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, namespaceName, resourceAssociationName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *NetworkSecurityPerimeterConfigurationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, namespaceName string, resourceAssociationName string, options *NetworkSecurityPerimeterConfigurationsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkSecurityPerimeterConfigurations/{resourceAssociationName}/reconcile" - 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 namespaceName == "" { - return nil, errors.New("parameter namespaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) - if resourceAssociationName == "" { - return nil, errors.New("parameter resourceAssociationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceAssociationName}", url.PathEscape(resourceAssociationName)) - 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", "2022-01-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} diff --git a/sdk/resourcemanager/eventhub/armeventhub/networksecurityperimeterconfigurations_client_example_test.go b/sdk/resourcemanager/eventhub/armeventhub/networksecurityperimeterconfigurations_client_example_test.go deleted file mode 100644 index ffc5da885189..000000000000 --- a/sdk/resourcemanager/eventhub/armeventhub/networksecurityperimeterconfigurations_client_example_test.go +++ /dev/null @@ -1,39 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armeventhub_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/NetworkSecurityPerimeterConfigurationReconcile.json -func ExampleNetworkSecurityPerimeterConfigurationsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armeventhub.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewNetworkSecurityPerimeterConfigurationsClient().BeginCreateOrUpdate(ctx, "SDK-EventHub-4794", "sdk-Namespace-5828", "resourceAssociation1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/eventhub/armeventhub/operations_client.go b/sdk/resourcemanager/eventhub/armeventhub/operations_client.go index eaadb6872958..6fd2c6f2addf 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/operations_client.go +++ b/sdk/resourcemanager/eventhub/armeventhub/operations_client.go @@ -40,7 +40,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available Event Hub REST API operations. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -78,7 +78,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/eventhub/armeventhub/operations_client_example_test.go b/sdk/resourcemanager/eventhub/armeventhub/operations_client_example_test.go index 4339e5437c75..9c9d04cfe293 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/operations_client_example_test.go +++ b/sdk/resourcemanager/eventhub/armeventhub/operations_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/EHOperations_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/EHOperations_List.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/eventhub/armeventhub/polymorphic_helpers.go b/sdk/resourcemanager/eventhub/armeventhub/polymorphic_helpers.go deleted file mode 100644 index d4eeddaf4843..000000000000 --- a/sdk/resourcemanager/eventhub/armeventhub/polymorphic_helpers.go +++ /dev/null @@ -1,49 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armeventhub - -import "encoding/json" - -func unmarshalApplicationGroupPolicyClassification(rawMsg json.RawMessage) (ApplicationGroupPolicyClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]any - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ApplicationGroupPolicyClassification - switch m["type"] { - case string(ApplicationGroupPolicyTypeThrottlingPolicy): - b = &ThrottlingPolicy{} - default: - b = &ApplicationGroupPolicy{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalApplicationGroupPolicyClassificationArray(rawMsg json.RawMessage) ([]ApplicationGroupPolicyClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]ApplicationGroupPolicyClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalApplicationGroupPolicyClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} diff --git a/sdk/resourcemanager/eventhub/armeventhub/privateendpointconnections_client.go b/sdk/resourcemanager/eventhub/armeventhub/privateendpointconnections_client.go index 17bea8bd8ceb..610164b38fb2 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/privateendpointconnections_client.go +++ b/sdk/resourcemanager/eventhub/armeventhub/privateendpointconnections_client.go @@ -48,7 +48,7 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcor // CreateOrUpdate - Creates or updates PrivateEndpointConnections of service namespace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - privateEndpointConnectionName - The PrivateEndpointConnection name @@ -94,7 +94,7 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -112,7 +112,7 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateHandleResponse(res // BeginDelete - Deletes an existing namespace. This operation also removes all associated resources under the namespace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - privateEndpointConnectionName - The PrivateEndpointConnection name @@ -133,7 +133,7 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, // Delete - Deletes an existing namespace. This operation also removes all associated resources under the namespace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, namespaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, namespaceName, privateEndpointConnectionName, options) if err != nil { @@ -173,7 +173,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -182,7 +182,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // Get - Gets a description for the specified Private Endpoint Connection name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - privateEndpointConnectionName - The PrivateEndpointConnection name @@ -227,7 +227,7 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -244,7 +244,7 @@ func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Res // NewListPager - Gets the available PrivateEndpointConnections within a namespace. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager @@ -297,7 +297,7 @@ func (client *PrivateEndpointConnectionsClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/eventhub/armeventhub/privateendpointconnections_client_example_test.go b/sdk/resourcemanager/eventhub/armeventhub/privateendpointconnections_client_example_test.go index 9af1f6fbf333..eeb2e73138bd 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/privateendpointconnections_client_example_test.go +++ b/sdk/resourcemanager/eventhub/armeventhub/privateendpointconnections_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/PrivateEndPointConnectionList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/PrivateEndPointConnectionList.json func ExamplePrivateEndpointConnectionsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -61,7 +61,7 @@ func ExamplePrivateEndpointConnectionsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/PrivateEndPointConnectionCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/PrivateEndPointConnectionCreate.json func ExamplePrivateEndpointConnectionsClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -107,7 +107,7 @@ func ExamplePrivateEndpointConnectionsClient_CreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/PrivateEndPointConnectionDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/PrivateEndPointConnectionDelete.json func ExamplePrivateEndpointConnectionsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -128,7 +128,7 @@ func ExamplePrivateEndpointConnectionsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/PrivateEndPointConnectionGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/PrivateEndPointConnectionGet.json func ExamplePrivateEndpointConnectionsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/eventhub/armeventhub/privatelinkresources_client.go b/sdk/resourcemanager/eventhub/armeventhub/privatelinkresources_client.go index 476e8d339397..4529db430103 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/privatelinkresources_client.go +++ b/sdk/resourcemanager/eventhub/armeventhub/privatelinkresources_client.go @@ -48,7 +48,7 @@ func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.Toke // Get - Gets lists of resources that supports Privatelinks. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get @@ -88,7 +88,7 @@ func (client *PrivateLinkResourcesClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/eventhub/armeventhub/privatelinkresources_client_example_test.go b/sdk/resourcemanager/eventhub/armeventhub/privatelinkresources_client_example_test.go index 8308c22a905a..73a83f001bdd 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/privatelinkresources_client_example_test.go +++ b/sdk/resourcemanager/eventhub/armeventhub/privatelinkresources_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/PrivateLinkResourcesGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/PrivateLinkResourcesGet.json func ExamplePrivateLinkResourcesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/eventhub/armeventhub/response_types.go b/sdk/resourcemanager/eventhub/armeventhub/response_types.go index e2055c38c028..65c4445fd5e9 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/response_types.go +++ b/sdk/resourcemanager/eventhub/armeventhub/response_types.go @@ -9,26 +9,6 @@ package armeventhub -// ApplicationGroupClientCreateOrUpdateApplicationGroupResponse contains the response from method ApplicationGroupClient.CreateOrUpdateApplicationGroup. -type ApplicationGroupClientCreateOrUpdateApplicationGroupResponse struct { - ApplicationGroup -} - -// ApplicationGroupClientDeleteResponse contains the response from method ApplicationGroupClient.Delete. -type ApplicationGroupClientDeleteResponse struct { - // placeholder for future response values -} - -// ApplicationGroupClientGetResponse contains the response from method ApplicationGroupClient.Get. -type ApplicationGroupClientGetResponse struct { - ApplicationGroup -} - -// ApplicationGroupClientListByNamespaceResponse contains the response from method ApplicationGroupClient.NewListByNamespacePager. -type ApplicationGroupClientListByNamespaceResponse struct { - ApplicationGroupListResult -} - // ClustersClientCreateOrUpdateResponse contains the response from method ClustersClient.BeginCreateOrUpdate. type ClustersClientCreateOrUpdateResponse struct { Cluster @@ -279,16 +259,6 @@ type NamespacesClientUpdateResponse struct { EHNamespace } -// NetworkSecurityPerimeterConfigurationClientListResponse contains the response from method NetworkSecurityPerimeterConfigurationClient.List. -type NetworkSecurityPerimeterConfigurationClientListResponse struct { - NetworkSecurityPerimeterConfigurationList -} - -// NetworkSecurityPerimeterConfigurationsClientCreateOrUpdateResponse contains the response from method NetworkSecurityPerimeterConfigurationsClient.BeginCreateOrUpdate. -type NetworkSecurityPerimeterConfigurationsClientCreateOrUpdateResponse struct { - // placeholder for future response values -} - // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { OperationListResult diff --git a/sdk/resourcemanager/eventhub/armeventhub/schemaregistry_client.go b/sdk/resourcemanager/eventhub/armeventhub/schemaregistry_client.go index a11c397a9bdc..c63bb0488d67 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/schemaregistry_client.go +++ b/sdk/resourcemanager/eventhub/armeventhub/schemaregistry_client.go @@ -49,7 +49,7 @@ func NewSchemaRegistryClient(subscriptionID string, credential azcore.TokenCrede // CreateOrUpdate - // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - schemaGroupName - The Schema Group name @@ -95,7 +95,7 @@ func (client *SchemaRegistryClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -113,7 +113,7 @@ func (client *SchemaRegistryClient) createOrUpdateHandleResponse(resp *http.Resp // Delete - // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - schemaGroupName - The Schema Group name @@ -157,7 +157,7 @@ func (client *SchemaRegistryClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -166,7 +166,7 @@ func (client *SchemaRegistryClient) deleteCreateRequest(ctx context.Context, res // Get - // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - schemaGroupName - The Schema Group name @@ -210,7 +210,7 @@ func (client *SchemaRegistryClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -227,7 +227,7 @@ func (client *SchemaRegistryClient) getHandleResponse(resp *http.Response) (Sche // NewListByNamespacePager - Gets all the Schema Groups in a Namespace. // -// Generated from API version 2022-01-01-preview +// Generated from API version 2021-11-01 // - resourceGroupName - Name of the resource group within the azure subscription. // - namespaceName - The Namespace name // - options - SchemaRegistryClientListByNamespaceOptions contains the optional parameters for the SchemaRegistryClient.NewListByNamespacePager @@ -280,7 +280,7 @@ func (client *SchemaRegistryClient) listByNamespaceCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01-preview") + reqQP.Set("api-version", "2021-11-01") if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } diff --git a/sdk/resourcemanager/eventhub/armeventhub/schemaregistry_client_example_test.go b/sdk/resourcemanager/eventhub/armeventhub/schemaregistry_client_example_test.go index df7c720a1234..448404a55cb7 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/schemaregistry_client_example_test.go +++ b/sdk/resourcemanager/eventhub/armeventhub/schemaregistry_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/SchemaRegistry/SchemaRegistryListByNamespace.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/SchemaRegistry/SchemaRegistryListByNamespace.json func ExampleSchemaRegistryClient_NewListByNamespacePager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -93,7 +93,7 @@ func ExampleSchemaRegistryClient_NewListByNamespacePager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/SchemaRegistry/SchemaRegistryCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/SchemaRegistry/SchemaRegistryCreate.json func ExampleSchemaRegistryClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -134,7 +134,7 @@ func ExampleSchemaRegistryClient_CreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/SchemaRegistry/SchemaRegistryDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/SchemaRegistry/SchemaRegistryDelete.json func ExampleSchemaRegistryClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -151,7 +151,7 @@ func ExampleSchemaRegistryClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/SchemaRegistry/SchemaRegistryGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/SchemaRegistry/SchemaRegistryGet.json func ExampleSchemaRegistryClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/extendedlocation/armextendedlocation/CHANGELOG.md b/sdk/resourcemanager/extendedlocation/armextendedlocation/CHANGELOG.md index 77a4b81cb8ca..eaad99cd20ef 100644 --- a/sdk/resourcemanager/extendedlocation/armextendedlocation/CHANGELOG.md +++ b/sdk/resourcemanager/extendedlocation/armextendedlocation/CHANGELOG.md @@ -1,44 +1,10 @@ # Release History -## 1.1.0-beta.2 (2023-03-28) +## 1.1.0 (2023-04-07) ### Features Added - New struct `ClientFactory` which is a client factory used to create any client in this module - -## 1.1.0-beta.1 (2022-06-28) -### Features Added - -- New function `*ResourceSyncRulesClient.BeginCreateOrUpdate(context.Context, string, string, string, ResourceSyncRule, *ResourceSyncRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ResourceSyncRulesClientCreateOrUpdateResponse], error)` -- New function `NewResourceSyncRulesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ResourceSyncRulesClient, error)` -- New function `*ResourceSyncRulesClient.BeginUpdate(context.Context, string, string, string, PatchableResourceSyncRule, *ResourceSyncRulesClientBeginUpdateOptions) (*runtime.Poller[ResourceSyncRulesClientUpdateResponse], error)` -- New function `*ResourceSyncRulesClient.Get(context.Context, string, string, string, *ResourceSyncRulesClientGetOptions) (ResourceSyncRulesClientGetResponse, error)` -- New function `*ResourceSyncRulesClient.Delete(context.Context, string, string, string, *ResourceSyncRulesClientDeleteOptions) (ResourceSyncRulesClientDeleteResponse, error)` -- New function `*CustomLocationsClient.FindTargetResourceGroup(context.Context, string, string, CustomLocationFindTargetResourceGroupProperties, *CustomLocationsClientFindTargetResourceGroupOptions) (CustomLocationsClientFindTargetResourceGroupResponse, error)` -- New function `*ResourceSyncRulesClient.NewListByCustomLocationIDPager(string, string, *ResourceSyncRulesClientListByCustomLocationIDOptions) *runtime.Pager[ResourceSyncRulesClientListByCustomLocationIDResponse]` -- New struct `CustomLocationFindTargetResourceGroupProperties` -- New struct `CustomLocationFindTargetResourceGroupResult` -- New struct `CustomLocationsClientFindTargetResourceGroupOptions` -- New struct `CustomLocationsClientFindTargetResourceGroupResponse` -- New struct `MatchExpressionsProperties` -- New struct `PatchableResourceSyncRule` -- New struct `ResourceSyncRule` -- New struct `ResourceSyncRuleListResult` -- New struct `ResourceSyncRuleProperties` -- New struct `ResourceSyncRulePropertiesSelector` -- New struct `ResourceSyncRulesClient` -- New struct `ResourceSyncRulesClientBeginCreateOrUpdateOptions` -- New struct `ResourceSyncRulesClientBeginUpdateOptions` -- New struct `ResourceSyncRulesClientCreateOrUpdateResponse` -- New struct `ResourceSyncRulesClientDeleteOptions` -- New struct `ResourceSyncRulesClientDeleteResponse` -- New struct `ResourceSyncRulesClientGetOptions` -- New struct `ResourceSyncRulesClientGetResponse` -- New struct `ResourceSyncRulesClientListByCustomLocationIDOptions` -- New struct `ResourceSyncRulesClientListByCustomLocationIDResponse` -- New struct `ResourceSyncRulesClientUpdateResponse` - - ## 1.0.0 (2022-05-18) The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/extendedlocation/armextendedlocation` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. diff --git a/sdk/resourcemanager/extendedlocation/armextendedlocation/autorest.md b/sdk/resourcemanager/extendedlocation/armextendedlocation/autorest.md index 8c5df8dcebdd..b29bb7b72125 100644 --- a/sdk/resourcemanager/extendedlocation/armextendedlocation/autorest.md +++ b/sdk/resourcemanager/extendedlocation/armextendedlocation/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/b8fc2b4ff626aab886f929e49926c6e836548e01/specification/extendedlocation/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/b8fc2b4ff626aab886f929e49926c6e836548e01/specification/extendedlocation/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/extendedlocation/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/extendedlocation/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.0-beta.2 -tag: package-2021-08-31-preview +module-version: 1.1.0 + ``` \ No newline at end of file diff --git a/sdk/resourcemanager/extendedlocation/armextendedlocation/client_factory.go b/sdk/resourcemanager/extendedlocation/armextendedlocation/client_factory.go index f8c6e0866bfe..bcb5de3456fe 100644 --- a/sdk/resourcemanager/extendedlocation/armextendedlocation/client_factory.go +++ b/sdk/resourcemanager/extendedlocation/armextendedlocation/client_factory.go @@ -42,8 +42,3 @@ func (c *ClientFactory) NewCustomLocationsClient() *CustomLocationsClient { subClient, _ := NewCustomLocationsClient(c.subscriptionID, c.credential, c.options) return subClient } - -func (c *ClientFactory) NewResourceSyncRulesClient() *ResourceSyncRulesClient { - subClient, _ := NewResourceSyncRulesClient(c.subscriptionID, c.credential, c.options) - return subClient -} diff --git a/sdk/resourcemanager/extendedlocation/armextendedlocation/constants.go b/sdk/resourcemanager/extendedlocation/armextendedlocation/constants.go index 145d63d9ea1e..62ed3c230fc8 100644 --- a/sdk/resourcemanager/extendedlocation/armextendedlocation/constants.go +++ b/sdk/resourcemanager/extendedlocation/armextendedlocation/constants.go @@ -11,7 +11,7 @@ package armextendedlocation const ( moduleName = "armextendedlocation" - moduleVersion = "v1.1.0-beta.2" + moduleVersion = "v1.1.0" ) // CreatedByType - The type of identity that created the resource. diff --git a/sdk/resourcemanager/extendedlocation/armextendedlocation/customlocations_client.go b/sdk/resourcemanager/extendedlocation/armextendedlocation/customlocations_client.go index e355dc3fb6af..7eb02cbd5a4a 100644 --- a/sdk/resourcemanager/extendedlocation/armextendedlocation/customlocations_client.go +++ b/sdk/resourcemanager/extendedlocation/armextendedlocation/customlocations_client.go @@ -47,7 +47,7 @@ func NewCustomLocationsClient(subscriptionID string, credential azcore.TokenCred // BeginCreateOrUpdate - Creates or updates a Custom Location in the specified Subscription and Resource Group // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-31-preview +// Generated from API version 2021-08-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - Custom Locations name. // - parameters - Parameters supplied to create or update a Custom Location. @@ -70,7 +70,7 @@ func (client *CustomLocationsClient) BeginCreateOrUpdate(ctx context.Context, re // CreateOrUpdate - Creates or updates a Custom Location in the specified Subscription and Resource Group // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-31-preview +// Generated from API version 2021-08-15 func (client *CustomLocationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters CustomLocation, options *CustomLocationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, resourceName, parameters, options) if err != nil { @@ -106,7 +106,7 @@ func (client *CustomLocationsClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-31-preview") + reqQP.Set("api-version", "2021-08-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -115,7 +115,7 @@ func (client *CustomLocationsClient) createOrUpdateCreateRequest(ctx context.Con // BeginDelete - Deletes the Custom Location with the specified Resource Name, Resource Group, and Subscription Id. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-31-preview +// Generated from API version 2021-08-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - Custom Locations name. // - options - CustomLocationsClientBeginDeleteOptions contains the optional parameters for the CustomLocationsClient.BeginDelete @@ -137,7 +137,7 @@ func (client *CustomLocationsClient) BeginDelete(ctx context.Context, resourceGr // Delete - Deletes the Custom Location with the specified Resource Name, Resource Group, and Subscription Id. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-31-preview +// Generated from API version 2021-08-15 func (client *CustomLocationsClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, options *CustomLocationsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { @@ -173,76 +173,16 @@ func (client *CustomLocationsClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-31-preview") + reqQP.Set("api-version", "2021-08-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// FindTargetResourceGroup - Returns the target resource group associated with the resource sync rules of the Custom Location -// that match the rules passed in with the Find Target Resource Group Request. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-31-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - Custom Locations name. -// - parameters - Parameters of the find target resource group request. -// - options - CustomLocationsClientFindTargetResourceGroupOptions contains the optional parameters for the CustomLocationsClient.FindTargetResourceGroup -// method. -func (client *CustomLocationsClient) FindTargetResourceGroup(ctx context.Context, resourceGroupName string, resourceName string, parameters CustomLocationFindTargetResourceGroupProperties, options *CustomLocationsClientFindTargetResourceGroupOptions) (CustomLocationsClientFindTargetResourceGroupResponse, error) { - req, err := client.findTargetResourceGroupCreateRequest(ctx, resourceGroupName, resourceName, parameters, options) - if err != nil { - return CustomLocationsClientFindTargetResourceGroupResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return CustomLocationsClientFindTargetResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return CustomLocationsClientFindTargetResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.findTargetResourceGroupHandleResponse(resp) -} - -// findTargetResourceGroupCreateRequest creates the FindTargetResourceGroup request. -func (client *CustomLocationsClient) findTargetResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, parameters CustomLocationFindTargetResourceGroupProperties, options *CustomLocationsClientFindTargetResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ExtendedLocation/customLocations/{resourceName}/findTargetResourceGroup" - 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 resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - 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", "2021-08-31-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// findTargetResourceGroupHandleResponse handles the FindTargetResourceGroup response. -func (client *CustomLocationsClient) findTargetResourceGroupHandleResponse(resp *http.Response) (CustomLocationsClientFindTargetResourceGroupResponse, error) { - result := CustomLocationsClientFindTargetResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CustomLocationFindTargetResourceGroupResult); err != nil { - return CustomLocationsClientFindTargetResourceGroupResponse{}, err - } - return result, nil -} - // Get - Gets the details of the customLocation with a specified resource group and name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-31-preview +// Generated from API version 2021-08-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - Custom Locations name. // - options - CustomLocationsClientGetOptions contains the optional parameters for the CustomLocationsClient.Get method. @@ -281,7 +221,7 @@ func (client *CustomLocationsClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-31-preview") + reqQP.Set("api-version", "2021-08-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -299,7 +239,7 @@ func (client *CustomLocationsClient) getHandleResponse(resp *http.Response) (Cus // NewListByResourceGroupPager - Gets a list of Custom Locations in the specified subscription and resource group. The operation // returns properties of each Custom Location. // -// Generated from API version 2021-08-31-preview +// Generated from API version 2021-08-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - CustomLocationsClientListByResourceGroupOptions contains the optional parameters for the CustomLocationsClient.NewListByResourceGroupPager // method. @@ -347,7 +287,7 @@ func (client *CustomLocationsClient) listByResourceGroupCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-31-preview") + reqQP.Set("api-version", "2021-08-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -365,7 +305,7 @@ func (client *CustomLocationsClient) listByResourceGroupHandleResponse(resp *htt // NewListBySubscriptionPager - Gets a list of Custom Locations in the specified subscription. The operation returns properties // of each Custom Location // -// Generated from API version 2021-08-31-preview +// Generated from API version 2021-08-15 // - options - CustomLocationsClientListBySubscriptionOptions contains the optional parameters for the CustomLocationsClient.NewListBySubscriptionPager // method. func (client *CustomLocationsClient) NewListBySubscriptionPager(options *CustomLocationsClientListBySubscriptionOptions) *runtime.Pager[CustomLocationsClientListBySubscriptionResponse] { @@ -408,7 +348,7 @@ func (client *CustomLocationsClient) listBySubscriptionCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-31-preview") + reqQP.Set("api-version", "2021-08-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -425,7 +365,7 @@ func (client *CustomLocationsClient) listBySubscriptionHandleResponse(resp *http // NewListEnabledResourceTypesPager - Gets the list of the Enabled Resource Types. // -// Generated from API version 2021-08-31-preview +// Generated from API version 2021-08-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - Custom Locations name. // - options - CustomLocationsClientListEnabledResourceTypesOptions contains the optional parameters for the CustomLocationsClient.NewListEnabledResourceTypesPager @@ -478,7 +418,7 @@ func (client *CustomLocationsClient) listEnabledResourceTypesCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-31-preview") + reqQP.Set("api-version", "2021-08-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -495,7 +435,7 @@ func (client *CustomLocationsClient) listEnabledResourceTypesHandleResponse(resp // NewListOperationsPager - Lists all available Custom Locations operations. // -// Generated from API version 2021-08-31-preview +// Generated from API version 2021-08-15 // - options - CustomLocationsClientListOperationsOptions contains the optional parameters for the CustomLocationsClient.NewListOperationsPager // method. func (client *CustomLocationsClient) NewListOperationsPager(options *CustomLocationsClientListOperationsOptions) *runtime.Pager[CustomLocationsClientListOperationsResponse] { @@ -534,7 +474,7 @@ func (client *CustomLocationsClient) listOperationsCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-31-preview") + reqQP.Set("api-version", "2021-08-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -552,7 +492,7 @@ func (client *CustomLocationsClient) listOperationsHandleResponse(resp *http.Res // Update - Updates a Custom Location with the specified Resource Name in the specified Resource Group and Subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-31-preview +// Generated from API version 2021-08-15 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - Custom Locations name. // - parameters - The updatable fields of an existing Custom Location. @@ -592,7 +532,7 @@ func (client *CustomLocationsClient) updateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-31-preview") + reqQP.Set("api-version", "2021-08-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/extendedlocation/armextendedlocation/customlocations_client_example_test.go b/sdk/resourcemanager/extendedlocation/armextendedlocation/customlocations_client_example_test.go index 4492bbdc10f7..58eb29d948ba 100644 --- a/sdk/resourcemanager/extendedlocation/armextendedlocation/customlocations_client_example_test.go +++ b/sdk/resourcemanager/extendedlocation/armextendedlocation/customlocations_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/extendedlocation/armextendedlocation" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8fc2b4ff626aab886f929e49926c6e836548e01/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsListOperations.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/stable/2021-08-15/examples/CustomLocationsListOperations.json func ExampleCustomLocationsClient_NewListOperationsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -151,56 +151,12 @@ func ExampleCustomLocationsClient_NewListOperationsPager() { // }, // IsDataAction: to.Ptr(false), // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ExtendedLocation/customLocations/resourceSyncRules/read"), - // Display: &armextendedlocation.CustomLocationOperationValueDisplay{ - // Description: to.Ptr("Gets a Resource Sync Rule resource"), - // Operation: to.Ptr("Get Resource Sync Rule"), - // Provider: to.Ptr("Microsoft.ExtendedLocation"), - // Resource: to.Ptr("Resource Sync Rules"), - // }, - // IsDataAction: to.Ptr(false), - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ExtendedLocation/customLocations/resourceSyncRules/write"), - // Display: &armextendedlocation.CustomLocationOperationValueDisplay{ - // Description: to.Ptr("Creates or Updates a Resource Sync Rule resource"), - // Operation: to.Ptr("Create or Update Resource Sync Rule"), - // Provider: to.Ptr("Microsoft.ExtendedLocation"), - // Resource: to.Ptr("Resource Sync Rules"), - // }, - // IsDataAction: to.Ptr(false), - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ExtendedLocation/customLocations/resourceSyncRules/delete"), - // Display: &armextendedlocation.CustomLocationOperationValueDisplay{ - // Description: to.Ptr("Deletes Resource Sync Rule resource"), - // Operation: to.Ptr("Delete Resource Sync Rule"), - // Provider: to.Ptr("Microsoft.ExtendedLocation"), - // Resource: to.Ptr("Resource Sync Rules"), - // }, - // IsDataAction: to.Ptr(false), - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ExtendedLocation/customLocations/findTargetResourceGroup/action"), - // Display: &armextendedlocation.CustomLocationOperationValueDisplay{ - // Description: to.Ptr("Evaluate Labels Against Resource Sync Rules to Get Target Resource Group"), - // Operation: to.Ptr("Find Target Resource Group Action"), - // Provider: to.Ptr("Microsoft.ExtendedLocation"), - // Resource: to.Ptr("Resource Sync Rules"), - // }, - // IsDataAction: to.Ptr(false), - // Origin: to.Ptr("user,system"), // }}, // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8fc2b4ff626aab886f929e49926c6e836548e01/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/stable/2021-08-15/examples/CustomLocationsListBySubscription.json func ExampleCustomLocationsClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -276,10 +232,10 @@ func ExampleCustomLocationsClient_NewListBySubscriptionPager() { // ProvisioningState: to.Ptr("Succeeded"), // }, // SystemData: &armextendedlocation.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-24T18:53:29.0928001Z"); return t}()), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-24T18:53:29.0928001Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armextendedlocation.CreatedByTypeApplication), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-24T18:53:29.0928001Z"); return t}()), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-24T18:53:29.0928001Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armextendedlocation.CreatedByTypeApplication), // }, @@ -288,7 +244,7 @@ func ExampleCustomLocationsClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8fc2b4ff626aab886f929e49926c6e836548e01/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/stable/2021-08-15/examples/CustomLocationsListByResourceGroup.json func ExampleCustomLocationsClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -364,10 +320,10 @@ func ExampleCustomLocationsClient_NewListByResourceGroupPager() { // ProvisioningState: to.Ptr("Succeeded"), // }, // SystemData: &armextendedlocation.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-24T18:53:29.0928001Z"); return t}()), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-24T18:53:29.0928001Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armextendedlocation.CreatedByTypeApplication), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-24T18:53:29.0928001Z"); return t}()), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-24T18:53:29.0928001Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armextendedlocation.CreatedByTypeApplication), // }, @@ -376,7 +332,7 @@ func ExampleCustomLocationsClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8fc2b4ff626aab886f929e49926c6e836548e01/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/stable/2021-08-15/examples/CustomLocationsGet.json func ExampleCustomLocationsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -416,17 +372,17 @@ func ExampleCustomLocationsClient_Get() { // ProvisioningState: to.Ptr("Succeeded"), // }, // SystemData: &armextendedlocation.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-24T18:53:29.0928001Z"); return t}()), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-24T18:53:29.0928001Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armextendedlocation.CreatedByTypeApplication), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-24T18:53:29.0928001Z"); return t}()), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-24T18:53:29.0928001Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armextendedlocation.CreatedByTypeApplication), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8fc2b4ff626aab886f929e49926c6e836548e01/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsCreate_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/stable/2021-08-15/examples/CustomLocationsCreate_Update.json func ExampleCustomLocationsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -496,7 +452,7 @@ func ExampleCustomLocationsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8fc2b4ff626aab886f929e49926c6e836548e01/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/stable/2021-08-15/examples/CustomLocationsDelete.json func ExampleCustomLocationsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -517,7 +473,7 @@ func ExampleCustomLocationsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8fc2b4ff626aab886f929e49926c6e836548e01/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsPatch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/stable/2021-08-15/examples/CustomLocationsPatch.json func ExampleCustomLocationsClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -575,17 +531,17 @@ func ExampleCustomLocationsClient_Update() { // ProvisioningState: to.Ptr("Succeeded"), // }, // SystemData: &armextendedlocation.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-24T18:53:29.0928001Z"); return t}()), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-24T18:53:29.0928001Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armextendedlocation.CreatedByTypeApplication), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-24T18:53:29.0928001Z"); return t}()), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-24T18:53:29.0928001Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armextendedlocation.CreatedByTypeApplication), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8fc2b4ff626aab886f929e49926c6e836548e01/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsListEnabledResourceTypes.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/stable/2021-08-15/examples/CustomLocationsListEnabledResourceTypes.json func ExampleCustomLocationsClient_NewListEnabledResourceTypesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -657,10 +613,10 @@ func ExampleCustomLocationsClient_NewListEnabledResourceTypesPager() { // }}, // }, // SystemData: &armextendedlocation.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-24T18:53:29.0928001Z"); return t}()), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-24T18:53:29.0928001Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armextendedlocation.CreatedByTypeApplication), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-24T18:53:29.0928001Z"); return t}()), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-24T18:53:29.0928001Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armextendedlocation.CreatedByTypeApplication), // }, @@ -668,32 +624,3 @@ func ExampleCustomLocationsClient_NewListEnabledResourceTypesPager() { // } } } - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8fc2b4ff626aab886f929e49926c6e836548e01/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsFindTargetResourceGroup.json -func ExampleCustomLocationsClient_FindTargetResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armextendedlocation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCustomLocationsClient().FindTargetResourceGroup(ctx, "testresourcegroup", "customLocation01", armextendedlocation.CustomLocationFindTargetResourceGroupProperties{ - Labels: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - }, 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.CustomLocationFindTargetResourceGroupResult = armextendedlocation.CustomLocationFindTargetResourceGroupResult{ - // MatchedResourceSyncRule: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/testresourcegroup/providers/Microsoft.ExtendedLocation/customLocations/tesla-customlocation-1-chumpishness/resourceSyncRules/test-resource-sync-rule"), - // TargetResourceGroup: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/target-resource-group/"), - // } -} diff --git a/sdk/resourcemanager/extendedlocation/armextendedlocation/models.go b/sdk/resourcemanager/extendedlocation/armextendedlocation/models.go index cd1ec0a59b4b..38092f19ae65 100644 --- a/sdk/resourcemanager/extendedlocation/armextendedlocation/models.go +++ b/sdk/resourcemanager/extendedlocation/armextendedlocation/models.go @@ -38,25 +38,6 @@ type CustomLocation struct { Type *string `json:"type,omitempty" azure:"ro"` } -// CustomLocationFindTargetResourceGroupProperties - The Find Target Resource Group operation request. -type CustomLocationFindTargetResourceGroupProperties struct { - // Labels of the custom resource, this is a map of {key,value} pairs. - Labels map[string]*string `json:"labels,omitempty"` -} - -// CustomLocationFindTargetResourceGroupResult - The Find Target Resource Group operation response. -type CustomLocationFindTargetResourceGroupResult struct { - // READ-ONLY; The matching resource sync rule is the particular resource sync rule that matched the match expressions and - // labels and had lowest priority. This is the rule responsible for mapping the target resource - // to the target resource group. - MatchedResourceSyncRule *string `json:"matchedResourceSyncRule,omitempty" azure:"ro"` - - // READ-ONLY; The target resource group of matching resource sync rule. The labels from the request will be used to find out - // matching resource sync rule against the selector property of the resource sync rule. The - // one with highest priority will be returned if there are multiple matching rules. - TargetResourceGroup *string `json:"targetResourceGroup,omitempty" azure:"ro"` -} - // CustomLocationListResult - The List Custom Locations operation response. type CustomLocationListResult struct { // READ-ONLY; The URL to use for getting the next set of results. @@ -152,12 +133,6 @@ type CustomLocationsClientBeginDeleteOptions struct { ResumeToken string } -// CustomLocationsClientFindTargetResourceGroupOptions contains the optional parameters for the CustomLocationsClient.FindTargetResourceGroup -// method. -type CustomLocationsClientFindTargetResourceGroupOptions struct { - // placeholder for future optional parameters -} - // CustomLocationsClientGetOptions contains the optional parameters for the CustomLocationsClient.Get method. type CustomLocationsClientGetOptions struct { // placeholder for future optional parameters @@ -289,18 +264,6 @@ type Identity struct { TenantID *string `json:"tenantId,omitempty" azure:"ro"` } -// MatchExpressionsProperties - Resource Sync Rules matchExpression property definition. -type MatchExpressionsProperties struct { - // Key is the label key that the selector applies to. - Key *string `json:"key,omitempty"` - - // The Operator field represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - Operator *string `json:"operator,omitempty"` - - // The label value - Values []*string `json:"values,omitempty"` -} - // PatchableCustomLocations - The Custom Locations patchable resource definition. type PatchableCustomLocations struct { // Identity for the resource. @@ -313,15 +276,6 @@ type PatchableCustomLocations struct { Tags map[string]*string `json:"tags,omitempty"` } -// PatchableResourceSyncRule - The Resource Sync Rules patchable resource definition. -type PatchableResourceSyncRule struct { - // The Resource Sync Rules patchable properties. - Properties *ResourceSyncRuleProperties `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` -} - // ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a // location type ProxyResource struct { @@ -347,116 +301,6 @@ type Resource struct { Type *string `json:"type,omitempty" azure:"ro"` } -// ResourceSyncRule - Resource Sync Rules definition. -type ResourceSyncRule struct { - // REQUIRED; The geo-location where the resource lives - Location *string `json:"location,omitempty"` - - // The set of properties specific to a Resource Sync Rule - Properties *ResourceSyncRuleProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ResourceSyncRuleListResult - The List Resource Sync Rules operation response. -type ResourceSyncRuleListResult struct { - // READ-ONLY; The URL to use for getting the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` - - // READ-ONLY; The list of Resource Sync Rules. - Value []*ResourceSyncRule `json:"value,omitempty" azure:"ro"` -} - -// ResourceSyncRuleProperties - Properties for a resource sync rule. For an unmapped custom resource, its labels will be used -// to find out matching resource sync rules using the selector property of the resource sync rule. If this -// resource sync rule has highest priority among all matching rules, then the unmapped custom resource will be projected to -// the target resource group associated with this resource sync rule. -type ResourceSyncRuleProperties struct { - // Priority represents a priority of the Resource Sync Rule - Priority *int32 `json:"priority,omitempty"` - - // A label selector is composed of two parts, matchLabels and matchExpressions. The first part, matchLabels is a map of {key,value} - // pairs. A single {key,value} in the matchLabels map is equivalent to an - // element of matchExpressions, whose key field is 'key', the operator is 'In', and the values array contains only 'value'. - // The second part, matchExpressions is a list of resource selector requirements. - // Valid operators include In, NotIn, Exists, and DoesNotExist. The values set must be non-empty in the case of In and NotIn. - // The values set must be empty in the case of Exists and DoesNotExist. All of - // the requirements, from both matchLabels and matchExpressions must all be satisfied in order to match. - Selector *ResourceSyncRulePropertiesSelector `json:"selector,omitempty"` - - // For an unmapped custom resource, its labels will be used to find matching resource sync rules. If this resource sync rule - // is one of the matching rules with highest priority, then the unmapped custom - // resource will be projected to the target resource group associated with this resource sync rule. The user creating this - // resource sync rule should have write permissions on the target resource group - // and this write permission will be validated when creating the resource sync rule. - TargetResourceGroup *string `json:"targetResourceGroup,omitempty"` - - // READ-ONLY; Provisioning State for the Resource Sync Rule. - ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` -} - -// ResourceSyncRulePropertiesSelector - A label selector is composed of two parts, matchLabels and matchExpressions. The first -// part, matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an -// element of matchExpressions, whose key field is 'key', the operator is 'In', and the values array contains only 'value'. -// The second part, matchExpressions is a list of resource selector requirements. -// Valid operators include In, NotIn, Exists, and DoesNotExist. The values set must be non-empty in the case of In and NotIn. -// The values set must be empty in the case of Exists and DoesNotExist. All of -// the requirements, from both matchLabels and matchExpressions must all be satisfied in order to match. -type ResourceSyncRulePropertiesSelector struct { - // MatchExpressions is a list of resource selector requirements. Valid operators include In, NotIn, Exists, and DoesNotExist. - // The values set must be non-empty in the case of In and NotIn. The values set - // must be empty in the case of Exists and DoesNotExist. - MatchExpressions []*MatchExpressionsProperties `json:"matchExpressions,omitempty"` - - // MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, - // whose key field is 'key', the operator is 'In', and the values - // array contains only 'value'. - MatchLabels map[string]*string `json:"matchLabels,omitempty"` -} - -// ResourceSyncRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the ResourceSyncRulesClient.BeginCreateOrUpdate -// method. -type ResourceSyncRulesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ResourceSyncRulesClientBeginUpdateOptions contains the optional parameters for the ResourceSyncRulesClient.BeginUpdate -// method. -type ResourceSyncRulesClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ResourceSyncRulesClientDeleteOptions contains the optional parameters for the ResourceSyncRulesClient.Delete method. -type ResourceSyncRulesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ResourceSyncRulesClientGetOptions contains the optional parameters for the ResourceSyncRulesClient.Get method. -type ResourceSyncRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// ResourceSyncRulesClientListByCustomLocationIDOptions contains the optional parameters for the ResourceSyncRulesClient.NewListByCustomLocationIDPager -// method. -type ResourceSyncRulesClientListByCustomLocationIDOptions struct { - // placeholder for future optional parameters -} - // SystemData - Metadata pertaining to creation and last modification of the resource. type SystemData struct { // The timestamp of resource creation (UTC). diff --git a/sdk/resourcemanager/extendedlocation/armextendedlocation/models_serde.go b/sdk/resourcemanager/extendedlocation/armextendedlocation/models_serde.go index 0726258ed8d6..aa2dac018291 100644 --- a/sdk/resourcemanager/extendedlocation/armextendedlocation/models_serde.go +++ b/sdk/resourcemanager/extendedlocation/armextendedlocation/models_serde.go @@ -71,64 +71,6 @@ func (c *CustomLocation) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CustomLocationFindTargetResourceGroupProperties. -func (c CustomLocationFindTargetResourceGroupProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "labels", c.Labels) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomLocationFindTargetResourceGroupProperties. -func (c *CustomLocationFindTargetResourceGroupProperties) 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 "labels": - err = unpopulate(val, "Labels", &c.Labels) - 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 CustomLocationFindTargetResourceGroupResult. -func (c CustomLocationFindTargetResourceGroupResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "matchedResourceSyncRule", c.MatchedResourceSyncRule) - populate(objectMap, "targetResourceGroup", c.TargetResourceGroup) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomLocationFindTargetResourceGroupResult. -func (c *CustomLocationFindTargetResourceGroupResult) 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 "matchedResourceSyncRule": - err = unpopulate(val, "MatchedResourceSyncRule", &c.MatchedResourceSyncRule) - delete(rawMsg, key) - case "targetResourceGroup": - err = unpopulate(val, "TargetResourceGroup", &c.TargetResourceGroup) - 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 CustomLocationListResult. func (c CustomLocationListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -631,41 +573,6 @@ func (i *Identity) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MatchExpressionsProperties. -func (m MatchExpressionsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "key", m.Key) - populate(objectMap, "operator", m.Operator) - populate(objectMap, "values", m.Values) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MatchExpressionsProperties. -func (m *MatchExpressionsProperties) 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 "key": - err = unpopulate(val, "Key", &m.Key) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &m.Operator) - delete(rawMsg, key) - case "values": - err = unpopulate(val, "Values", &m.Values) - 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 PatchableCustomLocations. func (p PatchableCustomLocations) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -701,37 +608,6 @@ func (p *PatchableCustomLocations) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type PatchableResourceSyncRule. -func (p PatchableResourceSyncRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PatchableResourceSyncRule. -func (p *PatchableResourceSyncRule) 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", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &p.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type ProxyResource. func (p ProxyResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -802,158 +678,6 @@ func (r *Resource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ResourceSyncRule. -func (r ResourceSyncRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", r.ID) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "systemData", r.SystemData) - populate(objectMap, "tags", r.Tags) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSyncRule. -func (r *ResourceSyncRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &r.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &r.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceSyncRuleListResult. -func (r ResourceSyncRuleListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSyncRuleListResult. -func (r *ResourceSyncRuleListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceSyncRuleProperties. -func (r ResourceSyncRuleProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "priority", r.Priority) - populate(objectMap, "provisioningState", r.ProvisioningState) - populate(objectMap, "selector", r.Selector) - populate(objectMap, "targetResourceGroup", r.TargetResourceGroup) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSyncRuleProperties. -func (r *ResourceSyncRuleProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "priority": - err = unpopulate(val, "Priority", &r.Priority) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) - delete(rawMsg, key) - case "selector": - err = unpopulate(val, "Selector", &r.Selector) - delete(rawMsg, key) - case "targetResourceGroup": - err = unpopulate(val, "TargetResourceGroup", &r.TargetResourceGroup) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceSyncRulePropertiesSelector. -func (r ResourceSyncRulePropertiesSelector) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "matchExpressions", r.MatchExpressions) - populate(objectMap, "matchLabels", r.MatchLabels) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSyncRulePropertiesSelector. -func (r *ResourceSyncRulePropertiesSelector) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "matchExpressions": - err = unpopulate(val, "MatchExpressions", &r.MatchExpressions) - delete(rawMsg, key) - case "matchLabels": - err = unpopulate(val, "MatchLabels", &r.MatchLabels) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) diff --git a/sdk/resourcemanager/extendedlocation/armextendedlocation/resourcesyncrules_client.go b/sdk/resourcemanager/extendedlocation/armextendedlocation/resourcesyncrules_client.go deleted file mode 100644 index 1b2b9f4b3715..000000000000 --- a/sdk/resourcemanager/extendedlocation/armextendedlocation/resourcesyncrules_client.go +++ /dev/null @@ -1,383 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armextendedlocation - -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" -) - -// ResourceSyncRulesClient contains the methods for the ResourceSyncRules group. -// Don't use this type directly, use NewResourceSyncRulesClient() instead. -type ResourceSyncRulesClient struct { - internal *arm.Client - subscriptionID string -} - -// NewResourceSyncRulesClient creates a new instance of ResourceSyncRulesClient with the specified values. -// - subscriptionID - The ID of the target subscription. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewResourceSyncRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceSyncRulesClient, error) { - cl, err := arm.NewClient(moduleName+".ResourceSyncRulesClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &ResourceSyncRulesClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a Resource Sync Rule in the parent Custom Location, Subscription Id and Resource -// Group -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-31-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - Custom Locations name. -// - childResourceName - Resource Sync Rule name. -// - parameters - Parameters supplied to create or update a Resource Sync Rule. -// - options - ResourceSyncRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the ResourceSyncRulesClient.BeginCreateOrUpdate -// method. -func (client *ResourceSyncRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, parameters ResourceSyncRule, options *ResourceSyncRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ResourceSyncRulesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, resourceName, childResourceName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ResourceSyncRulesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ResourceSyncRulesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// CreateOrUpdate - Creates or updates a Resource Sync Rule in the parent Custom Location, Subscription Id and Resource Group -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-31-preview -func (client *ResourceSyncRulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, parameters ResourceSyncRule, options *ResourceSyncRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, resourceName, childResourceName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ResourceSyncRulesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, parameters ResourceSyncRule, options *ResourceSyncRulesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ExtendedLocation/customLocations/{resourceName}/resourceSyncRules/{childResourceName}" - 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 resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if childResourceName == "" { - return nil, errors.New("parameter childResourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{childResourceName}", url.PathEscape(childResourceName)) - 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", "2021-08-31-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// Delete - Deletes the Resource Sync Rule with the specified Resource Sync Rule Name, Custom Location Resource Name, Resource -// Group, and Subscription Id. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-31-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - Custom Locations name. -// - childResourceName - Resource Sync Rule name. -// - options - ResourceSyncRulesClientDeleteOptions contains the optional parameters for the ResourceSyncRulesClient.Delete -// method. -func (client *ResourceSyncRulesClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, options *ResourceSyncRulesClientDeleteOptions) (ResourceSyncRulesClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, childResourceName, options) - if err != nil { - return ResourceSyncRulesClientDeleteResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ResourceSyncRulesClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ResourceSyncRulesClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return ResourceSyncRulesClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ResourceSyncRulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, options *ResourceSyncRulesClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ExtendedLocation/customLocations/{resourceName}/resourceSyncRules/{childResourceName}" - 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 resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if childResourceName == "" { - return nil, errors.New("parameter childResourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{childResourceName}", url.PathEscape(childResourceName)) - 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", "2021-08-31-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the details of the resourceSyncRule with a specified resource group, subscription id Custom Location resource -// name and Resource Sync Rule name. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-31-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - Custom Locations name. -// - childResourceName - Resource Sync Rule name. -// - options - ResourceSyncRulesClientGetOptions contains the optional parameters for the ResourceSyncRulesClient.Get method. -func (client *ResourceSyncRulesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, options *ResourceSyncRulesClientGetOptions) (ResourceSyncRulesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, childResourceName, options) - if err != nil { - return ResourceSyncRulesClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ResourceSyncRulesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceSyncRulesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ResourceSyncRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, options *ResourceSyncRulesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ExtendedLocation/customLocations/{resourceName}/resourceSyncRules/{childResourceName}" - 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 resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if childResourceName == "" { - return nil, errors.New("parameter childResourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{childResourceName}", url.PathEscape(childResourceName)) - 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", "2021-08-31-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ResourceSyncRulesClient) getHandleResponse(resp *http.Response) (ResourceSyncRulesClientGetResponse, error) { - result := ResourceSyncRulesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceSyncRule); err != nil { - return ResourceSyncRulesClientGetResponse{}, err - } - return result, nil -} - -// NewListByCustomLocationIDPager - Gets a list of Resource Sync Rules in the specified subscription. The operation returns -// properties of each Resource Sync Rule -// -// Generated from API version 2021-08-31-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - Custom Locations name. -// - options - ResourceSyncRulesClientListByCustomLocationIDOptions contains the optional parameters for the ResourceSyncRulesClient.NewListByCustomLocationIDPager -// method. -func (client *ResourceSyncRulesClient) NewListByCustomLocationIDPager(resourceGroupName string, resourceName string, options *ResourceSyncRulesClientListByCustomLocationIDOptions) *runtime.Pager[ResourceSyncRulesClientListByCustomLocationIDResponse] { - return runtime.NewPager(runtime.PagingHandler[ResourceSyncRulesClientListByCustomLocationIDResponse]{ - More: func(page ResourceSyncRulesClientListByCustomLocationIDResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ResourceSyncRulesClientListByCustomLocationIDResponse) (ResourceSyncRulesClientListByCustomLocationIDResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByCustomLocationIDCreateRequest(ctx, resourceGroupName, resourceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ResourceSyncRulesClientListByCustomLocationIDResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ResourceSyncRulesClientListByCustomLocationIDResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceSyncRulesClientListByCustomLocationIDResponse{}, runtime.NewResponseError(resp) - } - return client.listByCustomLocationIDHandleResponse(resp) - }, - }) -} - -// listByCustomLocationIDCreateRequest creates the ListByCustomLocationID request. -func (client *ResourceSyncRulesClient) listByCustomLocationIDCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *ResourceSyncRulesClientListByCustomLocationIDOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ExtendedLocation/customLocations/{resourceName}/resourceSyncRules" - 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 resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - 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", "2021-08-31-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByCustomLocationIDHandleResponse handles the ListByCustomLocationID response. -func (client *ResourceSyncRulesClient) listByCustomLocationIDHandleResponse(resp *http.Response) (ResourceSyncRulesClientListByCustomLocationIDResponse, error) { - result := ResourceSyncRulesClientListByCustomLocationIDResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceSyncRuleListResult); err != nil { - return ResourceSyncRulesClientListByCustomLocationIDResponse{}, err - } - return result, nil -} - -// BeginUpdate - Updates a Resource Sync Rule with the specified Resource Sync Rule name in the specified Resource Group, -// Subscription and Custom Location name. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-31-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - Custom Locations name. -// - childResourceName - Resource Sync Rule name. -// - parameters - The updatable fields of an existing Resource Sync Rule. -// - options - ResourceSyncRulesClientBeginUpdateOptions contains the optional parameters for the ResourceSyncRulesClient.BeginUpdate -// method. -func (client *ResourceSyncRulesClient) BeginUpdate(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, parameters PatchableResourceSyncRule, options *ResourceSyncRulesClientBeginUpdateOptions) (*runtime.Poller[ResourceSyncRulesClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, resourceName, childResourceName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ResourceSyncRulesClientUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ResourceSyncRulesClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Update - Updates a Resource Sync Rule with the specified Resource Sync Rule name in the specified Resource Group, Subscription -// and Custom Location name. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-31-preview -func (client *ResourceSyncRulesClient) update(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, parameters PatchableResourceSyncRule, options *ResourceSyncRulesClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, resourceName, childResourceName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *ResourceSyncRulesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, parameters PatchableResourceSyncRule, options *ResourceSyncRulesClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ExtendedLocation/customLocations/{resourceName}/resourceSyncRules/{childResourceName}" - 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 resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if childResourceName == "" { - return nil, errors.New("parameter childResourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{childResourceName}", url.PathEscape(childResourceName)) - 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", "2021-08-31-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} diff --git a/sdk/resourcemanager/extendedlocation/armextendedlocation/resourcesyncrules_client_example_test.go b/sdk/resourcemanager/extendedlocation/armextendedlocation/resourcesyncrules_client_example_test.go deleted file mode 100644 index 1d26ab099fcd..000000000000 --- a/sdk/resourcemanager/extendedlocation/armextendedlocation/resourcesyncrules_client_example_test.go +++ /dev/null @@ -1,315 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armextendedlocation_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/extendedlocation/armextendedlocation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8fc2b4ff626aab886f929e49926c6e836548e01/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/ResourceSyncRulesListByCustomLocationID.json -func ExampleResourceSyncRulesClient_NewListByCustomLocationIDPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armextendedlocation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewResourceSyncRulesClient().NewListByCustomLocationIDPager("testresourcegroup", "customLocation01", 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.ResourceSyncRuleListResult = armextendedlocation.ResourceSyncRuleListResult{ - // Value: []*armextendedlocation.ResourceSyncRule{ - // { - // Name: to.Ptr("resourceSyncRule01"), - // Type: to.Ptr("Microsoft.ExtendedLocation/customLocations/resourceSyncRules"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/testresourcegroup/providers/Microsoft.ExtendedLocation/customLocations/customLocation01/resourcesyncrules"), - // Location: to.Ptr("West US"), - // Properties: &armextendedlocation.ResourceSyncRuleProperties{ - // Priority: to.Ptr[int32](999), - // ProvisioningState: to.Ptr("Succeeded"), - // Selector: &armextendedlocation.ResourceSyncRulePropertiesSelector{ - // MatchExpressions: []*armextendedlocation.MatchExpressionsProperties{ - // { - // Key: to.Ptr("key4"), - // Operator: to.Ptr("In"), - // Values: []*string{ - // to.Ptr("value4")}, - // }}, - // MatchLabels: map[string]*string{ - // "key1": to.Ptr("value1"), - // }, - // }, - // TargetResourceGroup: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/testrg/"), - // }, - // SystemData: &armextendedlocation.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-16T18:53:29.0928001Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armextendedlocation.CreatedByTypeApplication), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-16T18:53:29.0928001Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armextendedlocation.CreatedByTypeApplication), - // }, - // }, - // { - // Name: to.Ptr("resourceSyncRule02"), - // Type: to.Ptr("Microsoft.ExtendedLocation/customLocations/resourceSyncRules"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/testresourcegroup/providers/Microsoft.ExtendedLocation/"), - // Location: to.Ptr("West US"), - // Properties: &armextendedlocation.ResourceSyncRuleProperties{ - // Priority: to.Ptr[int32](999), - // ProvisioningState: to.Ptr("Succeeded"), - // Selector: &armextendedlocation.ResourceSyncRulePropertiesSelector{ - // MatchExpressions: []*armextendedlocation.MatchExpressionsProperties{ - // { - // Key: to.Ptr("key8"), - // Operator: to.Ptr("In"), - // Values: []*string{ - // to.Ptr("value8")}, - // }}, - // MatchLabels: map[string]*string{ - // "key5": to.Ptr("value5"), - // }, - // }, - // TargetResourceGroup: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/amalladi-df-test/"), - // }, - // SystemData: &armextendedlocation.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-24T18:53:29.0928001Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armextendedlocation.CreatedByTypeApplication), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-24T18:53:29.0928001Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armextendedlocation.CreatedByTypeApplication), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8fc2b4ff626aab886f929e49926c6e836548e01/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/ResourceSyncRulesGet.json -func ExampleResourceSyncRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armextendedlocation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewResourceSyncRulesClient().Get(ctx, "testresourcegroup", "customLocation01", "resourceSyncRule01", 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.ResourceSyncRule = armextendedlocation.ResourceSyncRule{ - // Name: to.Ptr("resourceSyncRule01"), - // Type: to.Ptr("Microsoft.ExtendedLocation/customLocations/resourceSyncRules"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/testresourcegroup/providers/Microsoft.ExtendedLocation/customLocations/customLocation01/resourceSyncRules/resourceSyncRule01"), - // Location: to.Ptr("West US"), - // Properties: &armextendedlocation.ResourceSyncRuleProperties{ - // Priority: to.Ptr[int32](999), - // ProvisioningState: to.Ptr("Succeeded"), - // Selector: &armextendedlocation.ResourceSyncRulePropertiesSelector{ - // MatchExpressions: []*armextendedlocation.MatchExpressionsProperties{ - // { - // Key: to.Ptr("key4"), - // Operator: to.Ptr("In"), - // Values: []*string{ - // to.Ptr("value4")}, - // }}, - // MatchLabels: map[string]*string{ - // "key1": to.Ptr("value1"), - // }, - // }, - // TargetResourceGroup: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/testresourcegroup"), - // }, - // SystemData: &armextendedlocation.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-24T18:53:29.0928001Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armextendedlocation.CreatedByTypeApplication), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-24T18:53:29.0928001Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armextendedlocation.CreatedByTypeApplication), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8fc2b4ff626aab886f929e49926c6e836548e01/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/ResourceSyncRulesCreate_Update.json -func ExampleResourceSyncRulesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armextendedlocation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewResourceSyncRulesClient().BeginCreateOrUpdate(ctx, "testresourcegroup", "customLocation01", "resourceSyncRule01", armextendedlocation.ResourceSyncRule{ - Location: to.Ptr("West US"), - Properties: &armextendedlocation.ResourceSyncRuleProperties{ - Priority: to.Ptr[int32](999), - Selector: &armextendedlocation.ResourceSyncRulePropertiesSelector{ - MatchExpressions: []*armextendedlocation.MatchExpressionsProperties{ - { - Key: to.Ptr("key4"), - Operator: to.Ptr("In"), - Values: []*string{ - to.Ptr("value4")}, - }}, - MatchLabels: map[string]*string{ - "key1": to.Ptr("value1"), - }, - }, - TargetResourceGroup: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/testresourcegroup"), - }, - }, 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.ResourceSyncRule = armextendedlocation.ResourceSyncRule{ - // Name: to.Ptr("resourceSyncRule01"), - // Type: to.Ptr("Microsoft.ExtendedLocation/customLocations/resourceSyncRules"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/testresourcegroup/providers/Microsoft.ExtendedLocation/customLocations/customLocation01/resourcesyncrules/resourceSyncRule01"), - // Location: to.Ptr("West US"), - // Properties: &armextendedlocation.ResourceSyncRuleProperties{ - // Priority: to.Ptr[int32](999), - // ProvisioningState: to.Ptr("Succeeded"), - // Selector: &armextendedlocation.ResourceSyncRulePropertiesSelector{ - // MatchExpressions: []*armextendedlocation.MatchExpressionsProperties{ - // { - // Key: to.Ptr("key4"), - // Operator: to.Ptr("In"), - // Values: []*string{ - // to.Ptr("value4")}, - // }}, - // MatchLabels: map[string]*string{ - // "key1": to.Ptr("value1"), - // }, - // }, - // TargetResourceGroup: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/testresourcegroup"), - // }, - // SystemData: &armextendedlocation.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-15T18:53:29.0928001Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armextendedlocation.CreatedByTypeApplication), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-15T18:53:29.0928001Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armextendedlocation.CreatedByTypeApplication), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8fc2b4ff626aab886f929e49926c6e836548e01/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/ResourceSyncRulesDelete.json -func ExampleResourceSyncRulesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armextendedlocation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewResourceSyncRulesClient().Delete(ctx, "testresourcegroup", "customLocation01", "resourceSyncRule01", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8fc2b4ff626aab886f929e49926c6e836548e01/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/ResourceSyncRulesPatch.json -func ExampleResourceSyncRulesClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armextendedlocation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewResourceSyncRulesClient().BeginUpdate(ctx, "testresourcegroup", "customLocation01", "resourceSyncRule01", armextendedlocation.PatchableResourceSyncRule{ - Properties: &armextendedlocation.ResourceSyncRuleProperties{ - TargetResourceGroup: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/testrg/"), - }, - Tags: map[string]*string{ - "tier": to.Ptr("testing"), - }, - }, 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.ResourceSyncRule = armextendedlocation.ResourceSyncRule{ - // Name: to.Ptr("resourceSyncRule01"), - // Type: to.Ptr("Microsoft.ExtendedLocation/customLocations/resourceSyncRules"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/testresourcegroup/providers/Microsoft.ExtendedLocation/customLocations/customLocation01/resourceSyncRules/resourceSyncRule01"), - // Location: to.Ptr("West US"), - // Tags: map[string]*string{ - // "tier": to.Ptr("testing"), - // }, - // Properties: &armextendedlocation.ResourceSyncRuleProperties{ - // Priority: to.Ptr[int32](999), - // ProvisioningState: to.Ptr("Succeeded"), - // Selector: &armextendedlocation.ResourceSyncRulePropertiesSelector{ - // MatchExpressions: []*armextendedlocation.MatchExpressionsProperties{ - // { - // Key: to.Ptr("key4"), - // Operator: to.Ptr("In"), - // Values: []*string{ - // to.Ptr("value4")}, - // }}, - // MatchLabels: map[string]*string{ - // "key1": to.Ptr("value1"), - // }, - // }, - // TargetResourceGroup: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/testrg/"), - // }, - // SystemData: &armextendedlocation.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-16T23:17:11.7353229Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armextendedlocation.CreatedByTypeApplication), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-16T23:28:00.5870852Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armextendedlocation.CreatedByTypeApplication), - // }, - // } -} diff --git a/sdk/resourcemanager/extendedlocation/armextendedlocation/response_types.go b/sdk/resourcemanager/extendedlocation/armextendedlocation/response_types.go index 9a93678b3439..e9c4a8036af9 100644 --- a/sdk/resourcemanager/extendedlocation/armextendedlocation/response_types.go +++ b/sdk/resourcemanager/extendedlocation/armextendedlocation/response_types.go @@ -19,11 +19,6 @@ type CustomLocationsClientDeleteResponse struct { // placeholder for future response values } -// CustomLocationsClientFindTargetResourceGroupResponse contains the response from method CustomLocationsClient.FindTargetResourceGroup. -type CustomLocationsClientFindTargetResourceGroupResponse struct { - CustomLocationFindTargetResourceGroupResult -} - // CustomLocationsClientGetResponse contains the response from method CustomLocationsClient.Get. type CustomLocationsClientGetResponse struct { CustomLocation @@ -53,28 +48,3 @@ type CustomLocationsClientListOperationsResponse struct { type CustomLocationsClientUpdateResponse struct { CustomLocation } - -// ResourceSyncRulesClientCreateOrUpdateResponse contains the response from method ResourceSyncRulesClient.BeginCreateOrUpdate. -type ResourceSyncRulesClientCreateOrUpdateResponse struct { - ResourceSyncRule -} - -// ResourceSyncRulesClientDeleteResponse contains the response from method ResourceSyncRulesClient.Delete. -type ResourceSyncRulesClientDeleteResponse struct { - // placeholder for future response values -} - -// ResourceSyncRulesClientGetResponse contains the response from method ResourceSyncRulesClient.Get. -type ResourceSyncRulesClientGetResponse struct { - ResourceSyncRule -} - -// ResourceSyncRulesClientListByCustomLocationIDResponse contains the response from method ResourceSyncRulesClient.NewListByCustomLocationIDPager. -type ResourceSyncRulesClientListByCustomLocationIDResponse struct { - ResourceSyncRuleListResult -} - -// ResourceSyncRulesClientUpdateResponse contains the response from method ResourceSyncRulesClient.BeginUpdate. -type ResourceSyncRulesClientUpdateResponse struct { - ResourceSyncRule -} diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/CHANGELOG.md b/sdk/resourcemanager/healthcareapis/armhealthcareapis/CHANGELOG.md index 1a060f012d2e..8566d72350cd 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/CHANGELOG.md +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/CHANGELOG.md @@ -1,20 +1,11 @@ # Release History -## 1.1.0-beta.2 (2023-03-31) +## 1.1.0 (2023-04-06) ### Features Added - New struct `ClientFactory` which is a client factory used to create any client in this module -## 1.1.0-beta.1 (2022-05-19) -### Features Added - -- New struct `FhirServiceImportConfiguration` -- New struct `ServiceImportConfigurationInfo` -- New field `ImportConfiguration` in struct `ServicesProperties` -- New field `ImportConfiguration` in struct `FhirServiceProperties` - - ## 1.0.0 (2022-05-18) The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthcareapis/armhealthcareapis` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/autorest.md b/sdk/resourcemanager/healthcareapis/armhealthcareapis/autorest.md index 81a436b1b3ed..77e6c50a80a5 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/autorest.md +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.0-beta.2 - +module-version: 1.1.0 +tag: package-2021-11 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/constants.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/constants.go index 48eedf8e589b..8ac8af18b982 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/constants.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/constants.go @@ -11,7 +11,7 @@ package armhealthcareapis const ( moduleName = "armhealthcareapis" - moduleVersion = "v1.1.0-beta.2" + moduleVersion = "v1.1.0" ) // ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/dicomservices_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/dicomservices_client.go index 8a1fc1f774b5..144bd8161d8d 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/dicomservices_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/dicomservices_client.go @@ -47,7 +47,7 @@ func NewDicomServicesClient(subscriptionID string, credential azcore.TokenCreden // BeginCreateOrUpdate - Creates or updates a DICOM Service resource with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - workspaceName - The name of workspace resource. // - dicomServiceName - The name of DICOM Service resource. @@ -69,7 +69,7 @@ func (client *DicomServicesClient) BeginCreateOrUpdate(ctx context.Context, reso // CreateOrUpdate - Creates or updates a DICOM Service resource with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 func (client *DicomServicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, dicomServiceName string, dicomservice DicomService, options *DicomServicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, dicomServiceName, dicomservice, options) if err != nil { @@ -109,7 +109,7 @@ func (client *DicomServicesClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, dicomservice) @@ -118,7 +118,7 @@ func (client *DicomServicesClient) createOrUpdateCreateRequest(ctx context.Conte // BeginDelete - Deletes a DICOM Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - dicomServiceName - The name of DICOM Service resource. // - workspaceName - The name of workspace resource. @@ -139,7 +139,7 @@ func (client *DicomServicesClient) BeginDelete(ctx context.Context, resourceGrou // Delete - Deletes a DICOM Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 func (client *DicomServicesClient) deleteOperation(ctx context.Context, resourceGroupName string, dicomServiceName string, workspaceName string, options *DicomServicesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, dicomServiceName, workspaceName, options) if err != nil { @@ -179,7 +179,7 @@ func (client *DicomServicesClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ func (client *DicomServicesClient) deleteCreateRequest(ctx context.Context, reso // Get - Gets the properties of the specified DICOM Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - workspaceName - The name of workspace resource. // - dicomServiceName - The name of DICOM Service resource. @@ -232,7 +232,7 @@ func (client *DicomServicesClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +249,7 @@ func (client *DicomServicesClient) getHandleResponse(resp *http.Response) (Dicom // NewListByWorkspacePager - Lists all DICOM Services for the given workspace // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - workspaceName - The name of workspace resource. // - options - DicomServicesClientListByWorkspaceOptions contains the optional parameters for the DicomServicesClient.NewListByWorkspacePager @@ -302,7 +302,7 @@ func (client *DicomServicesClient) listByWorkspaceCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -320,7 +320,7 @@ func (client *DicomServicesClient) listByWorkspaceHandleResponse(resp *http.Resp // BeginUpdate - Patch DICOM Service details. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - dicomServiceName - The name of DICOM Service resource. // - workspaceName - The name of workspace resource. @@ -342,7 +342,7 @@ func (client *DicomServicesClient) BeginUpdate(ctx context.Context, resourceGrou // Update - Patch DICOM Service details. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 func (client *DicomServicesClient) update(ctx context.Context, resourceGroupName string, dicomServiceName string, workspaceName string, dicomservicePatchResource DicomServicePatchResource, options *DicomServicesClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, dicomServiceName, workspaceName, dicomservicePatchResource, options) if err != nil { @@ -382,7 +382,7 @@ func (client *DicomServicesClient) updateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, dicomservicePatchResource) diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/dicomservices_client_example_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/dicomservices_client_example_test.go index 113d5c86a3a1..cfabddb91c9a 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/dicomservices_client_example_test.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/dicomservices_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthcareapis/armhealthcareapis" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/dicomservices/DicomServices_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/dicomservices/DicomServices_List.json func ExampleDicomServicesClient_NewListByWorkspacePager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -76,7 +76,7 @@ func ExampleDicomServicesClient_NewListByWorkspacePager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/dicomservices/DicomServices_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/dicomservices/DicomServices_Get.json func ExampleDicomServicesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -111,7 +111,7 @@ func ExampleDicomServicesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/dicomservices/DicomServices_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/dicomservices/DicomServices_Create.json func ExampleDicomServicesClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -153,7 +153,7 @@ func ExampleDicomServicesClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/dicomservices/DicomServices_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/dicomservices/DicomServices_Patch.json func ExampleDicomServicesClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -199,7 +199,7 @@ func ExampleDicomServicesClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/dicomservices/DicomServices_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/dicomservices/DicomServices_Delete.json func ExampleDicomServicesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/fhirdestinations_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/fhirdestinations_client.go index 2d690d090856..5238b092170b 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/fhirdestinations_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/fhirdestinations_client.go @@ -46,7 +46,7 @@ func NewFhirDestinationsClient(subscriptionID string, credential azcore.TokenCre // NewListByIotConnectorPager - Lists all FHIR destinations for the given IoT Connector // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - workspaceName - The name of workspace resource. // - iotConnectorName - The name of IoT Connector resource. @@ -104,7 +104,7 @@ func (client *FhirDestinationsClient) listByIotConnectorCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/fhirdestinations_client_example_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/fhirdestinations_client_example_test.go index ff2871189046..b0df83822327 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/fhirdestinations_client_example_test.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/fhirdestinations_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthcareapis/armhealthcareapis" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/iotconnectors/iotconnector_fhirdestination_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/iotconnectors/iotconnector_fhirdestination_List.json func ExampleFhirDestinationsClient_NewListByIotConnectorPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/fhirservices_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/fhirservices_client.go index 1638ed05b369..d4677030cc3a 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/fhirservices_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/fhirservices_client.go @@ -47,7 +47,7 @@ func NewFhirServicesClient(subscriptionID string, credential azcore.TokenCredent // BeginCreateOrUpdate - Creates or updates a FHIR Service resource with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - workspaceName - The name of workspace resource. // - fhirServiceName - The name of FHIR Service resource. @@ -69,7 +69,7 @@ func (client *FhirServicesClient) BeginCreateOrUpdate(ctx context.Context, resou // CreateOrUpdate - Creates or updates a FHIR Service resource with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 func (client *FhirServicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, fhirServiceName string, fhirservice FhirService, options *FhirServicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, fhirServiceName, fhirservice, options) if err != nil { @@ -109,7 +109,7 @@ func (client *FhirServicesClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, fhirservice) @@ -118,7 +118,7 @@ func (client *FhirServicesClient) createOrUpdateCreateRequest(ctx context.Contex // BeginDelete - Deletes a FHIR Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - fhirServiceName - The name of FHIR Service resource. // - workspaceName - The name of workspace resource. @@ -139,7 +139,7 @@ func (client *FhirServicesClient) BeginDelete(ctx context.Context, resourceGroup // Delete - Deletes a FHIR Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 func (client *FhirServicesClient) deleteOperation(ctx context.Context, resourceGroupName string, fhirServiceName string, workspaceName string, options *FhirServicesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, fhirServiceName, workspaceName, options) if err != nil { @@ -179,7 +179,7 @@ func (client *FhirServicesClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ func (client *FhirServicesClient) deleteCreateRequest(ctx context.Context, resou // Get - Gets the properties of the specified FHIR Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - workspaceName - The name of workspace resource. // - fhirServiceName - The name of FHIR Service resource. @@ -232,7 +232,7 @@ func (client *FhirServicesClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +249,7 @@ func (client *FhirServicesClient) getHandleResponse(resp *http.Response) (FhirSe // NewListByWorkspacePager - Lists all FHIR Services for the given workspace // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - workspaceName - The name of workspace resource. // - options - FhirServicesClientListByWorkspaceOptions contains the optional parameters for the FhirServicesClient.NewListByWorkspacePager @@ -302,7 +302,7 @@ func (client *FhirServicesClient) listByWorkspaceCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -320,7 +320,7 @@ func (client *FhirServicesClient) listByWorkspaceHandleResponse(resp *http.Respo // BeginUpdate - Patch FHIR Service details. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - fhirServiceName - The name of FHIR Service resource. // - workspaceName - The name of workspace resource. @@ -342,7 +342,7 @@ func (client *FhirServicesClient) BeginUpdate(ctx context.Context, resourceGroup // Update - Patch FHIR Service details. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 func (client *FhirServicesClient) update(ctx context.Context, resourceGroupName string, fhirServiceName string, workspaceName string, fhirservicePatchResource FhirServicePatchResource, options *FhirServicesClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, fhirServiceName, workspaceName, fhirservicePatchResource, options) if err != nil { @@ -382,7 +382,7 @@ func (client *FhirServicesClient) updateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, fhirservicePatchResource) diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/fhirservices_client_example_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/fhirservices_client_example_test.go index ca90db6d1b86..c3fdbdc9115c 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/fhirservices_client_example_test.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/fhirservices_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthcareapis/armhealthcareapis" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/fhirservices/FhirServices_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/fhirservices/FhirServices_List.json func ExampleFhirServicesClient_NewListByWorkspacePager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -62,7 +62,7 @@ func ExampleFhirServicesClient_NewListByWorkspacePager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/fhirservices/FhirServices_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/fhirservices/FhirServices_Get.json func ExampleFhirServicesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -90,7 +90,7 @@ func ExampleFhirServicesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/fhirservices/FhirServices_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/fhirservices/FhirServices_Create.json func ExampleFhirServicesClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -147,11 +147,6 @@ func ExampleFhirServicesClient_BeginCreateOrUpdate() { ExportConfiguration: &armhealthcareapis.FhirServiceExportConfiguration{ StorageAccountName: to.Ptr("existingStorageAccount"), }, - ImportConfiguration: &armhealthcareapis.FhirServiceImportConfiguration{ - Enabled: to.Ptr(false), - InitialImportMode: to.Ptr(false), - IntegrationDataStore: to.Ptr("existingStorageAccount"), - }, }, }, nil) if err != nil { @@ -208,17 +203,12 @@ func ExampleFhirServicesClient_BeginCreateOrUpdate() { // ExportConfiguration: &armhealthcareapis.FhirServiceExportConfiguration{ // StorageAccountName: to.Ptr("existingStorageAccount"), // }, - // ImportConfiguration: &armhealthcareapis.FhirServiceImportConfiguration{ - // Enabled: to.Ptr(false), - // InitialImportMode: to.Ptr(false), - // IntegrationDataStore: to.Ptr("existingStorageAccount"), - // }, // ProvisioningState: to.Ptr(armhealthcareapis.ProvisioningStateSucceeded), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/fhirservices/FhirServices_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/fhirservices/FhirServices_Patch.json func ExampleFhirServicesClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -257,7 +247,7 @@ func ExampleFhirServicesClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/fhirservices/FhirServices_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/fhirservices/FhirServices_Delete.json func ExampleFhirServicesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/iotconnectorfhirdestination_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/iotconnectorfhirdestination_client.go index 58d5375e17bb..f094b9a1573f 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/iotconnectorfhirdestination_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/iotconnectorfhirdestination_client.go @@ -47,7 +47,7 @@ func NewIotConnectorFhirDestinationClient(subscriptionID string, credential azco // BeginCreateOrUpdate - Creates or updates an IoT Connector FHIR destination resource with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - workspaceName - The name of workspace resource. // - iotConnectorName - The name of IoT Connector resource. @@ -70,7 +70,7 @@ func (client *IotConnectorFhirDestinationClient) BeginCreateOrUpdate(ctx context // CreateOrUpdate - Creates or updates an IoT Connector FHIR destination resource with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 func (client *IotConnectorFhirDestinationClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, iotConnectorName string, fhirDestinationName string, iotFhirDestination IotFhirDestination, options *IotConnectorFhirDestinationClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, iotConnectorName, fhirDestinationName, iotFhirDestination, options) if err != nil { @@ -114,7 +114,7 @@ func (client *IotConnectorFhirDestinationClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, iotFhirDestination) @@ -123,7 +123,7 @@ func (client *IotConnectorFhirDestinationClient) createOrUpdateCreateRequest(ctx // BeginDelete - Deletes an IoT Connector FHIR destination. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - workspaceName - The name of workspace resource. // - iotConnectorName - The name of IoT Connector resource. @@ -145,7 +145,7 @@ func (client *IotConnectorFhirDestinationClient) BeginDelete(ctx context.Context // Delete - Deletes an IoT Connector FHIR destination. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 func (client *IotConnectorFhirDestinationClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, iotConnectorName string, fhirDestinationName string, options *IotConnectorFhirDestinationClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, iotConnectorName, fhirDestinationName, options) if err != nil { @@ -189,7 +189,7 @@ func (client *IotConnectorFhirDestinationClient) deleteCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ func (client *IotConnectorFhirDestinationClient) deleteCreateRequest(ctx context // Get - Gets the properties of the specified Iot Connector FHIR destination. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - workspaceName - The name of workspace resource. // - iotConnectorName - The name of IoT Connector resource. @@ -248,7 +248,7 @@ func (client *IotConnectorFhirDestinationClient) getCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/iotconnectorfhirdestination_client_example_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/iotconnectorfhirdestination_client_example_test.go index 691e2a8389a5..4fc794313dee 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/iotconnectorfhirdestination_client_example_test.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/iotconnectorfhirdestination_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthcareapis/armhealthcareapis" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/iotconnectors/iotconnector_fhirdestination_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/iotconnectors/iotconnector_fhirdestination_Get.json func ExampleIotConnectorFhirDestinationClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -83,7 +83,7 @@ func ExampleIotConnectorFhirDestinationClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/iotconnectors/iotconnector_fhirdestination_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/iotconnectors/iotconnector_fhirdestination_Create.json func ExampleIotConnectorFhirDestinationClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -185,7 +185,7 @@ func ExampleIotConnectorFhirDestinationClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/iotconnectors/iotconnector_fhirdestination_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/iotconnectors/iotconnector_fhirdestination_Delete.json func ExampleIotConnectorFhirDestinationClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/iotconnectors_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/iotconnectors_client.go index 5999aae13a65..91c24ca97928 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/iotconnectors_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/iotconnectors_client.go @@ -47,7 +47,7 @@ func NewIotConnectorsClient(subscriptionID string, credential azcore.TokenCreden // BeginCreateOrUpdate - Creates or updates an IoT Connector resource with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - workspaceName - The name of workspace resource. // - iotConnectorName - The name of IoT Connector resource. @@ -69,7 +69,7 @@ func (client *IotConnectorsClient) BeginCreateOrUpdate(ctx context.Context, reso // CreateOrUpdate - Creates or updates an IoT Connector resource with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 func (client *IotConnectorsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, iotConnectorName string, iotConnector IotConnector, options *IotConnectorsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, iotConnectorName, iotConnector, options) if err != nil { @@ -109,7 +109,7 @@ func (client *IotConnectorsClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, iotConnector) @@ -118,7 +118,7 @@ func (client *IotConnectorsClient) createOrUpdateCreateRequest(ctx context.Conte // BeginDelete - Deletes an IoT Connector. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - iotConnectorName - The name of IoT Connector resource. // - workspaceName - The name of workspace resource. @@ -139,7 +139,7 @@ func (client *IotConnectorsClient) BeginDelete(ctx context.Context, resourceGrou // Delete - Deletes an IoT Connector. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 func (client *IotConnectorsClient) deleteOperation(ctx context.Context, resourceGroupName string, iotConnectorName string, workspaceName string, options *IotConnectorsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, iotConnectorName, workspaceName, options) if err != nil { @@ -179,7 +179,7 @@ func (client *IotConnectorsClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ func (client *IotConnectorsClient) deleteCreateRequest(ctx context.Context, reso // Get - Gets the properties of the specified IoT Connector. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - workspaceName - The name of workspace resource. // - iotConnectorName - The name of IoT Connector resource. @@ -232,7 +232,7 @@ func (client *IotConnectorsClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +249,7 @@ func (client *IotConnectorsClient) getHandleResponse(resp *http.Response) (IotCo // NewListByWorkspacePager - Lists all IoT Connectors for the given workspace // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - workspaceName - The name of workspace resource. // - options - IotConnectorsClientListByWorkspaceOptions contains the optional parameters for the IotConnectorsClient.NewListByWorkspacePager @@ -302,7 +302,7 @@ func (client *IotConnectorsClient) listByWorkspaceCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -320,7 +320,7 @@ func (client *IotConnectorsClient) listByWorkspaceHandleResponse(resp *http.Resp // BeginUpdate - Patch an IoT Connector. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - iotConnectorName - The name of IoT Connector resource. // - workspaceName - The name of workspace resource. @@ -342,7 +342,7 @@ func (client *IotConnectorsClient) BeginUpdate(ctx context.Context, resourceGrou // Update - Patch an IoT Connector. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 func (client *IotConnectorsClient) update(ctx context.Context, resourceGroupName string, iotConnectorName string, workspaceName string, iotConnectorPatchResource IotConnectorPatchResource, options *IotConnectorsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, iotConnectorName, workspaceName, iotConnectorPatchResource, options) if err != nil { @@ -382,7 +382,7 @@ func (client *IotConnectorsClient) updateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, iotConnectorPatchResource) diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/iotconnectors_client_example_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/iotconnectors_client_example_test.go index c5e5ba70d14a..9acdcecf1365 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/iotconnectors_client_example_test.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/iotconnectors_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthcareapis/armhealthcareapis" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/iotconnectors/iotconnector_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/iotconnectors/iotconnector_List.json func ExampleIotConnectorsClient_NewListByWorkspacePager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -150,7 +150,7 @@ func ExampleIotConnectorsClient_NewListByWorkspacePager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/iotconnectors/iotconnector_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/iotconnectors/iotconnector_Get.json func ExampleIotConnectorsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -222,7 +222,7 @@ func ExampleIotConnectorsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/iotconnectors/iotconnector_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/iotconnectors/iotconnector_Create.json func ExampleIotConnectorsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -338,7 +338,7 @@ func ExampleIotConnectorsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/iotconnectors/iotconnector_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/iotconnectors/iotconnector_Patch.json func ExampleIotConnectorsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -423,7 +423,7 @@ func ExampleIotConnectorsClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/iotconnectors/iotconnector_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/iotconnectors/iotconnector_Delete.json func ExampleIotConnectorsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/models.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/models.go index 531cecfdfe0d..a76c398717da 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/models.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/models.go @@ -248,18 +248,6 @@ type FhirServiceExportConfiguration struct { StorageAccountName *string `json:"storageAccountName,omitempty"` } -// FhirServiceImportConfiguration - Import operation configuration information -type FhirServiceImportConfiguration struct { - // If the import operation is enabled. - Enabled *bool `json:"enabled,omitempty"` - - // If the FHIR service is in InitialImportMode. - InitialImportMode *bool `json:"initialImportMode,omitempty"` - - // The name of the default integration storage account. - IntegrationDataStore *string `json:"integrationDataStore,omitempty"` -} - // FhirServicePatchResource - FhirService patch properties type FhirServicePatchResource struct { // Setting indicating whether the service has a managed identity associated with it. @@ -286,9 +274,6 @@ type FhirServiceProperties struct { // Fhir Service export configuration. ExportConfiguration *FhirServiceExportConfiguration `json:"exportConfiguration,omitempty"` - // Fhir Service import configuration. - ImportConfiguration *FhirServiceImportConfiguration `json:"importConfiguration,omitempty"` - // Control permission for data plane traffic coming from public networks while private endpoint is enabled. PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` @@ -945,18 +930,6 @@ type ServiceExportConfigurationInfo struct { StorageAccountName *string `json:"storageAccountName,omitempty"` } -// ServiceImportConfigurationInfo - Import operation configuration information -type ServiceImportConfigurationInfo struct { - // If the import operation is enabled. - Enabled *bool `json:"enabled,omitempty"` - - // If the FHIR service is in InitialImportMode. - InitialImportMode *bool `json:"initialImportMode,omitempty"` - - // The name of the default integration storage account. - IntegrationDataStore *string `json:"integrationDataStore,omitempty"` -} - // ServiceManagedIdentity - Managed service identity (system assigned and/or user assigned identities) type ServiceManagedIdentity struct { // Setting indicating whether the service has a managed identity associated with it. @@ -1127,9 +1100,6 @@ type ServicesProperties struct { // The settings for the export operation of the service instance. ExportConfiguration *ServiceExportConfigurationInfo `json:"exportConfiguration,omitempty"` - // The settings for the import operation of the service instance. - ImportConfiguration *ServiceImportConfigurationInfo `json:"importConfiguration,omitempty"` - // The list of private endpoint connections that are set up for this resource. PrivateEndpointConnections []*PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/models_serde.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/models_serde.go index 44d65a8247a4..ce8b5f4fbf07 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/models_serde.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/models_serde.go @@ -588,41 +588,6 @@ func (f *FhirServiceExportConfiguration) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type FhirServiceImportConfiguration. -func (f FhirServiceImportConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", f.Enabled) - populate(objectMap, "initialImportMode", f.InitialImportMode) - populate(objectMap, "integrationDataStore", f.IntegrationDataStore) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FhirServiceImportConfiguration. -func (f *FhirServiceImportConfiguration) 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", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &f.Enabled) - delete(rawMsg, key) - case "initialImportMode": - err = unpopulate(val, "InitialImportMode", &f.InitialImportMode) - delete(rawMsg, key) - case "integrationDataStore": - err = unpopulate(val, "IntegrationDataStore", &f.IntegrationDataStore) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type FhirServicePatchResource. func (f FhirServicePatchResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -663,7 +628,6 @@ func (f FhirServiceProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "corsConfiguration", f.CorsConfiguration) populate(objectMap, "eventState", f.EventState) populate(objectMap, "exportConfiguration", f.ExportConfiguration) - populate(objectMap, "importConfiguration", f.ImportConfiguration) populate(objectMap, "privateEndpointConnections", f.PrivateEndpointConnections) populate(objectMap, "provisioningState", f.ProvisioningState) populate(objectMap, "publicNetworkAccess", f.PublicNetworkAccess) @@ -698,9 +662,6 @@ func (f *FhirServiceProperties) UnmarshalJSON(data []byte) error { case "exportConfiguration": err = unpopulate(val, "ExportConfiguration", &f.ExportConfiguration) delete(rawMsg, key) - case "importConfiguration": - err = unpopulate(val, "ImportConfiguration", &f.ImportConfiguration) - delete(rawMsg, key) case "privateEndpointConnections": err = unpopulate(val, "PrivateEndpointConnections", &f.PrivateEndpointConnections) delete(rawMsg, key) @@ -2161,41 +2122,6 @@ func (s *ServiceExportConfigurationInfo) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ServiceImportConfigurationInfo. -func (s ServiceImportConfigurationInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", s.Enabled) - populate(objectMap, "initialImportMode", s.InitialImportMode) - populate(objectMap, "integrationDataStore", s.IntegrationDataStore) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceImportConfigurationInfo. -func (s *ServiceImportConfigurationInfo) 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", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &s.Enabled) - delete(rawMsg, key) - case "initialImportMode": - err = unpopulate(val, "InitialImportMode", &s.InitialImportMode) - delete(rawMsg, key) - case "integrationDataStore": - err = unpopulate(val, "IntegrationDataStore", &s.IntegrationDataStore) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type ServiceManagedIdentity. func (s ServiceManagedIdentity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2497,7 +2423,6 @@ func (s ServicesProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "corsConfiguration", s.CorsConfiguration) populate(objectMap, "cosmosDbConfiguration", s.CosmosDbConfiguration) populate(objectMap, "exportConfiguration", s.ExportConfiguration) - populate(objectMap, "importConfiguration", s.ImportConfiguration) populate(objectMap, "privateEndpointConnections", s.PrivateEndpointConnections) populate(objectMap, "provisioningState", s.ProvisioningState) populate(objectMap, "publicNetworkAccess", s.PublicNetworkAccess) @@ -2531,9 +2456,6 @@ func (s *ServicesProperties) UnmarshalJSON(data []byte) error { case "exportConfiguration": err = unpopulate(val, "ExportConfiguration", &s.ExportConfiguration) delete(rawMsg, key) - case "importConfiguration": - err = unpopulate(val, "ImportConfiguration", &s.ImportConfiguration) - delete(rawMsg, key) case "privateEndpointConnections": err = unpopulate(val, "PrivateEndpointConnections", &s.PrivateEndpointConnections) delete(rawMsg, key) diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/operationresults_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/operationresults_client.go index 50683d5abee0..3dafc82130f9 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/operationresults_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/operationresults_client.go @@ -47,7 +47,7 @@ func NewOperationResultsClient(subscriptionID string, credential azcore.TokenCre // Get - Get the operation result for a long running operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - locationName - The location of the operation. // - operationResultID - The ID of the operation result to get. // - options - OperationResultsClientGetOptions contains the optional parameters for the OperationResultsClient.Get method. @@ -86,7 +86,7 @@ func (client *OperationResultsClient) getCreateRequest(ctx context.Context, loca return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/operationresults_client_example_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/operationresults_client_example_test.go index e0e6b1e11445..2fc51f1031e1 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/operationresults_client_example_test.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/operationresults_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthcareapis/armhealthcareapis" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/OperationResultsGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/OperationResultsGet.json func ExampleOperationResultsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/operations_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/operations_client.go index 3976c3eff2fe..14792a6682fc 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/operations_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/operations_client.go @@ -40,7 +40,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available operations supported by Microsoft Healthcare resource provider. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -78,7 +78,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/operations_client_example_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/operations_client_example_test.go index 7949c4a7f4fb..1e8feef1e732 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/operations_client_example_test.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/operations_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthcareapis/armhealthcareapis" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/OperationsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/OperationsList.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/privateendpointconnections_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/privateendpointconnections_client.go index 84d6230b1a53..8b6c40d7ab0c 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/privateendpointconnections_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/privateendpointconnections_client.go @@ -47,7 +47,7 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcor // BeginCreateOrUpdate - Update the state of the specified private endpoint connection associated with the service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - resourceName - The name of the service instance. // - privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource @@ -69,7 +69,7 @@ func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context. // CreateOrUpdate - Update the state of the specified private endpoint connection associated with the service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 func (client *PrivateEndpointConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, properties PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, resourceName, privateEndpointConnectionName, properties, options) if err != nil { @@ -109,7 +109,7 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, properties) @@ -118,7 +118,7 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx // BeginDelete - Deletes a private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - resourceName - The name of the service instance. // - privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource @@ -139,7 +139,7 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, // Delete - Deletes a private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, privateEndpointConnectionName, options) if err != nil { @@ -179,7 +179,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // Get - Gets the specified private endpoint connection associated with the service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - resourceName - The name of the service instance. // - privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource @@ -233,7 +233,7 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -250,7 +250,7 @@ func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Res // NewListByServicePager - Lists all private endpoint connections for a service. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - resourceName - The name of the service instance. // - options - PrivateEndpointConnectionsClientListByServiceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByServicePager @@ -297,7 +297,7 @@ func (client *PrivateEndpointConnectionsClient) listByServiceCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/privateendpointconnections_client_example_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/privateendpointconnections_client_example_test.go index 5bf050ed4816..ab331e3421fa 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/privateendpointconnections_client_example_test.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/privateendpointconnections_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthcareapis/armhealthcareapis" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/ServiceListPrivateEndpointConnections.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/legacy/ServiceListPrivateEndpointConnections.json func ExamplePrivateEndpointConnectionsClient_NewListByServicePager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -61,7 +61,7 @@ func ExamplePrivateEndpointConnectionsClient_NewListByServicePager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/ServiceGetPrivateEndpointConnection.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/legacy/ServiceGetPrivateEndpointConnection.json func ExamplePrivateEndpointConnectionsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -96,7 +96,7 @@ func ExamplePrivateEndpointConnectionsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/ServiceCreatePrivateEndpointConnection.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/legacy/ServiceCreatePrivateEndpointConnection.json func ExamplePrivateEndpointConnectionsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -143,7 +143,7 @@ func ExamplePrivateEndpointConnectionsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/ServiceDeletePrivateEndpointConnection.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/legacy/ServiceDeletePrivateEndpointConnection.json func ExamplePrivateEndpointConnectionsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/privatelinkresources_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/privatelinkresources_client.go index 0cc4541b28a9..90b85a6780ab 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/privatelinkresources_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/privatelinkresources_client.go @@ -47,7 +47,7 @@ func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.Toke // Get - Gets a private link resource that need to be created for a service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - resourceName - The name of the service instance. // - groupName - The name of the private link resource group. @@ -92,7 +92,7 @@ func (client *PrivateLinkResourcesClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -110,7 +110,7 @@ func (client *PrivateLinkResourcesClient) getHandleResponse(resp *http.Response) // ListByService - Gets the private link resources that need to be created for a service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - resourceName - The name of the service instance. // - options - PrivateLinkResourcesClientListByServiceOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByService @@ -150,7 +150,7 @@ func (client *PrivateLinkResourcesClient) listByServiceCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/privatelinkresources_client_example_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/privatelinkresources_client_example_test.go index 245d5317700f..29d2f982f2a3 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/privatelinkresources_client_example_test.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/privatelinkresources_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthcareapis/armhealthcareapis" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/PrivateLinkResourcesListByService.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/legacy/PrivateLinkResourcesListByService.json func ExamplePrivateLinkResourcesClient_ListByService() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -52,7 +52,7 @@ func ExamplePrivateLinkResourcesClient_ListByService() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/PrivateLinkResourceGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/legacy/PrivateLinkResourceGet.json func ExamplePrivateLinkResourcesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/services_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/services_client.go index 3c9576e104ef..0272d0cd24eb 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/services_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/services_client.go @@ -47,7 +47,7 @@ func NewServicesClient(subscriptionID string, credential azcore.TokenCredential, // CheckNameAvailability - Check if a service instance name is available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - checkNameAvailabilityInputs - Set the name parameter in the CheckNameAvailabilityParameters structure to the name of the // service instance to check. // - options - ServicesClientCheckNameAvailabilityOptions contains the optional parameters for the ServicesClient.CheckNameAvailability @@ -79,7 +79,7 @@ func (client *ServicesClient) checkNameAvailabilityCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, checkNameAvailabilityInputs) @@ -97,7 +97,7 @@ func (client *ServicesClient) checkNameAvailabilityHandleResponse(resp *http.Res // BeginCreateOrUpdate - Create or update the metadata of a service instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - resourceName - The name of the service instance. // - serviceDescription - The service instance metadata. @@ -118,7 +118,7 @@ func (client *ServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceG // CreateOrUpdate - Create or update the metadata of a service instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 func (client *ServicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, serviceDescription ServicesDescription, options *ServicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, resourceName, serviceDescription, options) if err != nil { @@ -154,7 +154,7 @@ func (client *ServicesClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, serviceDescription) @@ -163,7 +163,7 @@ func (client *ServicesClient) createOrUpdateCreateRequest(ctx context.Context, r // BeginDelete - Delete a service instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - resourceName - The name of the service instance. // - options - ServicesClientBeginDeleteOptions contains the optional parameters for the ServicesClient.BeginDelete method. @@ -182,7 +182,7 @@ func (client *ServicesClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Delete a service instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 func (client *ServicesClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, options *ServicesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { @@ -218,7 +218,7 @@ func (client *ServicesClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -227,7 +227,7 @@ func (client *ServicesClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Get the metadata of a service instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - resourceName - The name of the service instance. // - options - ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method. @@ -266,7 +266,7 @@ func (client *ServicesClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -283,7 +283,7 @@ func (client *ServicesClient) getHandleResponse(resp *http.Response) (ServicesCl // NewListPager - Get all the service instances in a subscription. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - options - ServicesClientListOptions contains the optional parameters for the ServicesClient.NewListPager method. func (client *ServicesClient) NewListPager(options *ServicesClientListOptions) *runtime.Pager[ServicesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ServicesClientListResponse]{ @@ -325,7 +325,7 @@ func (client *ServicesClient) listCreateRequest(ctx context.Context, options *Se return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -342,7 +342,7 @@ func (client *ServicesClient) listHandleResponse(resp *http.Response) (ServicesC // NewListByResourceGroupPager - Get all the service instances in a resource group. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - options - ServicesClientListByResourceGroupOptions contains the optional parameters for the ServicesClient.NewListByResourceGroupPager // method. @@ -390,7 +390,7 @@ func (client *ServicesClient) listByResourceGroupCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -408,7 +408,7 @@ func (client *ServicesClient) listByResourceGroupHandleResponse(resp *http.Respo // BeginUpdate - Update the metadata of a service instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - resourceName - The name of the service instance. // - servicePatchDescription - The service instance metadata and security metadata. @@ -428,7 +428,7 @@ func (client *ServicesClient) BeginUpdate(ctx context.Context, resourceGroupName // Update - Update the metadata of a service instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 func (client *ServicesClient) update(ctx context.Context, resourceGroupName string, resourceName string, servicePatchDescription ServicesPatchDescription, options *ServicesClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, resourceName, servicePatchDescription, options) if err != nil { @@ -464,7 +464,7 @@ func (client *ServicesClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, servicePatchDescription) diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/services_client_example_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/services_client_example_test.go index 2d9a34e64eca..c93460bf6ecc 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/services_client_example_test.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/services_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthcareapis/armhealthcareapis" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/ServiceGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/legacy/ServiceGet.json func ExampleServicesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -85,7 +85,7 @@ func ExampleServicesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/ServiceCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/legacy/ServiceCreate.json func ExampleServicesClient_BeginCreateOrUpdate_createOrUpdateAServiceWithAllParameters() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -209,7 +209,7 @@ func ExampleServicesClient_BeginCreateOrUpdate_createOrUpdateAServiceWithAllPara // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/ServiceCreateMinimum.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/legacy/ServiceCreateMinimum.json func ExampleServicesClient_BeginCreateOrUpdate_createOrUpdateAServiceWithMinimumParameters() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -280,7 +280,7 @@ func ExampleServicesClient_BeginCreateOrUpdate_createOrUpdateAServiceWithMinimum // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/ServicePatch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/legacy/ServicePatch.json func ExampleServicesClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -358,7 +358,7 @@ func ExampleServicesClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/ServiceDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/legacy/ServiceDelete.json func ExampleServicesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -379,7 +379,7 @@ func ExampleServicesClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/ServiceList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/legacy/ServiceList.json func ExampleServicesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -454,7 +454,7 @@ func ExampleServicesClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/ServiceListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/legacy/ServiceListByResourceGroup.json func ExampleServicesClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -529,7 +529,7 @@ func ExampleServicesClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/CheckNameAvailabilityPost.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/CheckNameAvailabilityPost.json func ExampleServicesClient_CheckNameAvailability() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaceprivateendpointconnections_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaceprivateendpointconnections_client.go index 158bd04357f0..1976b9bd8330 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaceprivateendpointconnections_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaceprivateendpointconnections_client.go @@ -47,7 +47,7 @@ func NewWorkspacePrivateEndpointConnectionsClient(subscriptionID string, credent // BeginCreateOrUpdate - Update the state of the specified private endpoint connection associated with the workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - workspaceName - The name of workspace resource. // - privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource @@ -69,7 +69,7 @@ func (client *WorkspacePrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx // CreateOrUpdate - Update the state of the specified private endpoint connection associated with the workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 func (client *WorkspacePrivateEndpointConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, properties PrivateEndpointConnectionDescription, options *WorkspacePrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, privateEndpointConnectionName, properties, options) if err != nil { @@ -109,7 +109,7 @@ func (client *WorkspacePrivateEndpointConnectionsClient) createOrUpdateCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, properties) @@ -118,7 +118,7 @@ func (client *WorkspacePrivateEndpointConnectionsClient) createOrUpdateCreateReq // BeginDelete - Deletes a private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - workspaceName - The name of workspace resource. // - privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource @@ -139,7 +139,7 @@ func (client *WorkspacePrivateEndpointConnectionsClient) BeginDelete(ctx context // Delete - Deletes a private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 func (client *WorkspacePrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, options *WorkspacePrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, privateEndpointConnectionName, options) if err != nil { @@ -179,7 +179,7 @@ func (client *WorkspacePrivateEndpointConnectionsClient) deleteCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ func (client *WorkspacePrivateEndpointConnectionsClient) deleteCreateRequest(ctx // Get - Gets the specified private endpoint connection associated with the workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - workspaceName - The name of workspace resource. // - privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource @@ -233,7 +233,7 @@ func (client *WorkspacePrivateEndpointConnectionsClient) getCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -250,7 +250,7 @@ func (client *WorkspacePrivateEndpointConnectionsClient) getHandleResponse(resp // NewListByWorkspacePager - Lists all private endpoint connections for a workspace. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - workspaceName - The name of workspace resource. // - options - WorkspacePrivateEndpointConnectionsClientListByWorkspaceOptions contains the optional parameters for the WorkspacePrivateEndpointConnectionsClient.NewListByWorkspacePager @@ -297,7 +297,7 @@ func (client *WorkspacePrivateEndpointConnectionsClient) listByWorkspaceCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaceprivateendpointconnections_client_example_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaceprivateendpointconnections_client_example_test.go index 37a328a78300..bedf3256e2a1 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaceprivateendpointconnections_client_example_test.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaceprivateendpointconnections_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthcareapis/armhealthcareapis" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/privatelink/WorkspaceListPrivateEndpointConnections.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/privatelink/WorkspaceListPrivateEndpointConnections.json func ExampleWorkspacePrivateEndpointConnectionsClient_NewListByWorkspacePager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -61,7 +61,7 @@ func ExampleWorkspacePrivateEndpointConnectionsClient_NewListByWorkspacePager() } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/privatelink/WorkspaceGetPrivateEndpointConnection.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/privatelink/WorkspaceGetPrivateEndpointConnection.json func ExampleWorkspacePrivateEndpointConnectionsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -96,7 +96,7 @@ func ExampleWorkspacePrivateEndpointConnectionsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/privatelink/WorkspaceCreatePrivateEndpointConnection.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/privatelink/WorkspaceCreatePrivateEndpointConnection.json func ExampleWorkspacePrivateEndpointConnectionsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -143,7 +143,7 @@ func ExampleWorkspacePrivateEndpointConnectionsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/privatelink/WorkspaceDeletePrivateEndpointConnection.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/privatelink/WorkspaceDeletePrivateEndpointConnection.json func ExampleWorkspacePrivateEndpointConnectionsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaceprivatelinkresources_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaceprivatelinkresources_client.go index 559bc732512f..a1bf787f8714 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaceprivatelinkresources_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaceprivatelinkresources_client.go @@ -47,7 +47,7 @@ func NewWorkspacePrivateLinkResourcesClient(subscriptionID string, credential az // Get - Gets a private link resource that need to be created for a workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - workspaceName - The name of workspace resource. // - groupName - The name of the private link resource group. @@ -92,7 +92,7 @@ func (client *WorkspacePrivateLinkResourcesClient) getCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -109,7 +109,7 @@ func (client *WorkspacePrivateLinkResourcesClient) getHandleResponse(resp *http. // NewListByWorkspacePager - Gets the private link resources that need to be created for a workspace. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - workspaceName - The name of workspace resource. // - options - WorkspacePrivateLinkResourcesClientListByWorkspaceOptions contains the optional parameters for the WorkspacePrivateLinkResourcesClient.NewListByWorkspacePager @@ -156,7 +156,7 @@ func (client *WorkspacePrivateLinkResourcesClient) listByWorkspaceCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaceprivatelinkresources_client_example_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaceprivatelinkresources_client_example_test.go index 372fa2b5aca5..e10203a07c6a 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaceprivatelinkresources_client_example_test.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaceprivatelinkresources_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthcareapis/armhealthcareapis" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/privatelink/PrivateLinkResourcesListByWorkspace.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/privatelink/PrivateLinkResourcesListByWorkspace.json func ExampleWorkspacePrivateLinkResourcesClient_NewListByWorkspacePager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -59,7 +59,7 @@ func ExampleWorkspacePrivateLinkResourcesClient_NewListByWorkspacePager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/privatelink/WorkspacePrivateLinkResourceGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/privatelink/WorkspacePrivateLinkResourceGet.json func ExampleWorkspacePrivateLinkResourcesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaces_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaces_client.go index 3f68791c0527..d48342a17787 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaces_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaces_client.go @@ -47,7 +47,7 @@ func NewWorkspacesClient(subscriptionID string, credential azcore.TokenCredentia // BeginCreateOrUpdate - Creates or updates a workspace resource with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - workspaceName - The name of workspace resource. // - workspace - The parameters for creating or updating a healthcare workspace. @@ -68,7 +68,7 @@ func (client *WorkspacesClient) BeginCreateOrUpdate(ctx context.Context, resourc // CreateOrUpdate - Creates or updates a workspace resource with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 func (client *WorkspacesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, workspace Workspace, options *WorkspacesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, workspace, options) if err != nil { @@ -104,7 +104,7 @@ func (client *WorkspacesClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, workspace) @@ -113,7 +113,7 @@ func (client *WorkspacesClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Deletes a specified workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - workspaceName - The name of workspace resource. // - options - WorkspacesClientBeginDeleteOptions contains the optional parameters for the WorkspacesClient.BeginDelete method. @@ -132,7 +132,7 @@ func (client *WorkspacesClient) BeginDelete(ctx context.Context, resourceGroupNa // Delete - Deletes a specified workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 func (client *WorkspacesClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { @@ -168,7 +168,7 @@ func (client *WorkspacesClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -177,7 +177,7 @@ func (client *WorkspacesClient) deleteCreateRequest(ctx context.Context, resourc // Get - Gets the properties of the specified workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - workspaceName - The name of workspace resource. // - options - WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method. @@ -216,7 +216,7 @@ func (client *WorkspacesClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -233,7 +233,7 @@ func (client *WorkspacesClient) getHandleResponse(resp *http.Response) (Workspac // NewListByResourceGroupPager - Lists all the available workspaces under the specified resource group. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - options - WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.NewListByResourceGroupPager // method. @@ -281,7 +281,7 @@ func (client *WorkspacesClient) listByResourceGroupCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -298,7 +298,7 @@ func (client *WorkspacesClient) listByResourceGroupHandleResponse(resp *http.Res // NewListBySubscriptionPager - Lists all the available workspaces under the specified subscription. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - options - WorkspacesClientListBySubscriptionOptions contains the optional parameters for the WorkspacesClient.NewListBySubscriptionPager // method. func (client *WorkspacesClient) NewListBySubscriptionPager(options *WorkspacesClientListBySubscriptionOptions) *runtime.Pager[WorkspacesClientListBySubscriptionResponse] { @@ -341,7 +341,7 @@ func (client *WorkspacesClient) listBySubscriptionCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -359,7 +359,7 @@ func (client *WorkspacesClient) listBySubscriptionHandleResponse(resp *http.Resp // BeginUpdate - Patch workspace details. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 // - resourceGroupName - The name of the resource group that contains the service instance. // - workspaceName - The name of workspace resource. // - workspacePatchResource - The parameters for updating a specified workspace. @@ -379,7 +379,7 @@ func (client *WorkspacesClient) BeginUpdate(ctx context.Context, resourceGroupNa // Update - Patch workspace details. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-01-31-preview +// Generated from API version 2021-11-01 func (client *WorkspacesClient) update(ctx context.Context, resourceGroupName string, workspaceName string, workspacePatchResource WorkspacePatchResource, options *WorkspacesClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, workspaceName, workspacePatchResource, options) if err != nil { @@ -415,7 +415,7 @@ func (client *WorkspacesClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2021-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, workspacePatchResource) diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaces_client_example_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaces_client_example_test.go index 4f395372f051..c1334a4b31d4 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaces_client_example_test.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaces_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthcareapis/armhealthcareapis" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/workspaces/Workspaces_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/workspaces/Workspaces_ListBySubscription.json func ExampleWorkspacesClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -55,7 +55,7 @@ func ExampleWorkspacesClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/workspaces/Workspaces_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/workspaces/Workspaces_ListByResourceGroup.json func ExampleWorkspacesClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -92,7 +92,7 @@ func ExampleWorkspacesClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/workspaces/Workspaces_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/workspaces/Workspaces_Get.json func ExampleWorkspacesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -121,7 +121,7 @@ func ExampleWorkspacesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/workspaces/Workspaces_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/workspaces/Workspaces_Create.json func ExampleWorkspacesClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -157,7 +157,7 @@ func ExampleWorkspacesClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/workspaces/Workspaces_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/workspaces/Workspaces_Patch.json func ExampleWorkspacesClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -197,7 +197,7 @@ func ExampleWorkspacesClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/workspaces/Workspaces_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2021-11-01/examples/workspaces/Workspaces_Delete.json func ExampleWorkspacesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil {