diff --git a/sdk/resourcemanager/appplatform/armappplatform/CHANGELOG.md b/sdk/resourcemanager/appplatform/armappplatform/CHANGELOG.md index 34d3245f6145..3797c5061295 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/CHANGELOG.md +++ b/sdk/resourcemanager/appplatform/armappplatform/CHANGELOG.md @@ -1,333 +1,98 @@ # Release History -## 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` +## 2.0.0 (2023-02-13) +### Breaking Changes +- Struct `CloudError` has been removed +- Struct `CloudErrorBody` has been removed -## 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 type alias `APIPortalProvisioningState` with values `APIPortalProvisioningStateCreating`, `APIPortalProvisioningStateDeleting`, `APIPortalProvisioningStateFailed`, `APIPortalProvisioningStateSucceeded`, `APIPortalProvisioningStateUpdating` +- New type alias `BackendProtocol` with values `BackendProtocolDefault`, `BackendProtocolGRPC` +- New type alias `CertificateResourceProvisioningState` with values `CertificateResourceProvisioningStateCreating`, `CertificateResourceProvisioningStateDeleting`, `CertificateResourceProvisioningStateFailed`, `CertificateResourceProvisioningStateSucceeded`, `CertificateResourceProvisioningStateUpdating` +- New type alias `CustomDomainResourceProvisioningState` with values `CustomDomainResourceProvisioningStateCreating`, `CustomDomainResourceProvisioningStateDeleting`, `CustomDomainResourceProvisioningStateFailed`, `CustomDomainResourceProvisioningStateSucceeded`, `CustomDomainResourceProvisioningStateUpdating` +- New type alias `GatewayProvisioningState` with values `GatewayProvisioningStateCreating`, `GatewayProvisioningStateDeleting`, `GatewayProvisioningStateFailed`, `GatewayProvisioningStateSucceeded`, `GatewayProvisioningStateUpdating` +- New type alias `GatewayRouteConfigProtocol` with values `GatewayRouteConfigProtocolHTTP`, `GatewayRouteConfigProtocolHTTPS` +- New type alias `HTTPSchemeType` with values `HTTPSchemeTypeHTTP`, `HTTPSchemeTypeHTTPS` +- New type alias `PowerState` with values `PowerStateRunning`, `PowerStateStopped` +- New type alias `ProbeActionType` with values `ProbeActionTypeExecAction`, `ProbeActionTypeHTTPGetAction`, `ProbeActionTypeTCPSocketAction` +- New type alias `SessionAffinity` with values `SessionAffinityCookie`, `SessionAffinityNone` +- New type alias `StorageType` with values `StorageTypeStorageAccount` +- New type alias `Type` with values `TypeAzureFileVolume` +- New function `NewAPIPortalCustomDomainsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*APIPortalCustomDomainsClient, error)` +- New function `*APIPortalCustomDomainsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, APIPortalCustomDomainResource, *APIPortalCustomDomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[APIPortalCustomDomainsClientCreateOrUpdateResponse], error)` +- New function `*APIPortalCustomDomainsClient.BeginDelete(context.Context, string, string, string, string, *APIPortalCustomDomainsClientBeginDeleteOptions) (*runtime.Poller[APIPortalCustomDomainsClientDeleteResponse], error)` +- New function `*APIPortalCustomDomainsClient.Get(context.Context, string, string, string, string, *APIPortalCustomDomainsClientGetOptions) (APIPortalCustomDomainsClientGetResponse, error)` +- New function `*APIPortalCustomDomainsClient.NewListPager(string, string, string, *APIPortalCustomDomainsClientListOptions) *runtime.Pager[APIPortalCustomDomainsClientListResponse]` +- New function `NewAPIPortalsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*APIPortalsClient, error)` +- New function `*APIPortalsClient.BeginCreateOrUpdate(context.Context, string, string, string, APIPortalResource, *APIPortalsClientBeginCreateOrUpdateOptions) (*runtime.Poller[APIPortalsClientCreateOrUpdateResponse], error)` +- New function `*APIPortalsClient.BeginDelete(context.Context, string, string, string, *APIPortalsClientBeginDeleteOptions) (*runtime.Poller[APIPortalsClientDeleteResponse], error)` +- New function `*APIPortalsClient.Get(context.Context, string, string, string, *APIPortalsClientGetOptions) (APIPortalsClientGetResponse, error)` +- New function `*APIPortalsClient.NewListPager(string, string, *APIPortalsClientListOptions) *runtime.Pager[APIPortalsClientListResponse]` +- New function `*APIPortalsClient.ValidateDomain(context.Context, string, string, string, CustomDomainValidatePayload, *APIPortalsClientValidateDomainOptions) (APIPortalsClientValidateDomainResponse, 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 `*BuildServiceBuilderClient.ListDeployments(context.Context, string, string, string, string, *BuildServiceBuilderClientListDeploymentsOptions) (BuildServiceBuilderClientListDeploymentsResponse, error)` - 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 `*DeploymentsClient.BeginDisableRemoteDebugging(context.Context, string, string, string, string, *DeploymentsClientBeginDisableRemoteDebuggingOptions) (*runtime.Poller[DeploymentsClientDisableRemoteDebuggingResponse], error)` +- New function `*DeploymentsClient.BeginEnableRemoteDebugging(context.Context, string, string, string, string, *DeploymentsClientBeginEnableRemoteDebuggingOptions) (*runtime.Poller[DeploymentsClientEnableRemoteDebuggingResponse], error)` +- New function `*DeploymentsClient.GetRemoteDebuggingConfig(context.Context, string, string, string, string, *DeploymentsClientGetRemoteDebuggingConfigOptions) (DeploymentsClientGetRemoteDebuggingConfigResponse, error)` - New function `*ExecAction.GetProbeAction() *ProbeAction` -- New function `GatewayProperties.MarshalJSON() ([]byte, error)` -- New function `*AzureFileVolume.UnmarshalJSON([]byte) error` +- New function `NewGatewayCustomDomainsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*GatewayCustomDomainsClient, error)` +- New function `*GatewayCustomDomainsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, GatewayCustomDomainResource, *GatewayCustomDomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[GatewayCustomDomainsClientCreateOrUpdateResponse], error)` +- New function `*GatewayCustomDomainsClient.BeginDelete(context.Context, string, string, string, string, *GatewayCustomDomainsClientBeginDeleteOptions) (*runtime.Poller[GatewayCustomDomainsClientDeleteResponse], error)` +- New function `*GatewayCustomDomainsClient.Get(context.Context, string, string, string, string, *GatewayCustomDomainsClientGetOptions) (GatewayCustomDomainsClientGetResponse, error)` +- New function `*GatewayCustomDomainsClient.NewListPager(string, string, string, *GatewayCustomDomainsClientListOptions) *runtime.Pager[GatewayCustomDomainsClientListResponse]` +- New function `NewGatewayRouteConfigsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*GatewayRouteConfigsClient, error)` +- New function `*GatewayRouteConfigsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, GatewayRouteConfigResource, *GatewayRouteConfigsClientBeginCreateOrUpdateOptions) (*runtime.Poller[GatewayRouteConfigsClientCreateOrUpdateResponse], error)` +- New function `*GatewayRouteConfigsClient.BeginDelete(context.Context, string, string, string, string, *GatewayRouteConfigsClientBeginDeleteOptions) (*runtime.Poller[GatewayRouteConfigsClientDeleteResponse], error)` +- New function `*GatewayRouteConfigsClient.Get(context.Context, string, string, string, string, *GatewayRouteConfigsClientGetOptions) (GatewayRouteConfigsClientGetResponse, error)` +- New function `*GatewayRouteConfigsClient.NewListPager(string, string, string, *GatewayRouteConfigsClientListOptions) *runtime.Pager[GatewayRouteConfigsClientListResponse]` +- New function `NewGatewaysClient(string, azcore.TokenCredential, *arm.ClientOptions) (*GatewaysClient, error)` +- New function `*GatewaysClient.BeginCreateOrUpdate(context.Context, string, string, string, GatewayResource, *GatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[GatewaysClientCreateOrUpdateResponse], error)` +- New function `*GatewaysClient.BeginDelete(context.Context, string, string, string, *GatewaysClientBeginDeleteOptions) (*runtime.Poller[GatewaysClientDeleteResponse], error)` +- New function `*GatewaysClient.Get(context.Context, string, string, string, *GatewaysClientGetOptions) (GatewaysClientGetResponse, error)` +- New function `*GatewaysClient.NewListPager(string, string, *GatewaysClientListOptions) *runtime.Pager[GatewaysClientListResponse]` +- New function `*GatewaysClient.ValidateDomain(context.Context, string, string, string, CustomDomainValidatePayload, *GatewaysClientValidateDomainOptions) (GatewaysClientValidateDomainResponse, error)` +- New function `*HTTPGetAction.GetProbeAction() *ProbeAction` +- New function `*ProbeAction.GetProbeAction() *ProbeAction` +- New function `*ServicesClient.BeginStart(context.Context, string, string, *ServicesClientBeginStartOptions) (*runtime.Poller[ServicesClientStartResponse], 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 function `*StorageAccount.GetStorageProperties() *StorageProperties` +- New function `*StorageProperties.GetStorageProperties() *StorageProperties` +- New function `NewStoragesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*StoragesClient, error)` +- New function `*StoragesClient.BeginCreateOrUpdate(context.Context, string, string, string, StorageResource, *StoragesClientBeginCreateOrUpdateOptions) (*runtime.Poller[StoragesClientCreateOrUpdateResponse], error)` +- New function `*StoragesClient.BeginDelete(context.Context, string, string, string, *StoragesClientBeginDeleteOptions) (*runtime.Poller[StoragesClientDeleteResponse], error)` +- New function `*StoragesClient.Get(context.Context, string, string, string, *StoragesClientGetOptions) (StoragesClientGetResponse, error)` +- New function `*StoragesClient.NewListPager(string, string, *StoragesClientListOptions) *runtime.Pager[StoragesClientListResponse]` +- New function `*TCPSocketAction.GetProbeAction() *ProbeAction` - New struct `APIPortalCustomDomainProperties` - New struct `APIPortalCustomDomainResource` - New struct `APIPortalCustomDomainResourceCollection` -- New struct `APIPortalCustomDomainsClientBeginCreateOrUpdateOptions` -- New struct `APIPortalCustomDomainsClientBeginDeleteOptions` +- New struct `APIPortalCustomDomainsClient` - 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 `APIPortalsClient` - 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 `DeploymentList` +- New struct `DeploymentsClientDisableRemoteDebuggingResponse` +- New struct `DeploymentsClientEnableRemoteDebuggingResponse` - New struct `ExecAction` - New struct `GatewayAPIMetadataProperties` - New struct `GatewayAPIRoute` @@ -335,13 +100,9 @@ - New struct `GatewayCustomDomainProperties` - New struct `GatewayCustomDomainResource` - New struct `GatewayCustomDomainResourceCollection` -- New struct `GatewayCustomDomainsClientBeginCreateOrUpdateOptions` -- New struct `GatewayCustomDomainsClientBeginDeleteOptions` +- New struct `GatewayCustomDomainsClient` - New struct `GatewayCustomDomainsClientCreateOrUpdateResponse` - New struct `GatewayCustomDomainsClientDeleteResponse` -- New struct `GatewayCustomDomainsClientGetOptions` -- New struct `GatewayCustomDomainsClientGetResponse` -- New struct `GatewayCustomDomainsClientListOptions` - New struct `GatewayCustomDomainsClientListResponse` - New struct `GatewayInstance` - New struct `GatewayOperatorProperties` @@ -354,67 +115,53 @@ - New struct `GatewayRouteConfigProperties` - New struct `GatewayRouteConfigResource` - New struct `GatewayRouteConfigResourceCollection` -- New struct `GatewayRouteConfigsClientBeginCreateOrUpdateOptions` -- New struct `GatewayRouteConfigsClientBeginDeleteOptions` +- New struct `GatewayRouteConfigsClient` - 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 `GatewaysClient` - 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 `IngressSettings` +- New struct `IngressSettingsClientAuth` - New struct `Probe` -- New struct `ProbeAction` +- New struct `RemoteDebugging` +- New struct `RemoteDebuggingPayload` - 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 `StoragesClient` - 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 `CustomPersistentDisks` in struct `AppResourceProperties` +- New field `IngressSettings` in struct `AppResourceProperties` +- New field `VnetAddons` in struct `AppResourceProperties` +- New field `ResourceRequests` in struct `BuildProperties` - New field `ProvisioningState` in struct `CertificateProperties` -- New field `IngressConfig` in struct `NetworkProfile` +- New field `PowerState` in struct `ClusterResourceProperties` +- New field `VnetAddons` in struct `ClusterResourceProperties` +- New field `ProvisioningState` in struct `ContentCertificateProperties` +- New field `ProvisioningState` in struct `CustomDomainProperties` +- New field `ContainerProbeSettings` in struct `DeploymentSettings` - 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 `ProvisioningState` in struct `KeyVaultCertificateProperties` - New field `UserAssignedIdentities` in struct `ManagedIdentityProperties` -- New field `ProvisioningState` in struct `ContentCertificateProperties` -- New field `CustomPersistentDisks` in struct `AppResourceProperties` -- New field `VnetAddons` in struct `AppResourceProperties` +- New field `IngressConfig` in struct `NetworkProfile` +- New field `OutboundType` in struct `NetworkProfile` ## 1.0.0 (2022-05-17) diff --git a/sdk/resourcemanager/appplatform/armappplatform/apiportalcustomdomains_client.go b/sdk/resourcemanager/appplatform/armappplatform/apiportalcustomdomains_client.go index df8586cf31e1..82c2cd17d85d 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/apiportalcustomdomains_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/apiportalcustomdomains_client.go @@ -32,10 +32,10 @@ type APIPortalCustomDomainsClient struct { } // 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. +// - 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) { if options == nil { options = &arm.ClientOptions{} @@ -58,15 +58,16 @@ func NewAPIPortalCustomDomainsClient(subscriptionID string, credential azcore.To // 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. +// +// Generated from API version 2022-12-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. +// - 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) @@ -81,7 +82,8 @@ func (client *APIPortalCustomDomainsClient) BeginCreateOrUpdate(ctx context.Cont // 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 +// +// Generated from API version 2022-12-01 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 { @@ -125,7 +127,7 @@ func (client *APIPortalCustomDomainsClient) createOrUpdateCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, apiPortalCustomDomainResource) @@ -133,14 +135,15 @@ func (client *APIPortalCustomDomainsClient) createOrUpdateCreateRequest(ctx cont // 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. +// +// Generated from API version 2022-12-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. +// - 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) @@ -155,7 +158,8 @@ func (client *APIPortalCustomDomainsClient) BeginDelete(ctx context.Context, res // 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 +// +// Generated from API version 2022-12-01 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 { @@ -199,7 +203,7 @@ func (client *APIPortalCustomDomainsClient) deleteCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -207,14 +211,15 @@ func (client *APIPortalCustomDomainsClient) deleteCreateRequest(ctx context.Cont // 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. +// +// Generated from API version 2022-12-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. +// - 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 { @@ -258,7 +263,7 @@ func (client *APIPortalCustomDomainsClient) 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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -274,13 +279,14 @@ func (client *APIPortalCustomDomainsClient) getHandleResponse(resp *http.Respons } // 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.List -// method. +// +// Generated from API version 2022-12-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. +// - 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 { @@ -333,7 +339,7 @@ func (client *APIPortalCustomDomainsClient) listCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appplatform/armappplatform/apiportalcustomdomains_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/apiportalcustomdomains_client_example_test.go deleted file mode 100644 index 358a94825cf2..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/apiportalcustomdomains_client_example_test.go +++ /dev/null @@ -1,109 +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. - -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/tree/main/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() - client, err := armappplatform.NewAPIPortalCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", "myDomainName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewAPIPortalCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewAPIPortalCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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/tree/main/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() - client, err := armappplatform.NewAPIPortalCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", "default", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/apiportals_client.go b/sdk/resourcemanager/appplatform/armappplatform/apiportals_client.go index a25228831145..3f580972ff8b 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/apiportals_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/apiportals_client.go @@ -32,10 +32,10 @@ type APIPortalsClient struct { } // 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. +// - 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) { if options == nil { options = &arm.ClientOptions{} @@ -58,14 +58,15 @@ func NewAPIPortalsClient(subscriptionID string, credential azcore.TokenCredentia // 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. +// +// Generated from API version 2022-12-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. +// - 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) @@ -80,7 +81,8 @@ func (client *APIPortalsClient) BeginCreateOrUpdate(ctx context.Context, resourc // 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 +// +// Generated from API version 2022-12-01 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 { @@ -120,7 +122,7 @@ func (client *APIPortalsClient) 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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, apiPortalResource) @@ -128,12 +130,13 @@ func (client *APIPortalsClient) createOrUpdateCreateRequest(ctx context.Context, // 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. +// +// Generated from API version 2022-12-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. +// - 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) @@ -148,7 +151,8 @@ func (client *APIPortalsClient) BeginDelete(ctx context.Context, resourceGroupNa // Delete - Delete the default API portal. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2022-12-01 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 { @@ -188,7 +192,7 @@ func (client *APIPortalsClient) deleteCreateRequest(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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -196,12 +200,13 @@ func (client *APIPortalsClient) deleteCreateRequest(ctx context.Context, resourc // 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. +// +// Generated from API version 2022-12-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. +// - 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 { @@ -241,7 +246,7 @@ func (client *APIPortalsClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -257,11 +262,12 @@ func (client *APIPortalsClient) getHandleResponse(resp *http.Response) (APIPorta } // 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.List method. +// +// Generated from API version 2022-12-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. +// - 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 { @@ -310,7 +316,7 @@ func (client *APIPortalsClient) listCreateRequest(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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -327,14 +333,15 @@ func (client *APIPortalsClient) listHandleResponse(resp *http.Response) (APIPort // 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. +// +// Generated from API version 2022-12-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. +// - 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 { @@ -374,7 +381,7 @@ func (client *APIPortalsClient) validateDomainCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, validatePayload) 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 e148b53d1e33..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/apiportals_client_example_test.go +++ /dev/null @@ -1,137 +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. - -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/tree/main/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() - client, err := armappplatform.NewAPIPortalsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewAPIPortalsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewAPIPortalsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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/tree/main/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() - client, err := armappplatform.NewAPIPortalsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewAPIPortalsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.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) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/applicationaccelerators_client.go b/sdk/resourcemanager/appplatform/armappplatform/applicationaccelerators_client.go deleted file mode 100644 index 81e797706a0a..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/applicationaccelerators_client.go +++ /dev/null @@ -1,329 +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" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "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 { - host string - subscriptionID string - pl runtime.Pipeline -} - -// 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) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ApplicationAcceleratorsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - 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.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ApplicationAcceleratorsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, 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.pl.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.host, 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.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ApplicationAcceleratorsClientDeleteResponse](options.ResumeToken, client.pl, 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.pl.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.host, 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.pl.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.host, 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.List -// 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.pl.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.host, 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 3b995ac77654..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/applicationaccelerators_client_example_test.go +++ /dev/null @@ -1,112 +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. - -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/tree/main/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() - client, err := armappplatform.NewApplicationAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewApplicationAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewApplicationAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewApplicationAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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 2ff426c6ed4f..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/applicationliveviews_client.go +++ /dev/null @@ -1,329 +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" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "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 { - host string - subscriptionID string - pl runtime.Pipeline -} - -// 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) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ApplicationLiveViewsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - 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.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ApplicationLiveViewsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, 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.pl.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.host, 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.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ApplicationLiveViewsClientDeleteResponse](options.ResumeToken, client.pl, 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.pl.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.host, 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.pl.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.host, 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.List -// 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.pl.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.host, 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 1ebe46052ba7..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/applicationliveviews_client_example_test.go +++ /dev/null @@ -1,106 +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. - -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/tree/main/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() - client, err := armappplatform.NewApplicationLiveViewsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewApplicationLiveViewsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewApplicationLiveViewsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewApplicationLiveViewsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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 8b4c504847d7..40e3ea310411 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/apps_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/apps_client.go @@ -32,10 +32,10 @@ type AppsClient struct { } // NewAppsClient creates a new instance of AppsClient 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. +// - 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 NewAppsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AppsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,14 +58,15 @@ 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 -// 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. -// appResource - Parameters for the create or update operation -// options - AppsClientBeginCreateOrUpdateOptions contains the optional parameters for the AppsClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - appResource - Parameters for the create or update operation +// - options - AppsClientBeginCreateOrUpdateOptions contains the optional parameters for the AppsClient.BeginCreateOrUpdate +// method. func (client *AppsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource, options *AppsClientBeginCreateOrUpdateOptions) (*runtime.Poller[AppsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, appName, appResource, options) @@ -80,7 +81,8 @@ 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-12-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 { @@ -120,7 +122,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, appResource) @@ -128,12 +130,13 @@ 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 -// 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. -// options - AppsClientBeginDeleteOptions contains the optional parameters for the AppsClient.BeginDelete method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - options - AppsClientBeginDeleteOptions contains the optional parameters for the AppsClient.BeginDelete method. func (client *AppsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientBeginDeleteOptions) (*runtime.Poller[AppsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, appName, options) @@ -148,7 +151,8 @@ 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-12-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 { @@ -188,7 +192,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -196,12 +200,13 @@ 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 -// 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. -// options - AppsClientGetOptions contains the optional parameters for the AppsClient.Get method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - options - AppsClientGetOptions contains the optional parameters for the AppsClient.Get method. func (client *AppsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientGetOptions) (AppsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, appName, options) if err != nil { @@ -241,7 +246,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-12-01") if options != nil && options.SyncStatus != nil { reqQP.Set("syncStatus", *options.SyncStatus) } @@ -261,13 +266,14 @@ 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 -// 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. -// options - AppsClientGetResourceUploadURLOptions contains the optional parameters for the AppsClient.GetResourceUploadURL -// method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - options - AppsClientGetResourceUploadURLOptions contains the optional parameters for the AppsClient.GetResourceUploadURL +// method. func (client *AppsClient) GetResourceUploadURL(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientGetResourceUploadURLOptions) (AppsClientGetResourceUploadURLResponse, error) { req, err := client.getResourceUploadURLCreateRequest(ctx, resourceGroupName, serviceName, appName, options) if err != nil { @@ -307,7 +313,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -323,11 +329,12 @@ 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 -// 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 - AppsClientListOptions contains the optional parameters for the AppsClient.List method. +// +// Generated from API version 2022-12-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. +// - options - AppsClientListOptions contains the optional parameters for the AppsClient.NewListPager method. func (client *AppsClient) NewListPager(resourceGroupName string, serviceName string, options *AppsClientListOptions) *runtime.Pager[AppsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[AppsClientListResponse]{ More: func(page AppsClientListResponse) bool { @@ -376,7 +383,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -393,14 +400,15 @@ 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 -// 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. -// activeDeploymentCollection - A list of Deployment name to be active. -// options - AppsClientBeginSetActiveDeploymentsOptions contains the optional parameters for the AppsClient.BeginSetActiveDeployments -// method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - activeDeploymentCollection - A list of Deployment name to be active. +// - options - AppsClientBeginSetActiveDeploymentsOptions contains the optional parameters for the AppsClient.BeginSetActiveDeployments +// method. func (client *AppsClient) BeginSetActiveDeployments(ctx context.Context, resourceGroupName string, serviceName string, appName string, activeDeploymentCollection ActiveDeploymentCollection, options *AppsClientBeginSetActiveDeploymentsOptions) (*runtime.Poller[AppsClientSetActiveDeploymentsResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.setActiveDeployments(ctx, resourceGroupName, serviceName, appName, activeDeploymentCollection, options) @@ -415,7 +423,8 @@ 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-12-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 { @@ -455,7 +464,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, activeDeploymentCollection) @@ -463,13 +472,14 @@ 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 -// 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. -// appResource - Parameters for the update operation -// options - AppsClientBeginUpdateOptions contains the optional parameters for the AppsClient.BeginUpdate method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - appResource - Parameters for the update operation +// - options - AppsClientBeginUpdateOptions contains the optional parameters for the AppsClient.BeginUpdate method. func (client *AppsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource, options *AppsClientBeginUpdateOptions) (*runtime.Poller[AppsClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, serviceName, appName, appResource, options) @@ -484,7 +494,8 @@ 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-12-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 +535,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, appResource) @@ -532,13 +543,14 @@ 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 -// 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. -// validatePayload - Custom domain payload to be validated -// options - AppsClientValidateDomainOptions contains the optional parameters for the AppsClient.ValidateDomain method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - validatePayload - Custom domain payload to be validated +// - options - AppsClientValidateDomainOptions contains the optional parameters for the AppsClient.ValidateDomain method. func (client *AppsClient) ValidateDomain(ctx context.Context, resourceGroupName string, serviceName string, appName string, validatePayload CustomDomainValidatePayload, options *AppsClientValidateDomainOptions) (AppsClientValidateDomainResponse, error) { req, err := client.validateDomainCreateRequest(ctx, resourceGroupName, serviceName, appName, validatePayload, options) if err != nil { @@ -578,7 +590,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-12-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 deleted file mode 100644 index 292a9ad2d431..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/apps_client_example_test.go +++ /dev/null @@ -1,459 +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. - -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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_Get.json -func ExampleAppsClient_Get_appsGet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAppsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "myapp", &armappplatform.AppsClientGetOptions{SyncStatus: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewAppsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "myapp", &armappplatform.AppsClientGetOptions{SyncStatus: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_CreateOrUpdate.json -func ExampleAppsClient_BeginCreateOrUpdate_appsCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAppsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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]interface{}{ - "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), - }, - }, - }, 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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewAppsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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]interface{}{ - "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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_Delete.json -func ExampleAppsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAppsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "myapp", 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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_Update.json -func ExampleAppsClient_BeginUpdate_appsUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAppsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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), - }, - }, - }, 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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewAppsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_List.json -func ExampleAppsClient_NewListPager_appsList() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAppsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewAppsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_GetResourceUploadUrl.json -func ExampleAppsClient_GetResourceUploadURL() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAppsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetResourceUploadURL(ctx, "myResourceGroup", "myservice", "myapp", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_SetActiveDeployments.json -func ExampleAppsClient_BeginSetActiveDeployments() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAppsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginSetActiveDeployments(ctx, "myResourceGroup", "myservice", "myapp", armappplatform.ActiveDeploymentCollection{ - ActiveDeploymentNames: []*string{ - to.Ptr("default")}, - }, 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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_ValidateDomain.json -func ExampleAppsClient_ValidateDomain() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAppsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ValidateDomain(ctx, "myResourceGroup", "myservice", "myapp", armappplatform.CustomDomainValidatePayload{ - Name: to.Ptr("mydomain.io"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/autorest.md b/sdk/resourcemanager/appplatform/armappplatform/autorest.md index 33f2b29b50ba..d5bc2e6e4c21 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/autorest.md +++ b/sdk/resourcemanager/appplatform/armappplatform/autorest.md @@ -5,8 +5,8 @@ ``` 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 +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/appplatform/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/appplatform/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.0-beta.2 +module-version: 2.0.0 ``` \ 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 fa8de699fa20..144a98f3602f 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/bindings_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/bindings_client.go @@ -32,10 +32,10 @@ type BindingsClient struct { } // NewBindingsClient creates a new instance of BindingsClient 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. +// - 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 NewBindingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BindingsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,15 +58,16 @@ 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 -// 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. -// bindingName - The name of the Binding resource. -// bindingResource - Parameters for the create or update operation -// options - BindingsClientBeginCreateOrUpdateOptions contains the optional parameters for the BindingsClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - bindingName - The name of the Binding resource. +// - bindingResource - Parameters for the create or update operation +// - options - BindingsClientBeginCreateOrUpdateOptions contains the optional parameters for the BindingsClient.BeginCreateOrUpdate +// method. func (client *BindingsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource, options *BindingsClientBeginCreateOrUpdateOptions) (*runtime.Poller[BindingsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, appName, bindingName, bindingResource, options) @@ -81,7 +82,8 @@ 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-12-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 { @@ -125,7 +127,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, bindingResource) @@ -133,13 +135,14 @@ 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 -// 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. -// bindingName - The name of the Binding resource. -// options - BindingsClientBeginDeleteOptions contains the optional parameters for the BindingsClient.BeginDelete method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - bindingName - The name of the Binding resource. +// - options - BindingsClientBeginDeleteOptions contains the optional parameters for the BindingsClient.BeginDelete method. func (client *BindingsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, options *BindingsClientBeginDeleteOptions) (*runtime.Poller[BindingsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, appName, bindingName, options) @@ -154,7 +157,8 @@ 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-12-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 { @@ -198,7 +202,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -206,13 +210,14 @@ 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 -// 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. -// bindingName - The name of the Binding resource. -// options - BindingsClientGetOptions contains the optional parameters for the BindingsClient.Get method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - bindingName - The name of the Binding resource. +// - options - BindingsClientGetOptions contains the optional parameters for the BindingsClient.Get method. func (client *BindingsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, options *BindingsClientGetOptions) (BindingsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, appName, bindingName, options) if err != nil { @@ -256,7 +261,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -272,12 +277,13 @@ 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 -// 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. -// options - BindingsClientListOptions contains the optional parameters for the BindingsClient.List method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - options - BindingsClientListOptions contains the optional parameters for the BindingsClient.NewListPager method. func (client *BindingsClient) NewListPager(resourceGroupName string, serviceName string, appName string, options *BindingsClientListOptions) *runtime.Pager[BindingsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[BindingsClientListResponse]{ More: func(page BindingsClientListResponse) bool { @@ -330,7 +336,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -347,14 +353,15 @@ 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 -// 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. -// bindingName - The name of the Binding resource. -// bindingResource - Parameters for the update operation -// options - BindingsClientBeginUpdateOptions contains the optional parameters for the BindingsClient.BeginUpdate method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - bindingName - The name of the Binding resource. +// - bindingResource - Parameters for the update operation +// - options - BindingsClientBeginUpdateOptions contains the optional parameters for the BindingsClient.BeginUpdate method. func (client *BindingsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource, options *BindingsClientBeginUpdateOptions) (*runtime.Poller[BindingsClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, serviceName, appName, bindingName, bindingResource, options) @@ -369,7 +376,8 @@ 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-12-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 { @@ -413,7 +421,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-12-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 deleted file mode 100644 index cb92232974a3..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/bindings_client_example_test.go +++ /dev/null @@ -1,145 +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. - -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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Bindings_Get.json -func ExampleBindingsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBindingsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "myapp", "mybinding", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Bindings_CreateOrUpdate.json -func ExampleBindingsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBindingsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mybinding", armappplatform.BindingResource{ - Properties: &armappplatform.BindingResourceProperties{ - BindingParameters: map[string]interface{}{ - "apiType": "SQL", - "databaseName": "db1", - }, - Key: to.Ptr("xxxx"), - ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DocumentDB/databaseAccounts/my-cosmosdb-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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Bindings_Delete.json -func ExampleBindingsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBindingsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "myapp", "mybinding", 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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Bindings_Update.json -func ExampleBindingsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBindingsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mybinding", armappplatform.BindingResource{ - Properties: &armappplatform.BindingResourceProperties{ - BindingParameters: map[string]interface{}{ - "apiType": "SQL", - "databaseName": "db1", - }, - Key: to.Ptr("xxxx"), - }, - }, 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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Bindings_List.json -func ExampleBindingsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBindingsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", "myapp", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/buildpackbinding_client.go b/sdk/resourcemanager/appplatform/armappplatform/buildpackbinding_client.go index 85db3390ca76..93c57b775209 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/buildpackbinding_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/buildpackbinding_client.go @@ -32,10 +32,10 @@ type BuildpackBindingClient struct { } // NewBuildpackBindingClient creates a new instance of BuildpackBindingClient 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. +// - 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 NewBuildpackBindingClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BuildpackBindingClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,16 +58,17 @@ 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 -// 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. -// buildpackBindingName - The name of the Buildpack Binding Name -// buildpackBinding - The target buildpack binding for the create or update operation -// options - BuildpackBindingClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildpackBindingClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2022-12-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. +// - buildServiceName - The name of the build service resource. +// - builderName - The name of the builder resource. +// - buildpackBindingName - The name of the Buildpack Binding Name +// - buildpackBinding - The target buildpack binding for the create or update operation +// - options - BuildpackBindingClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildpackBindingClient.BeginCreateOrUpdate +// method. func (client *BuildpackBindingClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, buildpackBinding BuildpackBindingResource, options *BuildpackBindingClientBeginCreateOrUpdateOptions) (*runtime.Poller[BuildpackBindingClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName, buildpackBinding, options) @@ -82,7 +83,8 @@ 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-12-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 { @@ -130,7 +132,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, buildpackBinding) @@ -138,15 +140,16 @@ 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 -// 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. -// buildpackBindingName - The name of the Buildpack Binding Name -// options - BuildpackBindingClientBeginDeleteOptions contains the optional parameters for the BuildpackBindingClient.BeginDelete -// method. +// +// Generated from API version 2022-12-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. +// - buildServiceName - The name of the build service resource. +// - builderName - The name of the builder resource. +// - buildpackBindingName - The name of the Buildpack Binding Name +// - options - BuildpackBindingClientBeginDeleteOptions contains the optional parameters for the BuildpackBindingClient.BeginDelete +// method. func (client *BuildpackBindingClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, options *BuildpackBindingClientBeginDeleteOptions) (*runtime.Poller[BuildpackBindingClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName, options) @@ -161,7 +164,8 @@ 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-12-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 { @@ -209,7 +213,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -217,14 +221,15 @@ 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 -// 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. -// buildpackBindingName - The name of the Buildpack Binding Name -// options - BuildpackBindingClientGetOptions contains the optional parameters for the BuildpackBindingClient.Get method. +// +// Generated from API version 2022-12-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. +// - buildServiceName - The name of the build service resource. +// - builderName - The name of the builder resource. +// - buildpackBindingName - The name of the Buildpack Binding Name +// - options - BuildpackBindingClientGetOptions contains the optional parameters for the BuildpackBindingClient.Get method. func (client *BuildpackBindingClient) Get(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, options *BuildpackBindingClientGetOptions) (BuildpackBindingClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName, options) if err != nil { @@ -272,7 +277,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -288,13 +293,15 @@ 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 -// 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 - BuildpackBindingClientListOptions contains the optional parameters for the BuildpackBindingClient.List method. +// +// Generated from API version 2022-12-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. +// - buildServiceName - The name of the build service resource. +// - builderName - The name of the builder resource. +// - options - BuildpackBindingClientListOptions contains the optional parameters for the BuildpackBindingClient.NewListPager +// method. func (client *BuildpackBindingClient) NewListPager(resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildpackBindingClientListOptions) *runtime.Pager[BuildpackBindingClientListResponse] { return runtime.NewPager(runtime.PagingHandler[BuildpackBindingClientListResponse]{ More: func(page BuildpackBindingClientListResponse) bool { @@ -351,7 +358,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-12-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 deleted file mode 100644 index 6e683de85b83..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/buildpackbinding_client_example_test.go +++ /dev/null @@ -1,119 +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. - -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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildpackBinding_Get.json -func ExampleBuildpackBindingClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildpackBindingClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", "default", "myBuildpackBinding", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildpackBinding_CreateOrUpdate.json -func ExampleBuildpackBindingClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildpackBindingClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", "default", "myBuildpackBinding", armappplatform.BuildpackBindingResource{ - Properties: &armappplatform.BuildpackBindingProperties{ - BindingType: to.Ptr(armappplatform.BindingTypeApplicationInsights), - LaunchProperties: &armappplatform.BuildpackBindingLaunchProperties{ - Properties: map[string]*string{ - "abc": to.Ptr("def"), - "any-string": to.Ptr("any-string"), - "sampling-rate": to.Ptr("12.0"), - }, - Secrets: map[string]*string{ - "connection-string": to.Ptr("XXXXXXXXXXXXXXXXX=XXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXX;XXXXXXXXXXXXXXXXX=XXXXXXXXXXXXXXXXXXX"), - }, - }, - }, - }, 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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildpackBinding_Delete.json -func ExampleBuildpackBindingClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildpackBindingClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "default", "default", "myBuildpackBinding", 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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildpackBinding_List.json -func ExampleBuildpackBindingClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildpackBindingClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", "default", "default", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/buildservice_client.go b/sdk/resourcemanager/appplatform/armappplatform/buildservice_client.go index fb83571e4061..db3de1c5317c 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/buildservice_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/buildservice_client.go @@ -32,10 +32,10 @@ type BuildServiceClient struct { } // NewBuildServiceClient creates a new instance of BuildServiceClient 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. +// - 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 NewBuildServiceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BuildServiceClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,15 +58,16 @@ 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 -// 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. -// buildName - The name of the build resource. -// buildParam - Parameters for the create or update operation -// options - BuildServiceClientCreateOrUpdateBuildOptions contains the optional parameters for the BuildServiceClient.CreateOrUpdateBuild -// method. +// +// Generated from API version 2022-12-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. +// - buildServiceName - The name of the build service resource. +// - buildName - The name of the build resource. +// - buildParam - Parameters for the create or update operation +// - options - BuildServiceClientCreateOrUpdateBuildOptions contains the optional parameters for the BuildServiceClient.CreateOrUpdateBuild +// method. func (client *BuildServiceClient) CreateOrUpdateBuild(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, buildParam Build, options *BuildServiceClientCreateOrUpdateBuildOptions) (BuildServiceClientCreateOrUpdateBuildResponse, error) { req, err := client.createOrUpdateBuildCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, buildName, buildParam, options) if err != nil { @@ -110,7 +111,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, buildParam) @@ -127,13 +128,14 @@ 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 -// 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. -// buildName - The name of the build resource. -// options - BuildServiceClientGetBuildOptions contains the optional parameters for the BuildServiceClient.GetBuild method. +// +// Generated from API version 2022-12-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. +// - buildServiceName - The name of the build service resource. +// - buildName - The name of the build resource. +// - options - BuildServiceClientGetBuildOptions contains the optional parameters for the BuildServiceClient.GetBuild method. func (client *BuildServiceClient) GetBuild(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, options *BuildServiceClientGetBuildOptions) (BuildServiceClientGetBuildResponse, error) { req, err := client.getBuildCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, buildName, options) if err != nil { @@ -177,7 +179,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -194,15 +196,16 @@ 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 -// 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. -// buildName - The name of the build resource. -// buildResultName - The name of the build result resource. -// options - BuildServiceClientGetBuildResultOptions contains the optional parameters for the BuildServiceClient.GetBuildResult -// method. +// +// Generated from API version 2022-12-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. +// - buildServiceName - The name of the build service resource. +// - buildName - The name of the build resource. +// - buildResultName - The name of the build result resource. +// - options - BuildServiceClientGetBuildResultOptions contains the optional parameters for the BuildServiceClient.GetBuildResult +// method. func (client *BuildServiceClient) GetBuildResult(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, buildResultName string, options *BuildServiceClientGetBuildResultOptions) (BuildServiceClientGetBuildResultResponse, error) { req, err := client.getBuildResultCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, buildName, buildResultName, options) if err != nil { @@ -250,7 +253,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -267,15 +270,16 @@ 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 -// 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. -// buildName - The name of the build resource. -// buildResultName - The name of the build result resource. -// options - BuildServiceClientGetBuildResultLogOptions contains the optional parameters for the BuildServiceClient.GetBuildResultLog -// method. +// +// Generated from API version 2022-12-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. +// - buildServiceName - The name of the build service resource. +// - buildName - The name of the build resource. +// - buildResultName - The name of the build result resource. +// - options - BuildServiceClientGetBuildResultLogOptions contains the optional parameters for the BuildServiceClient.GetBuildResultLog +// method. func (client *BuildServiceClient) GetBuildResultLog(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, buildResultName string, options *BuildServiceClientGetBuildResultLogOptions) (BuildServiceClientGetBuildResultLogResponse, error) { req, err := client.getBuildResultLogCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, buildName, buildResultName, options) if err != nil { @@ -323,7 +327,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -340,13 +344,14 @@ 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 -// 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. -// options - BuildServiceClientGetBuildServiceOptions contains the optional parameters for the BuildServiceClient.GetBuildService -// method. +// +// Generated from API version 2022-12-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. +// - buildServiceName - The name of the build service resource. +// - options - BuildServiceClientGetBuildServiceOptions contains the optional parameters for the BuildServiceClient.GetBuildService +// method. func (client *BuildServiceClient) GetBuildService(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientGetBuildServiceOptions) (BuildServiceClientGetBuildServiceResponse, error) { req, err := client.getBuildServiceCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, options) if err != nil { @@ -386,7 +391,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -403,13 +408,14 @@ 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 -// 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. -// options - BuildServiceClientGetResourceUploadURLOptions contains the optional parameters for the BuildServiceClient.GetResourceUploadURL -// method. +// +// Generated from API version 2022-12-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. +// - buildServiceName - The name of the build service resource. +// - options - BuildServiceClientGetResourceUploadURLOptions contains the optional parameters for the BuildServiceClient.GetResourceUploadURL +// method. func (client *BuildServiceClient) GetResourceUploadURL(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientGetResourceUploadURLOptions) (BuildServiceClientGetResourceUploadURLResponse, error) { req, err := client.getResourceUploadURLCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, options) if err != nil { @@ -449,7 +455,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -466,14 +472,15 @@ 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 -// 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. -// buildpackName - The name of the buildpack resource. -// options - BuildServiceClientGetSupportedBuildpackOptions contains the optional parameters for the BuildServiceClient.GetSupportedBuildpack -// method. +// +// Generated from API version 2022-12-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. +// - buildServiceName - The name of the build service resource. +// - buildpackName - The name of the buildpack resource. +// - options - BuildServiceClientGetSupportedBuildpackOptions contains the optional parameters for the BuildServiceClient.GetSupportedBuildpack +// method. func (client *BuildServiceClient) GetSupportedBuildpack(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildpackName string, options *BuildServiceClientGetSupportedBuildpackOptions) (BuildServiceClientGetSupportedBuildpackResponse, error) { req, err := client.getSupportedBuildpackCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, buildpackName, options) if err != nil { @@ -517,7 +524,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -534,14 +541,15 @@ 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 -// 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. -// stackName - The name of the stack resource. -// options - BuildServiceClientGetSupportedStackOptions contains the optional parameters for the BuildServiceClient.GetSupportedStack -// method. +// +// Generated from API version 2022-12-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. +// - buildServiceName - The name of the build service resource. +// - stackName - The name of the stack resource. +// - options - BuildServiceClientGetSupportedStackOptions contains the optional parameters for the BuildServiceClient.GetSupportedStack +// method. func (client *BuildServiceClient) GetSupportedStack(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, stackName string, options *BuildServiceClientGetSupportedStackOptions) (BuildServiceClientGetSupportedStackResponse, error) { req, err := client.getSupportedStackCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, stackName, options) if err != nil { @@ -585,7 +593,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -601,14 +609,15 @@ func (client *BuildServiceClient) getSupportedStackHandleResponse(resp *http.Res } // NewListBuildResultsPager - List KPack build results. -// 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. -// buildName - The name of the build resource. -// options - BuildServiceClientListBuildResultsOptions contains the optional parameters for the BuildServiceClient.ListBuildResults -// method. +// +// Generated from API version 2022-12-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. +// - buildServiceName - The name of the build service resource. +// - buildName - The name of the build resource. +// - options - BuildServiceClientListBuildResultsOptions contains the optional parameters for the BuildServiceClient.NewListBuildResultsPager +// method. func (client *BuildServiceClient) NewListBuildResultsPager(resourceGroupName string, serviceName string, buildServiceName string, buildName string, options *BuildServiceClientListBuildResultsOptions) *runtime.Pager[BuildServiceClientListBuildResultsResponse] { return runtime.NewPager(runtime.PagingHandler[BuildServiceClientListBuildResultsResponse]{ More: func(page BuildServiceClientListBuildResultsResponse) bool { @@ -665,7 +674,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -681,12 +690,13 @@ func (client *BuildServiceClient) listBuildResultsHandleResponse(resp *http.Resp } // NewListBuildServicesPager - List build services 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 - BuildServiceClientListBuildServicesOptions contains the optional parameters for the BuildServiceClient.ListBuildServices -// method. +// +// Generated from API version 2022-12-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. +// - options - BuildServiceClientListBuildServicesOptions contains the optional parameters for the BuildServiceClient.NewListBuildServicesPager +// method. func (client *BuildServiceClient) NewListBuildServicesPager(resourceGroupName string, serviceName string, options *BuildServiceClientListBuildServicesOptions) *runtime.Pager[BuildServiceClientListBuildServicesResponse] { return runtime.NewPager(runtime.PagingHandler[BuildServiceClientListBuildServicesResponse]{ More: func(page BuildServiceClientListBuildServicesResponse) bool { @@ -735,7 +745,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -751,12 +761,14 @@ func (client *BuildServiceClient) listBuildServicesHandleResponse(resp *http.Res } // NewListBuildsPager - List KPack builds. -// 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. -// options - BuildServiceClientListBuildsOptions contains the optional parameters for the BuildServiceClient.ListBuilds method. +// +// Generated from API version 2022-12-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. +// - buildServiceName - The name of the build service resource. +// - options - BuildServiceClientListBuildsOptions contains the optional parameters for the BuildServiceClient.NewListBuildsPager +// method. func (client *BuildServiceClient) NewListBuildsPager(resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientListBuildsOptions) *runtime.Pager[BuildServiceClientListBuildsResponse] { return runtime.NewPager(runtime.PagingHandler[BuildServiceClientListBuildsResponse]{ More: func(page BuildServiceClientListBuildsResponse) bool { @@ -809,7 +821,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -826,13 +838,14 @@ 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 -// 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. -// options - BuildServiceClientListSupportedBuildpacksOptions contains the optional parameters for the BuildServiceClient.ListSupportedBuildpacks -// method. +// +// Generated from API version 2022-12-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. +// - buildServiceName - The name of the build service resource. +// - options - BuildServiceClientListSupportedBuildpacksOptions contains the optional parameters for the BuildServiceClient.ListSupportedBuildpacks +// method. func (client *BuildServiceClient) ListSupportedBuildpacks(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientListSupportedBuildpacksOptions) (BuildServiceClientListSupportedBuildpacksResponse, error) { req, err := client.listSupportedBuildpacksCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, options) if err != nil { @@ -872,7 +885,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -889,13 +902,14 @@ 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 -// 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. -// options - BuildServiceClientListSupportedStacksOptions contains the optional parameters for the BuildServiceClient.ListSupportedStacks -// method. +// +// Generated from API version 2022-12-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. +// - buildServiceName - The name of the build service resource. +// - options - BuildServiceClientListSupportedStacksOptions contains the optional parameters for the BuildServiceClient.ListSupportedStacks +// method. func (client *BuildServiceClient) ListSupportedStacks(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientListSupportedStacksOptions) (BuildServiceClientListSupportedStacksResponse, error) { req, err := client.listSupportedStacksCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, options) if err != nil { @@ -935,7 +949,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-12-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 deleted file mode 100644 index e6a88549090a..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/buildservice_client_example_test.go +++ /dev/null @@ -1,293 +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. - -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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_ListBuildServices.json -func ExampleBuildServiceClient_NewListBuildServicesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBuildServicesPager("myResourceGroup", "myservice", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_GetBuildService.json -func ExampleBuildServiceClient_GetBuildService() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetBuildService(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_ListBuilds.json -func ExampleBuildServiceClient_NewListBuildsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBuildsPager("myResourceGroup", "myservice", "default", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_GetBuild.json -func ExampleBuildServiceClient_GetBuild() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetBuild(ctx, "myResourceGroup", "myservice", "default", "mybuild", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_CreateOrUpdateBuild.json -func ExampleBuildServiceClient_CreateOrUpdateBuild() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdateBuild(ctx, "myResourceGroup", "myservice", "default", "mybuild", armappplatform.Build{ - Properties: &armappplatform.BuildProperties{ - AgentPool: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/agentPools/default"), - Builder: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/builders/default"), - Env: map[string]*string{ - "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 { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_ListBuildResults.json -func ExampleBuildServiceClient_NewListBuildResultsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBuildResultsPager("myResourceGroup", "myservice", "default", "mybuild", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_GetBuildResult.json -func ExampleBuildServiceClient_GetBuildResult() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetBuildResult(ctx, "myResourceGroup", "myservice", "default", "mybuild", "123", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_GetBuildResultLog.json -func ExampleBuildServiceClient_GetBuildResultLog() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetBuildResultLog(ctx, "myResourceGroup", "myservice", "default", "mybuild", "123", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_GetResourceUploadUrl.json -func ExampleBuildServiceClient_GetResourceUploadURL() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetResourceUploadURL(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_ListSupportedBuildpacks.json -func ExampleBuildServiceClient_ListSupportedBuildpacks() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListSupportedBuildpacks(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_GetSupportedBuildpack.json -func ExampleBuildServiceClient_GetSupportedBuildpack() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetSupportedBuildpack(ctx, "myResourceGroup", "myservice", "default", "tanzu-buildpacks-java-azure", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_ListSupportedStacks.json -func ExampleBuildServiceClient_ListSupportedStacks() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListSupportedStacks(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_GetSupportedStack.json -func ExampleBuildServiceClient_GetSupportedStack() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetSupportedStack(ctx, "myResourceGroup", "myservice", "default", "io.buildpacks.stacks.bionic-base", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/buildserviceagentpool_client.go b/sdk/resourcemanager/appplatform/armappplatform/buildserviceagentpool_client.go index 0ebf8a761e63..0d45f30e8475 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/buildserviceagentpool_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/buildserviceagentpool_client.go @@ -32,10 +32,10 @@ type BuildServiceAgentPoolClient struct { } // NewBuildServiceAgentPoolClient creates a new instance of BuildServiceAgentPoolClient 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. +// - 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 NewBuildServiceAgentPoolClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BuildServiceAgentPoolClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,14 +58,15 @@ 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 -// 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. -// agentPoolName - The name of the build service agent pool resource. -// options - BuildServiceAgentPoolClientGetOptions contains the optional parameters for the BuildServiceAgentPoolClient.Get -// method. +// +// Generated from API version 2022-12-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. +// - buildServiceName - The name of the build service resource. +// - agentPoolName - The name of the build service agent pool resource. +// - options - BuildServiceAgentPoolClientGetOptions contains the optional parameters for the BuildServiceAgentPoolClient.Get +// method. func (client *BuildServiceAgentPoolClient) Get(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, agentPoolName string, options *BuildServiceAgentPoolClientGetOptions) (BuildServiceAgentPoolClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, agentPoolName, options) if err != nil { @@ -109,7 +110,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -125,13 +126,14 @@ func (client *BuildServiceAgentPoolClient) getHandleResponse(resp *http.Response } // NewListPager - List build service agent pool. -// 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. -// options - BuildServiceAgentPoolClientListOptions contains the optional parameters for the BuildServiceAgentPoolClient.List -// method. +// +// Generated from API version 2022-12-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. +// - buildServiceName - The name of the build service resource. +// - options - BuildServiceAgentPoolClientListOptions contains the optional parameters for the BuildServiceAgentPoolClient.NewListPager +// method. func (client *BuildServiceAgentPoolClient) NewListPager(resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceAgentPoolClientListOptions) *runtime.Pager[BuildServiceAgentPoolClientListResponse] { return runtime.NewPager(runtime.PagingHandler[BuildServiceAgentPoolClientListResponse]{ More: func(page BuildServiceAgentPoolClientListResponse) bool { @@ -184,7 +186,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -201,15 +203,16 @@ 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 -// 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. -// agentPoolName - The name of the build service agent pool resource. -// agentPoolResource - Parameters for the update operation -// options - BuildServiceAgentPoolClientBeginUpdatePutOptions contains the optional parameters for the BuildServiceAgentPoolClient.BeginUpdatePut -// method. +// +// Generated from API version 2022-12-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. +// - buildServiceName - The name of the build service resource. +// - agentPoolName - The name of the build service agent pool resource. +// - agentPoolResource - Parameters for the update operation +// - options - BuildServiceAgentPoolClientBeginUpdatePutOptions contains the optional parameters for the BuildServiceAgentPoolClient.BeginUpdatePut +// method. func (client *BuildServiceAgentPoolClient) BeginUpdatePut(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, agentPoolName string, agentPoolResource BuildServiceAgentPoolResource, options *BuildServiceAgentPoolClientBeginUpdatePutOptions) (*runtime.Poller[BuildServiceAgentPoolClientUpdatePutResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.updatePut(ctx, resourceGroupName, serviceName, buildServiceName, agentPoolName, agentPoolResource, options) @@ -224,7 +227,8 @@ 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-12-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 { @@ -268,7 +272,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-12-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 deleted file mode 100644 index ed469e1c9b0f..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/buildserviceagentpool_client_example_test.go +++ /dev/null @@ -1,90 +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. - -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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildServiceAgentPool_List.json -func ExampleBuildServiceAgentPoolClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceAgentPoolClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", "default", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildServiceAgentPool_Get.json -func ExampleBuildServiceAgentPoolClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceAgentPoolClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildServiceAgentPool_UpdatePut.json -func ExampleBuildServiceAgentPoolClient_BeginUpdatePut() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceAgentPoolClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdatePut(ctx, "myResourceGroup", "myservice", "default", "default", armappplatform.BuildServiceAgentPoolResource{ - Properties: &armappplatform.BuildServiceAgentPoolProperties{ - PoolSize: &armappplatform.BuildServiceAgentPoolSizeProperties{ - Name: to.Ptr("S3"), - }, - }, - }, 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) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/buildservicebuilder_client.go b/sdk/resourcemanager/appplatform/armappplatform/buildservicebuilder_client.go index 25be58095d22..3c5f732acbaa 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/buildservicebuilder_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/buildservicebuilder_client.go @@ -32,10 +32,10 @@ type BuildServiceBuilderClient struct { } // NewBuildServiceBuilderClient creates a new instance of BuildServiceBuilderClient 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. +// - 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 NewBuildServiceBuilderClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BuildServiceBuilderClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,15 +58,16 @@ 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 -// 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. -// builderResource - The target builder for the create or update operation -// options - BuildServiceBuilderClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildServiceBuilderClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2022-12-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. +// - buildServiceName - The name of the build service resource. +// - builderName - The name of the builder resource. +// - builderResource - The target builder for the create or update operation +// - options - BuildServiceBuilderClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildServiceBuilderClient.BeginCreateOrUpdate +// method. func (client *BuildServiceBuilderClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, builderResource BuilderResource, options *BuildServiceBuilderClientBeginCreateOrUpdateOptions) (*runtime.Poller[BuildServiceBuilderClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, buildServiceName, builderName, builderResource, options) @@ -81,7 +82,8 @@ 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-12-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 { @@ -125,7 +127,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, builderResource) @@ -133,14 +135,15 @@ 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 -// 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 - BuildServiceBuilderClientBeginDeleteOptions contains the optional parameters for the BuildServiceBuilderClient.BeginDelete -// method. +// +// Generated from API version 2022-12-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. +// - buildServiceName - The name of the build service resource. +// - builderName - The name of the builder resource. +// - options - BuildServiceBuilderClientBeginDeleteOptions contains the optional parameters for the BuildServiceBuilderClient.BeginDelete +// method. func (client *BuildServiceBuilderClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildServiceBuilderClientBeginDeleteOptions) (*runtime.Poller[BuildServiceBuilderClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, buildServiceName, builderName, options) @@ -155,7 +158,8 @@ 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-12-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 { @@ -199,7 +203,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -207,13 +211,14 @@ 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 -// 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 - BuildServiceBuilderClientGetOptions contains the optional parameters for the BuildServiceBuilderClient.Get method. +// +// Generated from API version 2022-12-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. +// - buildServiceName - The name of the build service resource. +// - builderName - The name of the builder resource. +// - options - BuildServiceBuilderClientGetOptions contains the optional parameters for the BuildServiceBuilderClient.Get method. func (client *BuildServiceBuilderClient) Get(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildServiceBuilderClientGetOptions) (BuildServiceBuilderClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, options) if err != nil { @@ -257,7 +262,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -273,13 +278,14 @@ func (client *BuildServiceBuilderClient) getHandleResponse(resp *http.Response) } // NewListPager - List KPack builders result. -// 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. -// options - BuildServiceBuilderClientListOptions contains the optional parameters for the BuildServiceBuilderClient.List -// method. +// +// Generated from API version 2022-12-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. +// - buildServiceName - The name of the build service resource. +// - options - BuildServiceBuilderClientListOptions contains the optional parameters for the BuildServiceBuilderClient.NewListPager +// method. func (client *BuildServiceBuilderClient) NewListPager(resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceBuilderClientListOptions) *runtime.Pager[BuildServiceBuilderClientListResponse] { return runtime.NewPager(runtime.PagingHandler[BuildServiceBuilderClientListResponse]{ More: func(page BuildServiceBuilderClientListResponse) bool { @@ -332,7 +338,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -349,14 +355,15 @@ func (client *BuildServiceBuilderClient) listHandleResponse(resp *http.Response) // 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. +// +// Generated from API version 2022-12-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. +// - 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 { @@ -400,7 +407,7 @@ func (client *BuildServiceBuilderClient) listDeploymentsCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appplatform/armappplatform/buildservicebuilder_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/buildservicebuilder_client_example_test.go deleted file mode 100644 index 02a8089d725b..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/buildservicebuilder_client_example_test.go +++ /dev/null @@ -1,139 +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. - -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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildServiceBuilder_Get.json -func ExampleBuildServiceBuilderClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceBuilderClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", "mybuilder", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildServiceBuilder_CreateOrUpdate.json -func ExampleBuildServiceBuilderClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceBuilderClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", "mybuilder", armappplatform.BuilderResource{ - Properties: &armappplatform.BuilderProperties{ - BuildpackGroups: []*armappplatform.BuildpacksGroupProperties{ - { - Name: to.Ptr("mix"), - Buildpacks: []*armappplatform.BuildpackProperties{ - { - ID: to.Ptr("tanzu-buildpacks/java-azure"), - }}, - }}, - Stack: &armappplatform.StackProperties{ - ID: to.Ptr("io.buildpacks.stacks.bionic"), - Version: to.Ptr("base"), - }, - }, - }, 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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildServiceBuilder_Delete.json -func ExampleBuildServiceBuilderClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceBuilderClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "default", "mybuilder", 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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildServiceBuilder_List.json -func ExampleBuildServiceBuilderClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceBuilderClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", "default", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewBuildServiceBuilderClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListDeployments(ctx, "myResourceGroup", "myservice", "default", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/certificates_client.go b/sdk/resourcemanager/appplatform/armappplatform/certificates_client.go index 677f01a24139..5748d5cd822d 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/certificates_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/certificates_client.go @@ -32,10 +32,10 @@ type CertificatesClient struct { } // NewCertificatesClient creates a new instance of CertificatesClient 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. +// - 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 NewCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificatesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,14 +58,15 @@ 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 -// 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. -// certificateName - The name of the certificate resource. -// certificateResource - Parameters for the create or update operation -// options - CertificatesClientBeginCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2022-12-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. +// - certificateName - The name of the certificate resource. +// - certificateResource - Parameters for the create or update operation +// - options - CertificatesClientBeginCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.BeginCreateOrUpdate +// method. func (client *CertificatesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, certificateResource CertificateResource, options *CertificatesClientBeginCreateOrUpdateOptions) (*runtime.Poller[CertificatesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, certificateName, certificateResource, options) @@ -80,7 +81,8 @@ 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-12-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 { @@ -120,7 +122,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, certificateResource) @@ -128,13 +130,14 @@ 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 -// 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. -// certificateName - The name of the certificate resource. -// options - CertificatesClientBeginDeleteOptions contains the optional parameters for the CertificatesClient.BeginDelete -// method. +// +// Generated from API version 2022-12-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. +// - certificateName - The name of the certificate resource. +// - options - CertificatesClientBeginDeleteOptions contains the optional parameters for the CertificatesClient.BeginDelete +// method. func (client *CertificatesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, options *CertificatesClientBeginDeleteOptions) (*runtime.Poller[CertificatesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, certificateName, options) @@ -149,7 +152,8 @@ 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-12-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 { @@ -189,7 +193,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -197,12 +201,13 @@ 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 -// 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. -// certificateName - The name of the certificate resource. -// options - CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. +// +// Generated from API version 2022-12-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. +// - certificateName - The name of the certificate resource. +// - options - CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. func (client *CertificatesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, options *CertificatesClientGetOptions) (CertificatesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, certificateName, options) if err != nil { @@ -242,7 +247,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -258,11 +263,12 @@ func (client *CertificatesClient) getHandleResponse(resp *http.Response) (Certif } // NewListPager - List all the certificates of one user. -// 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 - CertificatesClientListOptions contains the optional parameters for the CertificatesClient.List method. +// +// Generated from API version 2022-12-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. +// - options - CertificatesClientListOptions contains the optional parameters for the CertificatesClient.NewListPager method. func (client *CertificatesClient) NewListPager(resourceGroupName string, serviceName string, options *CertificatesClientListOptions) *runtime.Pager[CertificatesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[CertificatesClientListResponse]{ More: func(page CertificatesClientListResponse) bool { @@ -311,7 +317,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-12-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 deleted file mode 100644 index c424351b36c5..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/certificates_client_example_test.go +++ /dev/null @@ -1,112 +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. - -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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Certificates_Get.json -func ExampleCertificatesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewCertificatesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "mycertificate", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Certificates_CreateOrUpdate.json -func ExampleCertificatesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewCertificatesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "mycertificate", armappplatform.CertificateResource{ - Properties: &armappplatform.KeyVaultCertificateProperties{ - Type: to.Ptr("KeyVaultCertificate"), - CertVersion: to.Ptr("08a219d06d874795a96db47e06fbb01e"), - KeyVaultCertName: to.Ptr("mycert"), - VaultURI: to.Ptr("https://myvault.vault.azure.net"), - }, - }, 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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Certificates_Delete.json -func ExampleCertificatesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewCertificatesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "mycertificate", 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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Certificates_List.json -func ExampleCertificatesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewCertificatesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myService", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/configservers_client.go b/sdk/resourcemanager/appplatform/armappplatform/configservers_client.go index d4ef407e49df..95a76b9d4027 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/configservers_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/configservers_client.go @@ -32,10 +32,10 @@ type ConfigServersClient struct { } // NewConfigServersClient creates a new instance of ConfigServersClient 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. +// - 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 NewConfigServersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigServersClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,11 +58,12 @@ 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 -// 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 - ConfigServersClientGetOptions contains the optional parameters for the ConfigServersClient.Get method. +// +// Generated from API version 2022-12-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. +// - options - ConfigServersClientGetOptions contains the optional parameters for the ConfigServersClient.Get method. func (client *ConfigServersClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *ConfigServersClientGetOptions) (ConfigServersClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { @@ -98,7 +99,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -115,13 +116,14 @@ 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 -// 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. -// configServerResource - Parameters for the update operation -// options - ConfigServersClientBeginUpdatePatchOptions contains the optional parameters for the ConfigServersClient.BeginUpdatePatch -// method. +// +// Generated from API version 2022-12-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. +// - configServerResource - Parameters for the update operation +// - options - ConfigServersClientBeginUpdatePatchOptions contains the optional parameters for the ConfigServersClient.BeginUpdatePatch +// method. func (client *ConfigServersClient) BeginUpdatePatch(ctx context.Context, resourceGroupName string, serviceName string, configServerResource ConfigServerResource, options *ConfigServersClientBeginUpdatePatchOptions) (*runtime.Poller[ConfigServersClientUpdatePatchResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.updatePatch(ctx, resourceGroupName, serviceName, configServerResource, options) @@ -136,7 +138,8 @@ 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-12-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 { @@ -172,7 +175,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, configServerResource) @@ -180,13 +183,14 @@ 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 -// 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. -// configServerResource - Parameters for the update operation -// options - ConfigServersClientBeginUpdatePutOptions contains the optional parameters for the ConfigServersClient.BeginUpdatePut -// method. +// +// Generated from API version 2022-12-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. +// - configServerResource - Parameters for the update operation +// - options - ConfigServersClientBeginUpdatePutOptions contains the optional parameters for the ConfigServersClient.BeginUpdatePut +// method. func (client *ConfigServersClient) BeginUpdatePut(ctx context.Context, resourceGroupName string, serviceName string, configServerResource ConfigServerResource, options *ConfigServersClientBeginUpdatePutOptions) (*runtime.Poller[ConfigServersClientUpdatePutResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.updatePut(ctx, resourceGroupName, serviceName, configServerResource, options) @@ -201,7 +205,8 @@ 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-12-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 { @@ -237,7 +242,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, configServerResource) @@ -245,13 +250,14 @@ 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 -// 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. -// configServerSettings - Config server settings to be validated -// options - ConfigServersClientBeginValidateOptions contains the optional parameters for the ConfigServersClient.BeginValidate -// method. +// +// Generated from API version 2022-12-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. +// - configServerSettings - Config server settings to be validated +// - options - ConfigServersClientBeginValidateOptions contains the optional parameters for the ConfigServersClient.BeginValidate +// method. func (client *ConfigServersClient) BeginValidate(ctx context.Context, resourceGroupName string, serviceName string, configServerSettings ConfigServerSettings, options *ConfigServersClientBeginValidateOptions) (*runtime.Poller[ConfigServersClientValidateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.validate(ctx, resourceGroupName, serviceName, configServerSettings, options) @@ -268,7 +274,8 @@ 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-12-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 { @@ -304,7 +311,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-12-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 deleted file mode 100644 index 84498edaaa8d..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/configservers_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. - -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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigServers_Get.json -func ExampleConfigServersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewConfigServersClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigServers_UpdatePut.json -func ExampleConfigServersClient_BeginUpdatePut() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewConfigServersClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdatePut(ctx, "myResourceGroup", "myservice", armappplatform.ConfigServerResource{ - Properties: &armappplatform.ConfigServerProperties{ - ConfigServer: &armappplatform.ConfigServerSettings{ - GitProperty: &armappplatform.ConfigServerGitProperty{ - Label: to.Ptr("master"), - SearchPaths: []*string{ - to.Ptr("/")}, - URI: to.Ptr("https://github.com/fake-user/fake-repository.git"), - }, - }, - }, - }, 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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigServers_UpdatePatch.json -func ExampleConfigServersClient_BeginUpdatePatch() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewConfigServersClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdatePatch(ctx, "myResourceGroup", "myservice", armappplatform.ConfigServerResource{ - Properties: &armappplatform.ConfigServerProperties{ - ConfigServer: &armappplatform.ConfigServerSettings{ - GitProperty: &armappplatform.ConfigServerGitProperty{ - Label: to.Ptr("master"), - SearchPaths: []*string{ - to.Ptr("/")}, - URI: to.Ptr("https://github.com/fake-user/fake-repository.git"), - }, - }, - }, - }, 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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigServers_Validate.json -func ExampleConfigServersClient_BeginValidate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewConfigServersClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginValidate(ctx, "myResourceGroup", "myservice", armappplatform.ConfigServerSettings{ - GitProperty: &armappplatform.ConfigServerGitProperty{ - Label: to.Ptr("master"), - SearchPaths: []*string{ - to.Ptr("/")}, - URI: to.Ptr("https://github.com/fake-user/fake-repository.git"), - }, - }, 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) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/configurationservices_client.go b/sdk/resourcemanager/appplatform/armappplatform/configurationservices_client.go index 9def0eb2afd5..237de8944b60 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/configurationservices_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/configurationservices_client.go @@ -32,10 +32,10 @@ type ConfigurationServicesClient struct { } // NewConfigurationServicesClient creates a new instance of ConfigurationServicesClient 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. +// - 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 NewConfigurationServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationServicesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -59,14 +59,15 @@ func NewConfigurationServicesClient(subscriptionID string, credential azcore.Tok // BeginCreateOrUpdate - Create the default Application Configuration Service or update the existing Application Configuration // 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. -// configurationServiceName - The name of Application Configuration Service. -// configurationServiceResource - Parameters for the update operation -// options - ConfigurationServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationServicesClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2022-12-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. +// - configurationServiceName - The name of Application Configuration Service. +// - configurationServiceResource - Parameters for the update operation +// - options - ConfigurationServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationServicesClient.BeginCreateOrUpdate +// method. func (client *ConfigurationServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, configurationServiceResource ConfigurationServiceResource, options *ConfigurationServicesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ConfigurationServicesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, configurationServiceName, configurationServiceResource, options) @@ -82,7 +83,8 @@ func (client *ConfigurationServicesClient) BeginCreateOrUpdate(ctx context.Conte // CreateOrUpdate - Create the default Application Configuration Service or update the existing 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-12-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 { @@ -122,7 +124,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, configurationServiceResource) @@ -130,13 +132,14 @@ 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 -// 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. -// configurationServiceName - The name of Application Configuration Service. -// options - ConfigurationServicesClientBeginDeleteOptions contains the optional parameters for the ConfigurationServicesClient.BeginDelete -// method. +// +// Generated from API version 2022-12-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. +// - configurationServiceName - The name of Application Configuration Service. +// - options - ConfigurationServicesClientBeginDeleteOptions contains the optional parameters for the ConfigurationServicesClient.BeginDelete +// method. func (client *ConfigurationServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, options *ConfigurationServicesClientBeginDeleteOptions) (*runtime.Poller[ConfigurationServicesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, configurationServiceName, options) @@ -151,7 +154,8 @@ 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-12-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 { @@ -191,7 +195,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -199,13 +203,14 @@ 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 -// 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. -// configurationServiceName - The name of Application Configuration Service. -// options - ConfigurationServicesClientGetOptions contains the optional parameters for the ConfigurationServicesClient.Get -// method. +// +// Generated from API version 2022-12-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. +// - configurationServiceName - The name of Application Configuration Service. +// - options - ConfigurationServicesClientGetOptions contains the optional parameters for the ConfigurationServicesClient.Get +// method. func (client *ConfigurationServicesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, options *ConfigurationServicesClientGetOptions) (ConfigurationServicesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, configurationServiceName, options) if err != nil { @@ -245,7 +250,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -261,12 +266,13 @@ 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 -// 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 - ConfigurationServicesClientListOptions contains the optional parameters for the ConfigurationServicesClient.List -// method. +// +// Generated from API version 2022-12-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. +// - options - ConfigurationServicesClientListOptions contains the optional parameters for the ConfigurationServicesClient.NewListPager +// method. func (client *ConfigurationServicesClient) NewListPager(resourceGroupName string, serviceName string, options *ConfigurationServicesClientListOptions) *runtime.Pager[ConfigurationServicesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ConfigurationServicesClientListResponse]{ More: func(page ConfigurationServicesClientListResponse) bool { @@ -315,7 +321,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -332,14 +338,15 @@ 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 -// 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. -// configurationServiceName - The name of Application Configuration Service. -// settings - Application Configuration Service settings to be validated -// options - ConfigurationServicesClientBeginValidateOptions contains the optional parameters for the ConfigurationServicesClient.BeginValidate -// method. +// +// Generated from API version 2022-12-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. +// - configurationServiceName - The name of Application Configuration Service. +// - settings - Application Configuration Service settings to be validated +// - options - ConfigurationServicesClientBeginValidateOptions contains the optional parameters for the ConfigurationServicesClient.BeginValidate +// method. func (client *ConfigurationServicesClient) BeginValidate(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, settings ConfigurationServiceSettings, options *ConfigurationServicesClientBeginValidateOptions) (*runtime.Poller[ConfigurationServicesClientValidateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.validate(ctx, resourceGroupName, serviceName, configurationServiceName, settings, options) @@ -356,7 +363,8 @@ 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-12-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 { @@ -396,7 +404,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-12-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 deleted file mode 100644 index 8f564c06f6c7..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/configurationservices_client_example_test.go +++ /dev/null @@ -1,154 +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. - -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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigurationServices_Get.json -func ExampleConfigurationServicesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewConfigurationServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigurationServices_CreateOrUpdate.json -func ExampleConfigurationServicesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewConfigurationServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", armappplatform.ConfigurationServiceResource{ - Properties: &armappplatform.ConfigurationServiceProperties{ - Settings: &armappplatform.ConfigurationServiceSettings{ - GitProperty: &armappplatform.ConfigurationServiceGitProperty{ - Repositories: []*armappplatform.ConfigurationServiceGitRepository{ - { - Name: to.Ptr("fake"), - Label: to.Ptr("master"), - Patterns: []*string{ - to.Ptr("app/dev")}, - URI: to.Ptr("https://github.com/fake-user/fake-repository"), - }}, - }, - }, - }, - }, 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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigurationServices_Delete.json -func ExampleConfigurationServicesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewConfigurationServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigurationServices_List.json -func ExampleConfigurationServicesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewConfigurationServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigurationServices_Validate.json -func ExampleConfigurationServicesClient_BeginValidate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewConfigurationServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginValidate(ctx, "myResourceGroup", "myservice", "default", armappplatform.ConfigurationServiceSettings{ - GitProperty: &armappplatform.ConfigurationServiceGitProperty{ - Repositories: []*armappplatform.ConfigurationServiceGitRepository{ - { - Name: to.Ptr("fake"), - Label: to.Ptr("master"), - Patterns: []*string{ - to.Ptr("app/dev")}, - URI: to.Ptr("https://github.com/fake-user/fake-repository"), - }}, - }, - }, 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) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/constants.go b/sdk/resourcemanager/appplatform/armappplatform/constants.go index a43309292803..6c785d492ba1 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/constants.go +++ b/sdk/resourcemanager/appplatform/armappplatform/constants.go @@ -11,7 +11,7 @@ package armappplatform const ( moduleName = "armappplatform" - moduleVersion = "v1.1.0-beta.2" + moduleVersion = "v2.0.0" ) // APIPortalProvisioningState - State of the API portal. @@ -50,28 +50,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,52 +72,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 @@ -163,7 +95,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 +106,6 @@ func PossibleBindingTypeValues() []BindingType { BindingTypeApacheSkyWalking, BindingTypeAppDynamics, BindingTypeApplicationInsights, - BindingTypeCACertificates, BindingTypeDynatrace, BindingTypeElasticAPM, BindingTypeNewRelic, @@ -400,46 +330,6 @@ func PossibleCustomDomainResourceProvisioningStateValues() []CustomDomainResourc } } -// 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,48 +366,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 @@ -671,44 +519,6 @@ func PossiblePowerStateValues() []PowerState { } } -// 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 diff --git a/sdk/resourcemanager/appplatform/armappplatform/customdomains_client.go b/sdk/resourcemanager/appplatform/armappplatform/customdomains_client.go index 35eeb15b4aa2..2ceddd622eff 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/customdomains_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/customdomains_client.go @@ -32,10 +32,10 @@ type CustomDomainsClient struct { } // NewCustomDomainsClient creates a new instance of CustomDomainsClient 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. +// - 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 NewCustomDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomDomainsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,15 +58,16 @@ 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 -// 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. -// domainName - The name of the custom domain resource. -// domainResource - Parameters for the create or update operation -// options - CustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - domainName - The name of the custom domain resource. +// - domainResource - Parameters for the create or update operation +// - options - CustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginCreateOrUpdate +// method. func (client *CustomDomainsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, domainResource CustomDomainResource, options *CustomDomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[CustomDomainsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, appName, domainName, domainResource, options) @@ -81,7 +82,8 @@ 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-12-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 { @@ -125,7 +127,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, domainResource) @@ -133,14 +135,15 @@ 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 -// 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. -// domainName - The name of the custom domain resource. -// options - CustomDomainsClientBeginDeleteOptions contains the optional parameters for the CustomDomainsClient.BeginDelete -// method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - domainName - The name of the custom domain resource. +// - options - CustomDomainsClientBeginDeleteOptions contains the optional parameters for the CustomDomainsClient.BeginDelete +// method. func (client *CustomDomainsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, options *CustomDomainsClientBeginDeleteOptions) (*runtime.Poller[CustomDomainsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, appName, domainName, options) @@ -155,7 +158,8 @@ 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-12-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 { @@ -199,7 +203,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -207,13 +211,14 @@ 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 -// 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. -// domainName - The name of the custom domain resource. -// options - CustomDomainsClientGetOptions contains the optional parameters for the CustomDomainsClient.Get method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - domainName - The name of the custom domain resource. +// - options - CustomDomainsClientGetOptions contains the optional parameters for the CustomDomainsClient.Get method. func (client *CustomDomainsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, options *CustomDomainsClientGetOptions) (CustomDomainsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, appName, domainName, options) if err != nil { @@ -257,7 +262,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -273,12 +278,13 @@ 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 -// 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. -// options - CustomDomainsClientListOptions contains the optional parameters for the CustomDomainsClient.List method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - options - CustomDomainsClientListOptions contains the optional parameters for the CustomDomainsClient.NewListPager method. func (client *CustomDomainsClient) NewListPager(resourceGroupName string, serviceName string, appName string, options *CustomDomainsClientListOptions) *runtime.Pager[CustomDomainsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[CustomDomainsClientListResponse]{ More: func(page CustomDomainsClientListResponse) bool { @@ -331,7 +337,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -348,15 +354,16 @@ 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 -// 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. -// domainName - The name of the custom domain resource. -// domainResource - Parameters for the create or update operation -// options - CustomDomainsClientBeginUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginUpdate -// method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - domainName - The name of the custom domain resource. +// - domainResource - Parameters for the create or update operation +// - options - CustomDomainsClientBeginUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginUpdate +// method. func (client *CustomDomainsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, domainResource CustomDomainResource, options *CustomDomainsClientBeginUpdateOptions) (*runtime.Poller[CustomDomainsClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, serviceName, appName, domainName, domainResource, options) @@ -371,7 +378,8 @@ 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-12-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 { @@ -415,7 +423,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-12-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 deleted file mode 100644 index 5f6758453399..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/customdomains_client_example_test.go +++ /dev/null @@ -1,138 +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. - -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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomDomains_Get.json -func ExampleCustomDomainsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "myapp", "mydomain.com", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomDomains_CreateOrUpdate.json -func ExampleCustomDomainsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mydomain.com", armappplatform.CustomDomainResource{ - Properties: &armappplatform.CustomDomainProperties{ - CertName: to.Ptr("mycert"), - Thumbprint: to.Ptr("934367bf1c97033f877db0f15cb1b586957d3133"), - }, - }, 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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomDomains_Delete.json -func ExampleCustomDomainsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "myapp", "mydomain.com", 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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomDomains_Update.json -func ExampleCustomDomainsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mydomain.com", armappplatform.CustomDomainResource{ - Properties: &armappplatform.CustomDomainProperties{ - CertName: to.Ptr("mycert"), - Thumbprint: to.Ptr("934367bf1c97033f877db0f15cb1b586957d3133"), - }, - }, 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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomDomains_List.json -func ExampleCustomDomainsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", "myapp", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/customizedaccelerators_client.go b/sdk/resourcemanager/appplatform/armappplatform/customizedaccelerators_client.go deleted file mode 100644 index 8b02cb5a60e1..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/customizedaccelerators_client.go +++ /dev/null @@ -1,418 +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" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "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 { - host string - subscriptionID string - pl runtime.Pipeline -} - -// 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) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &CustomizedAcceleratorsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - 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.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[CustomizedAcceleratorsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, 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.pl.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.host, 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.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[CustomizedAcceleratorsClientDeleteResponse](options.ResumeToken, client.pl, 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.pl.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.host, 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.pl.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.host, 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.List -// 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.pl.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.host, 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.pl.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.host, 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 06c6904ed324..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/customizedaccelerators_client_example_test.go +++ /dev/null @@ -1,171 +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. - -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/tree/main/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() - client, err := armappplatform.NewCustomizedAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", "default", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewCustomizedAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", "acc-name", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewCustomizedAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewCustomizedAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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/tree/main/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() - client, err := armappplatform.NewCustomizedAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.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) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/deployments_client.go b/sdk/resourcemanager/appplatform/armappplatform/deployments_client.go index 27119c7dec2e..0aafe4c83686 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/deployments_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/deployments_client.go @@ -32,10 +32,10 @@ type DeploymentsClient struct { } // NewDeploymentsClient creates a new instance of DeploymentsClient 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. +// - 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 NewDeploymentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeploymentsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,15 +58,16 @@ 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 -// 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. -// deploymentResource - Parameters for the create or update operation -// options - DeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - deploymentResource - Parameters for the create or update operation +// - options - DeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdate +// method. func (client *DeploymentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource, options *DeploymentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DeploymentsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, appName, deploymentName, deploymentResource, options) @@ -81,7 +82,8 @@ 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-12-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 { @@ -125,7 +127,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, deploymentResource) @@ -133,13 +135,14 @@ 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 -// 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 - DeploymentsClientBeginDeleteOptions contains the optional parameters for the DeploymentsClient.BeginDelete method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - options - DeploymentsClientBeginDeleteOptions contains the optional parameters for the DeploymentsClient.BeginDelete method. func (client *DeploymentsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginDeleteOptions) (*runtime.Poller[DeploymentsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, appName, deploymentName, options) @@ -154,7 +157,8 @@ 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-12-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 { @@ -198,7 +202,7 @@ 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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -206,14 +210,15 @@ func (client *DeploymentsClient) deleteCreateRequest(ctx context.Context, resour // 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. +// +// Generated from API version 2022-12-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. +// - 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) @@ -228,7 +233,8 @@ func (client *DeploymentsClient) BeginDisableRemoteDebugging(ctx context.Context // DisableRemoteDebugging - Disable remote debugging. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2022-12-01 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 { @@ -272,7 +278,7 @@ func (client *DeploymentsClient) disableRemoteDebuggingCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -280,14 +286,15 @@ func (client *DeploymentsClient) disableRemoteDebuggingCreateRequest(ctx context // 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. +// +// Generated from API version 2022-12-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. +// - 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) @@ -302,7 +309,8 @@ func (client *DeploymentsClient) BeginEnableRemoteDebugging(ctx context.Context, // EnableRemoteDebugging - Enable remote debugging. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2022-12-01 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 { @@ -346,7 +354,7 @@ func (client *DeploymentsClient) enableRemoteDebuggingCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.RemoteDebuggingPayload != nil { @@ -357,15 +365,16 @@ func (client *DeploymentsClient) enableRemoteDebuggingCreateRequest(ctx context. // BeginGenerateHeapDump - Generate Heap Dump // 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. -// diagnosticParameters - Parameters for the diagnostic operation -// options - DeploymentsClientBeginGenerateHeapDumpOptions contains the optional parameters for the DeploymentsClient.BeginGenerateHeapDump -// method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - diagnosticParameters - Parameters for the diagnostic operation +// - options - DeploymentsClientBeginGenerateHeapDumpOptions contains the optional parameters for the DeploymentsClient.BeginGenerateHeapDump +// method. func (client *DeploymentsClient) BeginGenerateHeapDump(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginGenerateHeapDumpOptions) (*runtime.Poller[DeploymentsClientGenerateHeapDumpResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.generateHeapDump(ctx, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters, options) @@ -380,7 +389,8 @@ 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-12-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 { @@ -424,7 +434,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, diagnosticParameters) @@ -432,15 +442,16 @@ 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 -// 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. -// diagnosticParameters - Parameters for the diagnostic operation -// options - DeploymentsClientBeginGenerateThreadDumpOptions contains the optional parameters for the DeploymentsClient.BeginGenerateThreadDump -// method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - diagnosticParameters - Parameters for the diagnostic operation +// - options - DeploymentsClientBeginGenerateThreadDumpOptions contains the optional parameters for the DeploymentsClient.BeginGenerateThreadDump +// method. func (client *DeploymentsClient) BeginGenerateThreadDump(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginGenerateThreadDumpOptions) (*runtime.Poller[DeploymentsClientGenerateThreadDumpResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.generateThreadDump(ctx, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters, options) @@ -455,7 +466,8 @@ 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-12-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 { @@ -499,7 +511,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, diagnosticParameters) @@ -507,13 +519,14 @@ 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 -// 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 - DeploymentsClientGetOptions contains the optional parameters for the DeploymentsClient.Get method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - options - DeploymentsClientGetOptions contains the optional parameters for the DeploymentsClient.Get method. func (client *DeploymentsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientGetOptions) (DeploymentsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) if err != nil { @@ -557,7 +570,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -574,14 +587,15 @@ 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 -// 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 - DeploymentsClientGetLogFileURLOptions contains the optional parameters for the DeploymentsClient.GetLogFileURL -// method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - options - DeploymentsClientGetLogFileURLOptions contains the optional parameters for the DeploymentsClient.GetLogFileURL +// method. func (client *DeploymentsClient) GetLogFileURL(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientGetLogFileURLOptions) (DeploymentsClientGetLogFileURLResponse, error) { req, err := client.getLogFileURLCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) if err != nil { @@ -625,7 +639,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -642,14 +656,15 @@ func (client *DeploymentsClient) getLogFileURLHandleResponse(resp *http.Response // 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. +// +// Generated from API version 2022-12-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. +// - 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 { @@ -693,7 +708,7 @@ func (client *DeploymentsClient) getRemoteDebuggingConfigCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -709,12 +724,13 @@ func (client *DeploymentsClient) getRemoteDebuggingConfigHandleResponse(resp *ht } // NewListPager - Handles requests to list all resources in an App. -// 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. -// options - DeploymentsClientListOptions contains the optional parameters for the DeploymentsClient.List method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - options - DeploymentsClientListOptions contains the optional parameters for the DeploymentsClient.NewListPager method. func (client *DeploymentsClient) NewListPager(resourceGroupName string, serviceName string, appName string, options *DeploymentsClientListOptions) *runtime.Pager[DeploymentsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[DeploymentsClientListResponse]{ More: func(page DeploymentsClientListResponse) bool { @@ -767,7 +783,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-12-01") if options != nil && options.Version != nil { for _, qv := range options.Version { reqQP.Add("version", qv) @@ -788,12 +804,13 @@ func (client *DeploymentsClient) listHandleResponse(resp *http.Response) (Deploy } // NewListForClusterPager - List deployments for a certain 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 - DeploymentsClientListForClusterOptions contains the optional parameters for the DeploymentsClient.ListForCluster -// method. +// +// Generated from API version 2022-12-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. +// - options - DeploymentsClientListForClusterOptions contains the optional parameters for the DeploymentsClient.NewListForClusterPager +// method. func (client *DeploymentsClient) NewListForClusterPager(resourceGroupName string, serviceName string, options *DeploymentsClientListForClusterOptions) *runtime.Pager[DeploymentsClientListForClusterResponse] { return runtime.NewPager(runtime.PagingHandler[DeploymentsClientListForClusterResponse]{ More: func(page DeploymentsClientListForClusterResponse) bool { @@ -842,7 +859,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-12-01") if options != nil && options.Version != nil { for _, qv := range options.Version { reqQP.Add("version", qv) @@ -864,14 +881,15 @@ 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 -// 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 - DeploymentsClientBeginRestartOptions contains the optional parameters for the DeploymentsClient.BeginRestart -// method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - options - DeploymentsClientBeginRestartOptions contains the optional parameters for the DeploymentsClient.BeginRestart +// method. func (client *DeploymentsClient) BeginRestart(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginRestartOptions) (*runtime.Poller[DeploymentsClientRestartResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.restart(ctx, resourceGroupName, serviceName, appName, deploymentName, options) @@ -886,7 +904,8 @@ 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-12-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 { @@ -930,7 +949,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -938,13 +957,14 @@ 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 -// 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 - DeploymentsClientBeginStartOptions contains the optional parameters for the DeploymentsClient.BeginStart method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - options - DeploymentsClientBeginStartOptions contains the optional parameters for the DeploymentsClient.BeginStart method. func (client *DeploymentsClient) BeginStart(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginStartOptions) (*runtime.Poller[DeploymentsClientStartResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.start(ctx, resourceGroupName, serviceName, appName, deploymentName, options) @@ -959,7 +979,8 @@ 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-12-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 { @@ -1003,7 +1024,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1011,15 +1032,16 @@ 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 -// 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. -// diagnosticParameters - Parameters for the diagnostic operation -// options - DeploymentsClientBeginStartJFROptions contains the optional parameters for the DeploymentsClient.BeginStartJFR -// method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - diagnosticParameters - Parameters for the diagnostic operation +// - options - DeploymentsClientBeginStartJFROptions contains the optional parameters for the DeploymentsClient.BeginStartJFR +// method. func (client *DeploymentsClient) BeginStartJFR(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginStartJFROptions) (*runtime.Poller[DeploymentsClientStartJFRResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.startJFR(ctx, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters, options) @@ -1034,7 +1056,8 @@ 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-12-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 { @@ -1078,7 +1101,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, diagnosticParameters) @@ -1086,13 +1109,14 @@ 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 -// 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 - DeploymentsClientBeginStopOptions contains the optional parameters for the DeploymentsClient.BeginStop method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - options - DeploymentsClientBeginStopOptions contains the optional parameters for the DeploymentsClient.BeginStop method. func (client *DeploymentsClient) BeginStop(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginStopOptions) (*runtime.Poller[DeploymentsClientStopResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.stop(ctx, resourceGroupName, serviceName, appName, deploymentName, options) @@ -1107,7 +1131,8 @@ 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-12-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 { @@ -1151,7 +1176,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1159,14 +1184,15 @@ 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 -// 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. -// deploymentResource - Parameters for the update operation -// options - DeploymentsClientBeginUpdateOptions contains the optional parameters for the DeploymentsClient.BeginUpdate method. +// +// Generated from API version 2022-12-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. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - deploymentResource - Parameters for the update operation +// - options - DeploymentsClientBeginUpdateOptions contains the optional parameters for the DeploymentsClient.BeginUpdate method. func (client *DeploymentsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource, options *DeploymentsClientBeginUpdateOptions) (*runtime.Poller[DeploymentsClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, serviceName, appName, deploymentName, deploymentResource, options) @@ -1181,7 +1207,8 @@ 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-12-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 { @@ -1225,7 +1252,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-12-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 deleted file mode 100644 index 1350186143b9..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/deployments_client_example_test.go +++ /dev/null @@ -1,570 +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. - -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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Get.json -func ExampleDeploymentsClient_Get_deploymentsGet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_CreateOrUpdate.json -func ExampleDeploymentsClient_BeginCreateOrUpdate_deploymentsCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DeploymentResource{ - Properties: &armappplatform.DeploymentResourceProperties{ - DeploymentSettings: &armappplatform.DeploymentSettings{ - AddonConfigs: map[string]map[string]interface{}{ - "ApplicationConfigurationService": { - "patterns": []interface{}{ - "mypattern", - }, - }, - }, - 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"), - Version: to.Ptr("1.0"), - RelativePath: to.Ptr("resources/a172cedcae47474b615c54d510a5d84a8dea3032e958587430b413538be3f333-2019082605-e3095339-1723-44b7-8b5e-31b1003978bc"), - ArtifactSelector: to.Ptr("sub-module-1"), - }, - }, - SKU: &armappplatform.SKU{ - Name: to.Ptr("S0"), - Capacity: to.Ptr[int32](1), - Tier: to.Ptr("Standard"), - }, - }, 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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Delete.json -func ExampleDeploymentsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", 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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Update.json -func ExampleDeploymentsClient_BeginUpdate_deploymentsUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DeploymentResource{ - Properties: &armappplatform.DeploymentResourceProperties{ - Source: &armappplatform.SourceUploadedUserSourceInfo{ - Type: to.Ptr("Source"), - Version: to.Ptr("1.0"), - RelativePath: to.Ptr("resources/a172cedcae47474b615c54d510a5d84a8dea3032e958587430b413538be3f333-2019082605-e3095339-1723-44b7-8b5e-31b1003978bc"), - ArtifactSelector: to.Ptr("sub-module-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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_List.json -func ExampleDeploymentsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", "myapp", &armappplatform.DeploymentsClientListOptions{Version: []string{}}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_ListForCluster.json -func ExampleDeploymentsClient_NewListForClusterPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListForClusterPager("myResourceGroup", "myservice", &armappplatform.DeploymentsClientListForClusterOptions{Version: []string{}}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Start.json -func ExampleDeploymentsClient_BeginStart() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStart(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", 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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Stop.json -func ExampleDeploymentsClient_BeginStop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStop(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", 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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Restart.json -func ExampleDeploymentsClient_BeginRestart() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginRestart(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", 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/tree/main/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() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetRemoteDebuggingConfig(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_GetLogFileUrl.json -func ExampleDeploymentsClient_GetLogFileURL() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetLogFileURL(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_GenerateHeapDump.json -func ExampleDeploymentsClient_BeginGenerateHeapDump() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGenerateHeapDump(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DiagnosticParameters{ - AppInstance: to.Ptr("myappinstance"), - FilePath: to.Ptr("/byos/diagnose"), - }, 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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_GenerateThreadDump.json -func ExampleDeploymentsClient_BeginGenerateThreadDump() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGenerateThreadDump(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DiagnosticParameters{ - AppInstance: to.Ptr("myappinstance"), - FilePath: to.Ptr("/byos/diagnose"), - }, 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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_StartJFR.json -func ExampleDeploymentsClient_BeginStartJFR() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStartJFR(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DiagnosticParameters{ - AppInstance: to.Ptr("myappinstance"), - Duration: to.Ptr("60s"), - FilePath: to.Ptr("/byos/diagnose"), - }, 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/devtoolportals_client.go b/sdk/resourcemanager/appplatform/armappplatform/devtoolportals_client.go deleted file mode 100644 index 2d402c65e8fe..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/devtoolportals_client.go +++ /dev/null @@ -1,327 +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" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "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 { - host string - subscriptionID string - pl runtime.Pipeline -} - -// 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) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &DevToolPortalsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - 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.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[DevToolPortalsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, 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.pl.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.host, 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.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[DevToolPortalsClientDeleteResponse](options.ResumeToken, client.pl, 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.pl.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.host, 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.pl.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.host, 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.List 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.pl.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.host, 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 5c522d96793f..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/devtoolportals_client_example_test.go +++ /dev/null @@ -1,124 +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. - -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/tree/main/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() - client, err := armappplatform.NewDevToolPortalsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewDevToolPortalsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewDevToolPortalsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewDevToolPortalsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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 index 18507a3d22fa..7f521eff96b7 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/gatewaycustomdomains_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/gatewaycustomdomains_client.go @@ -32,10 +32,10 @@ type GatewayCustomDomainsClient struct { } // 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. +// - 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) { if options == nil { options = &arm.ClientOptions{} @@ -58,15 +58,16 @@ func NewGatewayCustomDomainsClient(subscriptionID string, credential azcore.Toke // 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. +// +// Generated from API version 2022-12-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. +// - 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) @@ -81,7 +82,8 @@ func (client *GatewayCustomDomainsClient) BeginCreateOrUpdate(ctx context.Contex // 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 +// +// Generated from API version 2022-12-01 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 { @@ -125,7 +127,7 @@ func (client *GatewayCustomDomainsClient) createOrUpdateCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, gatewayCustomDomainResource) @@ -133,14 +135,15 @@ func (client *GatewayCustomDomainsClient) createOrUpdateCreateRequest(ctx contex // 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. +// +// Generated from API version 2022-12-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. +// - 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) @@ -155,7 +158,8 @@ func (client *GatewayCustomDomainsClient) BeginDelete(ctx context.Context, resou // 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 +// +// Generated from API version 2022-12-01 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 { @@ -199,7 +203,7 @@ func (client *GatewayCustomDomainsClient) deleteCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -207,14 +211,15 @@ func (client *GatewayCustomDomainsClient) deleteCreateRequest(ctx context.Contex // 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. +// +// Generated from API version 2022-12-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. +// - 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 { @@ -258,7 +263,7 @@ func (client *GatewayCustomDomainsClient) 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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -274,13 +279,14 @@ func (client *GatewayCustomDomainsClient) getHandleResponse(resp *http.Response) } // 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.List -// method. +// +// Generated from API version 2022-12-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. +// - 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 { @@ -333,7 +339,7 @@ func (client *GatewayCustomDomainsClient) 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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, 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 d7c5237687eb..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/gatewaycustomdomains_client_example_test.go +++ /dev/null @@ -1,109 +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. - -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/tree/main/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() - client, err := armappplatform.NewGatewayCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", "myDomainName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewGatewayCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewGatewayCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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/tree/main/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() - client, err := armappplatform.NewGatewayCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", "default", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/gatewayrouteconfigs_client.go b/sdk/resourcemanager/appplatform/armappplatform/gatewayrouteconfigs_client.go index e9cf93fc6c1e..c2badd82dc6f 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/gatewayrouteconfigs_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/gatewayrouteconfigs_client.go @@ -32,10 +32,10 @@ type GatewayRouteConfigsClient struct { } // 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. +// - 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) { if options == nil { options = &arm.ClientOptions{} @@ -59,15 +59,16 @@ func NewGatewayRouteConfigsClient(subscriptionID string, credential azcore.Token // 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. +// +// Generated from API version 2022-12-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. +// - 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) @@ -83,7 +84,8 @@ func (client *GatewayRouteConfigsClient) BeginCreateOrUpdate(ctx context.Context // 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 +// +// Generated from API version 2022-12-01 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 { @@ -127,7 +129,7 @@ func (client *GatewayRouteConfigsClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, gatewayRouteConfigResource) @@ -135,14 +137,15 @@ func (client *GatewayRouteConfigsClient) createOrUpdateCreateRequest(ctx context // 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. +// +// Generated from API version 2022-12-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. +// - 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) @@ -157,7 +160,8 @@ func (client *GatewayRouteConfigsClient) BeginDelete(ctx context.Context, resour // 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 +// +// Generated from API version 2022-12-01 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 { @@ -201,7 +205,7 @@ func (client *GatewayRouteConfigsClient) 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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -209,13 +213,14 @@ func (client *GatewayRouteConfigsClient) deleteCreateRequest(ctx context.Context // 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. +// +// Generated from API version 2022-12-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. +// - 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 { @@ -259,7 +264,7 @@ func (client *GatewayRouteConfigsClient) 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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -275,13 +280,14 @@ func (client *GatewayRouteConfigsClient) getHandleResponse(resp *http.Response) } // 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.List -// method. +// +// Generated from API version 2022-12-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. +// - 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 { @@ -334,7 +340,7 @@ func (client *GatewayRouteConfigsClient) 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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, 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 c13d4dcb56ca..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/gatewayrouteconfigs_client_example_test.go +++ /dev/null @@ -1,123 +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. - -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/tree/main/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() - client, err := armappplatform.NewGatewayRouteConfigsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", "myRouteConfig", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewGatewayRouteConfigsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewGatewayRouteConfigsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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/tree/main/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() - client, err := armappplatform.NewGatewayRouteConfigsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", "default", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/gateways_client.go b/sdk/resourcemanager/appplatform/armappplatform/gateways_client.go index 287bd28b0a7c..6fc01bcd42fa 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/gateways_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/gateways_client.go @@ -32,10 +32,10 @@ type GatewaysClient struct { } // 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. +// - 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) { if options == nil { options = &arm.ClientOptions{} @@ -58,14 +58,15 @@ func NewGatewaysClient(subscriptionID string, credential azcore.TokenCredential, // 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. +// +// Generated from API version 2022-12-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. +// - 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) @@ -80,7 +81,8 @@ func (client *GatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceG // 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 +// +// Generated from API version 2022-12-01 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 { @@ -120,7 +122,7 @@ func (client *GatewaysClient) 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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, gatewayResource) @@ -128,12 +130,13 @@ func (client *GatewaysClient) createOrUpdateCreateRequest(ctx context.Context, r // 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. +// +// Generated from API version 2022-12-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. +// - 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) @@ -148,7 +151,8 @@ func (client *GatewaysClient) BeginDelete(ctx context.Context, resourceGroupName // 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 +// +// Generated from API version 2022-12-01 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 { @@ -188,7 +192,7 @@ func (client *GatewaysClient) 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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -196,12 +200,13 @@ func (client *GatewaysClient) deleteCreateRequest(ctx context.Context, resourceG // 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. +// +// Generated from API version 2022-12-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. +// - 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 { @@ -241,7 +246,7 @@ func (client *GatewaysClient) 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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -257,11 +262,12 @@ func (client *GatewaysClient) getHandleResponse(resp *http.Response) (GatewaysCl } // 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.List method. +// +// Generated from API version 2022-12-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. +// - 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 { @@ -310,7 +316,7 @@ func (client *GatewaysClient) 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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -325,77 +331,16 @@ func (client *GatewaysClient) listHandleResponse(resp *http.Response) (GatewaysC 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.pl.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.host, 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. +// +// Generated from API version 2022-12-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. +// - 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 { @@ -435,7 +380,7 @@ func (client *GatewaysClient) validateDomainCreateRequest(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-12-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/gateways_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/gateways_client_example_test.go deleted file mode 100644 index 13a4c6e9e95b..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/gateways_client_example_test.go +++ /dev/null @@ -1,158 +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. - -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/tree/main/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() - client, err := armappplatform.NewGatewaysClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewGatewaysClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewGatewaysClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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/tree/main/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() - client, err := armappplatform.NewGatewaysClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListEnvSecrets(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewGatewaysClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewGatewaysClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.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) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/go.mod b/sdk/resourcemanager/appplatform/armappplatform/go.mod index b323730ce4cc..19e3a94c171a 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/go.mod +++ b/sdk/resourcemanager/appplatform/armappplatform/go.mod @@ -1,21 +1,13 @@ -module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform +module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2 go 1.18 -require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0 -) +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.7.0 // indirect - github.com/golang-jwt/jwt/v4 v4.4.2 // indirect - github.com/google/uuid v1.1.1 // indirect - github.com/kylelemons/godebug v1.1.0 // indirect - github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 // indirect - golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect - golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect golang.org/x/text v0.3.7 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/sdk/resourcemanager/appplatform/armappplatform/go.sum b/sdk/resourcemanager/appplatform/armappplatform/go.sum index 8c0539b73123..3afb578030a5 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/go.sum +++ b/sdk/resourcemanager/appplatform/armappplatform/go.sum @@ -1,30 +1,15 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 h1:sVPhtT2qjO86rTUaWMr4WoES4TkjGnzcioXcnHV9s5k= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0 h1:t/W5MYAuQy81cvM8VUNfRLzhtKpXhVUAN7Cd7KVbTyc= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0/go.mod h1:NBanQUfSWiWn3QEpWDTCU0IjBECKOYvl2R8xdRtMtiM= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 h1:jp0dGvZ7ZK0mgqnTSClMxa5xuRL7NZgHameVYF6BurY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/AzureAD/microsoft-authentication-library-for-go v0.7.0 h1:VgSJlZH5u0k2qxSpqyghcFQKmvYckj46uymKK5XzkBM= -github.com/AzureAD/microsoft-authentication-library-for-go v0.7.0/go.mod h1:BDJ5qMFKx9DugEg3+uQSDCdbYPr5s9vBTrL9P8TpqOU= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= -github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= -github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI= -github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 h1:Tgea0cVUD0ivh5ADBX4WwuI12DUd2to3nCYe2eayMIw= -golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 h1:HVyaeDAYux4pnY+D/SiwmLOR36ewZ4iGQIIrtnuCjFA= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/resourcemanager/appplatform/armappplatform/models.go b/sdk/resourcemanager/appplatform/armappplatform/models.go index 84e3507d01be..de7466f57c98 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/models.go +++ b/sdk/resourcemanager/appplatform/armappplatform/models.go @@ -64,7 +64,8 @@ type APIPortalCustomDomainsClientGetOptions struct { // placeholder for future optional parameters } -// APIPortalCustomDomainsClientListOptions contains the optional parameters for the APIPortalCustomDomainsClient.List method. +// APIPortalCustomDomainsClientListOptions contains the optional parameters for the APIPortalCustomDomainsClient.NewListPager +// method. type APIPortalCustomDomainsClientListOptions struct { // placeholder for future optional parameters } @@ -165,7 +166,7 @@ type APIPortalsClientGetOptions struct { // placeholder for future optional parameters } -// APIPortalsClientListOptions contains the optional parameters for the APIPortalsClient.List method. +// APIPortalsClientListOptions contains the optional parameters for the APIPortalsClient.NewListPager method. type APIPortalsClientListOptions struct { // placeholder for future optional parameters } @@ -175,98 +176,6 @@ 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. @@ -309,7 +218,7 @@ type AppResourceCollection struct { // AppResourceProperties - App resource properties payload type AppResourceProperties struct { // Collection of addons - AddonConfigs map[string]map[string]interface{} `json:"addonConfigs,omitempty"` + AddonConfigs map[string]map[string]any `json:"addonConfigs,omitempty"` // List of custom persistent disks CustomPersistentDisks []*CustomPersistentDiskResource `json:"customPersistentDisks,omitempty"` @@ -357,200 +266,12 @@ type AppVNetAddons struct { PublicEndpointURL *string `json:"publicEndpointUrl,omitempty" azure:"ro"` } -type ApplicationAcceleratorComponent struct { - ResourceRequests *ApplicationAcceleratorResourceRequests `json:"resourceRequests,omitempty"` - - // READ-ONLY - Instances []*ApplicationAcceleratorInstance `json:"instances,omitempty" azure:"ro"` - - // READ-ONLY - Name *string `json:"name,omitempty" azure:"ro"` -} - -type ApplicationAcceleratorInstance struct { - // READ-ONLY; Name of the Application Accelerator instance. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Status of the Application Accelerator instance. It can be Pending, Running, Succeeded, Failed, Unknown. - Status *string `json:"status,omitempty" azure:"ro"` -} - -// ApplicationAcceleratorProperties - Application accelerator properties payload -type ApplicationAcceleratorProperties struct { - // READ-ONLY; Collection of components belong to application accelerator. - Components []*ApplicationAcceleratorComponent `json:"components,omitempty" azure:"ro"` - - // READ-ONLY; State of the application accelerator. - ProvisioningState *ApplicationAcceleratorProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ApplicationAcceleratorResource - Application accelerator resource -type ApplicationAcceleratorResource struct { - // Application accelerator properties payload - Properties *ApplicationAcceleratorProperties `json:"properties,omitempty"` - - // Sku of the application 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"` -} - -// ApplicationAcceleratorResourceCollection - Object that includes an array of application accelerator resources and a possible -// link for next set -type ApplicationAcceleratorResourceCollection 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"` -} - -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"` - - // READ-ONLY; Instance count of the application accelerator component. - InstanceCount *int32 `json:"instanceCount,omitempty" azure:"ro"` - - // 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"` -} - -// ApplicationAcceleratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationAcceleratorsClient.BeginCreateOrUpdate -// method. -type ApplicationAcceleratorsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationAcceleratorsClientBeginDeleteOptions contains the optional parameters for the ApplicationAcceleratorsClient.BeginDelete -// method. -type ApplicationAcceleratorsClientBeginDeleteOptions 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 -} - -// ApplicationAcceleratorsClientListOptions contains the optional parameters for the ApplicationAcceleratorsClient.List 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 interface{} `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.List 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. @@ -587,7 +308,7 @@ type AppsClientGetResourceUploadURLOptions struct { // placeholder for future optional parameters } -// AppsClientListOptions contains the optional parameters for the AppsClient.List method. +// AppsClientListOptions contains the optional parameters for the AppsClient.NewListPager method. type AppsClientListOptions struct { // placeholder for future optional parameters } @@ -669,7 +390,7 @@ type BindingResourceCollection struct { // BindingResourceProperties - Binding resource properties payload type BindingResourceProperties struct { // Binding parameters of the Binding resource - BindingParameters map[string]interface{} `json:"bindingParameters,omitempty"` + BindingParameters map[string]any `json:"bindingParameters,omitempty"` // The key of the bound resource Key *string `json:"key,omitempty"` @@ -716,7 +437,7 @@ type BindingsClientGetOptions struct { // placeholder for future optional parameters } -// BindingsClientListOptions contains the optional parameters for the BindingsClient.List method. +// BindingsClientListOptions contains the optional parameters for the BindingsClient.NewListPager method. type BindingsClientListOptions struct { // placeholder for future optional parameters } @@ -821,9 +542,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"` @@ -884,7 +602,8 @@ type BuildServiceAgentPoolClientGetOptions struct { // placeholder for future optional parameters } -// BuildServiceAgentPoolClientListOptions contains the optional parameters for the BuildServiceAgentPoolClient.List method. +// BuildServiceAgentPoolClientListOptions contains the optional parameters for the BuildServiceAgentPoolClient.NewListPager +// method. type BuildServiceAgentPoolClientListOptions struct { // placeholder for future optional parameters } @@ -963,7 +682,7 @@ type BuildServiceBuilderClientListDeploymentsOptions struct { // placeholder for future optional parameters } -// BuildServiceBuilderClientListOptions contains the optional parameters for the BuildServiceBuilderClient.List method. +// BuildServiceBuilderClientListOptions contains the optional parameters for the BuildServiceBuilderClient.NewListPager method. type BuildServiceBuilderClientListOptions struct { // placeholder for future optional parameters } @@ -1013,19 +732,19 @@ type BuildServiceClientGetSupportedStackOptions struct { // placeholder for future optional parameters } -// BuildServiceClientListBuildResultsOptions contains the optional parameters for the BuildServiceClient.ListBuildResults +// BuildServiceClientListBuildResultsOptions contains the optional parameters for the BuildServiceClient.NewListBuildResultsPager // method. type BuildServiceClientListBuildResultsOptions struct { // placeholder for future optional parameters } -// BuildServiceClientListBuildServicesOptions contains the optional parameters for the BuildServiceClient.ListBuildServices +// BuildServiceClientListBuildServicesOptions contains the optional parameters for the BuildServiceClient.NewListBuildServicesPager // method. type BuildServiceClientListBuildServicesOptions struct { // placeholder for future optional parameters } -// BuildServiceClientListBuildsOptions contains the optional parameters for the BuildServiceClient.ListBuilds method. +// BuildServiceClientListBuildsOptions contains the optional parameters for the BuildServiceClient.NewListBuildsPager method. type BuildServiceClientListBuildsOptions struct { // placeholder for future optional parameters } @@ -1074,15 +793,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"` } @@ -1144,7 +857,7 @@ type BuildpackBindingClientGetOptions struct { // placeholder for future optional parameters } -// BuildpackBindingClientListOptions contains the optional parameters for the BuildpackBindingClient.List method. +// BuildpackBindingClientListOptions contains the optional parameters for the BuildpackBindingClient.NewListPager method. type BuildpackBindingClientListOptions struct { // placeholder for future optional parameters } @@ -1300,16 +1013,13 @@ type CertificatesClientGetOptions struct { // placeholder for future optional parameters } -// CertificatesClientListOptions contains the optional parameters for the CertificatesClient.List method. +// CertificatesClientListOptions contains the optional parameters for the CertificatesClient.NewListPager method. type CertificatesClientListOptions struct { // placeholder for future optional parameters } // 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"` @@ -1600,7 +1310,8 @@ type ConfigurationServicesClientGetOptions struct { // placeholder for future optional parameters } -// ConfigurationServicesClientListOptions contains the optional parameters for the ConfigurationServicesClient.List method. +// ConfigurationServicesClientListOptions contains the optional parameters for the ConfigurationServicesClient.NewListPager +// method. type ConfigurationServicesClientListOptions struct { // placeholder for future optional parameters } @@ -1781,7 +1492,7 @@ type CustomDomainsClientGetOptions struct { // placeholder for future optional parameters } -// CustomDomainsClientListOptions contains the optional parameters for the CustomDomainsClient.List method. +// CustomDomainsClientListOptions contains the optional parameters for the CustomDomainsClient.NewListPager method. type CustomDomainsClientListOptions struct { // placeholder for future optional parameters } @@ -1824,84 +1535,6 @@ type CustomPersistentDiskResource struct { 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.List 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 @@ -1983,7 +1616,7 @@ type DeploymentResourceProperties struct { // DeploymentSettings - Deployment settings payload type DeploymentSettings struct { // Collection of addons - AddonConfigs map[string]map[string]interface{} `json:"addonConfigs,omitempty"` + AddonConfigs map[string]map[string]any `json:"addonConfigs,omitempty"` // Container liveness and readiness probe settings ContainerProbeSettings *ContainerProbeSettings `json:"containerProbeSettings,omitempty"` @@ -2110,147 +1743,19 @@ type DeploymentsClientGetRemoteDebuggingConfigOptions struct { // placeholder for future optional parameters } -// DeploymentsClientListForClusterOptions contains the optional parameters for the DeploymentsClient.ListForCluster method. +// 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.List method. +// DeploymentsClientListOptions contains the optional parameters for the DeploymentsClient.NewListPager method. type DeploymentsClientListOptions struct { // Version of the deployments to be listed Version []string } -// DevToolPortalFeatureDetail - Detail settings for Dev Tool Portal feature -type DevToolPortalFeatureDetail struct { - // State of the plugin - State *DevToolPortalFeatureState `json:"state,omitempty"` - - // READ-ONLY; Route path to visit the plugin - Route *string `json:"route,omitempty" azure:"ro"` -} - -// DevToolPortalFeatureSettings - Settings for Dev Tool Portal -type DevToolPortalFeatureSettings struct { - // Detail of Accelerator plugin - ApplicationAccelerator *DevToolPortalFeatureDetail `json:"applicationAccelerator,omitempty"` - - // Detail of App Live View plugin - ApplicationLiveView *DevToolPortalFeatureDetail `json:"applicationLiveView,omitempty"` -} - -// DevToolPortalInstance - Collection of instances belong to the Dev Tool Portal. -type DevToolPortalInstance struct { - // READ-ONLY; Name of the Dev Tool Portal 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. - 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"` - - // READ-ONLY; Collection of instances belong to Dev Tool Portal. - Instances []*DevToolPortalInstance `json:"instances,omitempty" azure:"ro"` - - // READ-ONLY; State of the Dev Tool Portal. - ProvisioningState *DevToolPortalProvisioningState `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"` -} - -// DevToolPortalResource - Dev Tool Portal resource -type DevToolPortalResource struct { - // Dev Tool Portal properties payload - Properties *DevToolPortalProperties `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"` -} - -// DevToolPortalResourceCollection - Object that includes an array of Dev Tool Portal resources and a possible link for next -// set -type DevToolPortalResourceCollection 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"` -} - -// 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 - CPU *string `json:"cpu,omitempty" azure:"ro"` - - // READ-ONLY; Desired instance count of Dev Tool Portal. - 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. - 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"` - - // It defines the specific actions applications can be allowed to do on a user's behalf - Scopes []*string `json:"scopes,omitempty"` -} - -// DevToolPortalsClientBeginCreateOrUpdateOptions contains the optional parameters for the DevToolPortalsClient.BeginCreateOrUpdate -// method. -type DevToolPortalsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DevToolPortalsClientBeginDeleteOptions contains the optional parameters for the DevToolPortalsClient.BeginDelete method. -type DevToolPortalsClientBeginDeleteOptions 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 -} - -// DevToolPortalsClientListOptions contains the optional parameters for the DevToolPortalsClient.List method. -type DevToolPortalsClientListOptions struct { - // placeholder for future optional parameters -} - // DiagnosticParameters - Diagnostic parameters of diagnostic operations type DiagnosticParameters struct { // App instance name @@ -2417,7 +1922,8 @@ type GatewayCustomDomainsClientGetOptions struct { // placeholder for future optional parameters } -// GatewayCustomDomainsClientListOptions contains the optional parameters for the GatewayCustomDomainsClient.List method. +// GatewayCustomDomainsClientListOptions contains the optional parameters for the GatewayCustomDomainsClient.NewListPager +// method. type GatewayCustomDomainsClientListOptions struct { // placeholder for future optional parameters } @@ -2457,15 +1963,9 @@ 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"` @@ -2491,15 +1991,6 @@ type GatewayProperties struct { URL *string `json:"url,omitempty" azure:"ro"` } -// GatewayPropertiesEnvironmentVariables - Environment variables of Spring Cloud Gateway -type GatewayPropertiesEnvironmentVariables struct { - // Non-sensitive properties - Properties map[string]*string `json:"properties,omitempty"` - - // Sensitive properties - Secrets map[string]*string `json:"secrets,omitempty"` -} - // GatewayResource - Spring Cloud Gateway resource type GatewayResource struct { // Spring Cloud Gateway properties payload @@ -2550,26 +2041,15 @@ 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"` // Array of API routes, each route contains properties such as title, uri, ssoEnabled, predicates, filters. Routes []*GatewayAPIRoute `json:"routes,omitempty"` - // Enable Single Sign-On in app level. - SsoEnabled *bool `json:"ssoEnabled,omitempty"` - // READ-ONLY; State of the Spring Cloud Gateway route config. ProvisioningState *GatewayProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } @@ -2621,7 +2101,7 @@ type GatewayRouteConfigsClientGetOptions struct { // placeholder for future optional parameters } -// GatewayRouteConfigsClientListOptions contains the optional parameters for the GatewayRouteConfigsClient.List method. +// GatewayRouteConfigsClientListOptions contains the optional parameters for the GatewayRouteConfigsClient.NewListPager method. type GatewayRouteConfigsClientListOptions struct { // placeholder for future optional parameters } @@ -2643,12 +2123,7 @@ type GatewaysClientGetOptions struct { // placeholder for future optional parameters } -// GatewaysClientListEnvSecretsOptions contains the optional parameters for the GatewaysClient.ListEnvSecrets method. -type GatewaysClientListEnvSecretsOptions struct { - // placeholder for future optional parameters -} - -// GatewaysClientListOptions contains the optional parameters for the GatewaysClient.List method. +// GatewaysClientListOptions contains the optional parameters for the GatewaysClient.NewListPager method. type GatewaysClientListOptions struct { // placeholder for future optional parameters } @@ -2892,18 +2367,6 @@ type ManagedIdentityProperties struct { 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 type MetricDimension struct { // Localized friendly display name of the dimension @@ -3146,7 +2609,7 @@ type OperationProperties struct { ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. type OperationsClientListOptions struct { // placeholder for future optional parameters } @@ -3163,77 +2626,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.List 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 { @@ -3488,7 +2880,7 @@ type SKUCapacity struct { ScaleType *SKUScaleType `json:"scaleType,omitempty"` } -// SKUsClientListOptions contains the optional parameters for the SKUsClient.List method. +// SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. type SKUsClientListOptions struct { // placeholder for future optional parameters } @@ -3512,7 +2904,7 @@ type ServiceRegistriesClientGetOptions struct { // placeholder for future optional parameters } -// ServiceRegistriesClientListOptions contains the optional parameters for the ServiceRegistriesClient.List method. +// ServiceRegistriesClientListOptions contains the optional parameters for the ServiceRegistriesClient.NewListPager method. type ServiceRegistriesClientListOptions struct { // placeholder for future optional parameters } @@ -3680,12 +3072,13 @@ type ServicesClientGetOptions struct { // placeholder for future optional parameters } -// ServicesClientListBySubscriptionOptions contains the optional parameters for the ServicesClient.ListBySubscription method. +// ServicesClientListBySubscriptionOptions contains the optional parameters for the ServicesClient.NewListBySubscriptionPager +// method. type ServicesClientListBySubscriptionOptions struct { // placeholder for future optional parameters } -// ServicesClientListOptions contains the optional parameters for the ServicesClient.List method. +// ServicesClientListOptions contains the optional parameters for the ServicesClient.NewListPager method. type ServicesClientListOptions struct { // placeholder for future optional parameters } @@ -3841,7 +3234,7 @@ type StoragesClientGetOptions struct { // placeholder for future optional parameters } -// StoragesClientListOptions contains the optional parameters for the StoragesClient.List method. +// StoragesClientListOptions contains the optional parameters for the StoragesClient.NewListPager method. type StoragesClientListOptions struct { // placeholder for future optional parameters } diff --git a/sdk/resourcemanager/appplatform/armappplatform/models_serde.go b/sdk/resourcemanager/appplatform/armappplatform/models_serde.go index c7f381620336..c4a7c1048752 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/models_serde.go +++ b/sdk/resourcemanager/appplatform/armappplatform/models_serde.go @@ -18,7 +18,7 @@ import ( // MarshalJSON implements the json.Marshaller interface for type APIPortalCustomDomainProperties. func (a APIPortalCustomDomainProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "thumbprint", a.Thumbprint) return json.Marshal(objectMap) } @@ -45,7 +45,7 @@ func (a *APIPortalCustomDomainProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type APIPortalCustomDomainResource. func (a APIPortalCustomDomainResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) populate(objectMap, "properties", a.Properties) @@ -88,7 +88,7 @@ func (a *APIPortalCustomDomainResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type APIPortalCustomDomainResourceCollection. func (a APIPortalCustomDomainResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -119,7 +119,7 @@ func (a *APIPortalCustomDomainResourceCollection) UnmarshalJSON(data []byte) err // MarshalJSON implements the json.Marshaller interface for type APIPortalInstance. func (a APIPortalInstance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", a.Name) populate(objectMap, "status", a.Status) return json.Marshal(objectMap) @@ -150,7 +150,7 @@ func (a *APIPortalInstance) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type APIPortalProperties. func (a APIPortalProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "gatewayIds", a.GatewayIDs) populate(objectMap, "httpsOnly", a.HTTPSOnly) populate(objectMap, "instances", a.Instances) @@ -209,7 +209,7 @@ func (a *APIPortalProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type APIPortalResource. func (a APIPortalResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) populate(objectMap, "properties", a.Properties) @@ -256,7 +256,7 @@ func (a *APIPortalResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type APIPortalResourceCollection. func (a APIPortalResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -287,7 +287,7 @@ func (a *APIPortalResourceCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type APIPortalResourceRequests. func (a APIPortalResourceRequests) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cpu", a.CPU) populate(objectMap, "memory", a.Memory) return json.Marshal(objectMap) @@ -316,184 +316,9 @@ func (a *APIPortalResourceRequests) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type AcceleratorAuthSetting. -func (a AcceleratorAuthSetting) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["authType"] = a.AuthType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AcceleratorAuthSetting. -func (a *AcceleratorAuthSetting) UnmarshalJSON(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 "authType": - err = unpopulate(val, "AuthType", &a.AuthType) - 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 AcceleratorBasicAuthSetting. -func (a AcceleratorBasicAuthSetting) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["authType"] = "BasicAuth" - populate(objectMap, "password", a.Password) - populate(objectMap, "username", a.Username) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AcceleratorBasicAuthSetting. -func (a *AcceleratorBasicAuthSetting) UnmarshalJSON(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 "authType": - err = unpopulate(val, "AuthType", &a.AuthType) - delete(rawMsg, key) - case "password": - err = unpopulate(val, "Password", &a.Password) - delete(rawMsg, key) - case "username": - err = unpopulate(val, "Username", &a.Username) - 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 AcceleratorGitRepository. -func (a AcceleratorGitRepository) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - 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) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AcceleratorGitRepository. -func (a *AcceleratorGitRepository) UnmarshalJSON(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 "authSetting": - a.AuthSetting, err = unmarshalAcceleratorAuthSettingClassification(val) - delete(rawMsg, key) - case "branch": - err = unpopulate(val, "Branch", &a.Branch) - delete(rawMsg, key) - case "commit": - err = unpopulate(val, "Commit", &a.Commit) - delete(rawMsg, key) - case "gitTag": - err = unpopulate(val, "GitTag", &a.GitTag) - delete(rawMsg, key) - case "intervalInSeconds": - err = unpopulate(val, "IntervalInSeconds", &a.IntervalInSeconds) - delete(rawMsg, key) - case "url": - err = unpopulate(val, "URL", &a.URL) - 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 AcceleratorPublicSetting. -func (a AcceleratorPublicSetting) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["authType"] = "Public" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AcceleratorPublicSetting. -func (a *AcceleratorPublicSetting) UnmarshalJSON(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 "authType": - err = unpopulate(val, "AuthType", &a.AuthType) - 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 AcceleratorSSHSetting. -func (a AcceleratorSSHSetting) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["authType"] = "SSH" - populate(objectMap, "hostKey", a.HostKey) - populate(objectMap, "hostKeyAlgorithm", a.HostKeyAlgorithm) - populate(objectMap, "privateKey", a.PrivateKey) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AcceleratorSSHSetting. -func (a *AcceleratorSSHSetting) UnmarshalJSON(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 "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) - delete(rawMsg, key) - case "privateKey": - err = unpopulate(val, "PrivateKey", &a.PrivateKey) - 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 ActiveDeploymentCollection. func (a ActiveDeploymentCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "activeDeploymentNames", a.ActiveDeploymentNames) return json.Marshal(objectMap) } @@ -520,7 +345,7 @@ func (a *ActiveDeploymentCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AppResource. func (a AppResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", a.ID) populate(objectMap, "identity", a.Identity) populate(objectMap, "location", a.Location) @@ -571,7 +396,7 @@ func (a *AppResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AppResourceCollection. func (a AppResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -602,7 +427,7 @@ func (a *AppResourceCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AppResourceProperties. func (a AppResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "addonConfigs", a.AddonConfigs) populate(objectMap, "customPersistentDisks", a.CustomPersistentDisks) populate(objectMap, "enableEndToEndTLS", a.EnableEndToEndTLS) @@ -677,7 +502,7 @@ func (a *AppResourceProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AppVNetAddons. func (a AppVNetAddons) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "publicEndpoint", a.PublicEndpoint) populate(objectMap, "publicEndpointUrl", a.PublicEndpointURL) return json.Marshal(objectMap) @@ -706,17 +531,15 @@ func (a *AppVNetAddons) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ApplicationAcceleratorComponent. -func (a ApplicationAcceleratorComponent) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "instances", a.Instances) - populate(objectMap, "name", a.Name) - populate(objectMap, "resourceRequests", a.ResourceRequests) +// MarshalJSON implements the json.Marshaller interface for type ApplicationInsightsAgentVersions. +func (a ApplicationInsightsAgentVersions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "java", a.Java) 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 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) @@ -724,14 +547,8 @@ func (a *ApplicationAcceleratorComponent) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "instances": - err = unpopulate(val, "Instances", &a.Instances) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "resourceRequests": - err = unpopulate(val, "ResourceRequests", &a.ResourceRequests) + case "java": + err = unpopulate(val, "Java", &a.Java) delete(rawMsg, key) } if err != nil { @@ -741,16 +558,16 @@ func (a *ApplicationAcceleratorComponent) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ApplicationAcceleratorInstance. -func (a ApplicationAcceleratorInstance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", a.Name) - populate(objectMap, "status", a.Status) +// 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 ApplicationAcceleratorInstance. -func (a *ApplicationAcceleratorInstance) 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) @@ -758,11 +575,11 @@ func (a *ApplicationAcceleratorInstance) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "name": - err = unpopulate(val, "Name", &a.Name) + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &a.Status) + case "value": + err = unpopulate(val, "Value", &a.Value) delete(rawMsg, key) } if err != nil { @@ -772,16 +589,15 @@ func (a *ApplicationAcceleratorInstance) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ApplicationAcceleratorProperties. -func (a ApplicationAcceleratorProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "components", a.Components) - populate(objectMap, "provisioningState", a.ProvisioningState) +// MarshalJSON implements the json.Marshaller interface for type AvailableRuntimeVersions. +func (a AvailableRuntimeVersions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", a.Value) 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 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) @@ -789,11 +605,8 @@ func (a *ApplicationAcceleratorProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "components": - err = unpopulate(val, "Components", &a.Components) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + case "value": + err = unpopulate(val, "Value", &a.Value) delete(rawMsg, key) } if err != nil { @@ -803,20 +616,19 @@ func (a *ApplicationAcceleratorProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ApplicationAcceleratorResource. -func (a ApplicationAcceleratorResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - 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) +// 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 ApplicationAcceleratorResource. -func (a *ApplicationAcceleratorResource) UnmarshalJSON(data []byte) error { +// 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) @@ -824,20 +636,17 @@ func (a *ApplicationAcceleratorResource) 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) + case "mountOptions": + err = unpopulate(val, "MountOptions", &a.MountOptions) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) + case "mountPath": + err = unpopulate(val, "MountPath", &a.MountPath) delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &a.SKU) + case "readOnly": + err = unpopulate(val, "ReadOnly", &a.ReadOnly) delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) + case "shareName": + err = unpopulate(val, "ShareName", &a.ShareName) delete(rawMsg, key) case "type": err = unpopulate(val, "Type", &a.Type) @@ -850,409 +659,469 @@ func (a *ApplicationAcceleratorResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ApplicationAcceleratorResourceCollection. -func (a ApplicationAcceleratorResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) +// 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 ApplicationAcceleratorResourceCollection. -func (a *ApplicationAcceleratorResourceCollection) 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 "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) + case "id": + err = unpopulate(val, "ID", &b.ID) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) + 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 ApplicationAcceleratorResourceRequests. -func (a ApplicationAcceleratorResourceRequests) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "cpu", a.CPU) - populate(objectMap, "instanceCount", a.InstanceCount) - populate(objectMap, "memory", a.Memory) +// MarshalJSON implements the json.Marshaller interface for type BindingResourceCollection. +func (b BindingResourceCollection) 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 ApplicationAcceleratorResourceRequests. -func (a *ApplicationAcceleratorResourceRequests) 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 "cpu": - err = unpopulate(val, "CPU", &a.CPU) - delete(rawMsg, key) - case "instanceCount": - err = unpopulate(val, "InstanceCount", &a.InstanceCount) + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) delete(rawMsg, key) - case "memory": - err = unpopulate(val, "Memory", &a.Memory) + 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 ApplicationInsightsAgentVersions. -func (a ApplicationInsightsAgentVersions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "java", a.Java) - return json.Marshal(objectMap) -} - -// 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) - } - for key, val := range rawMsg { - var err error - switch key { - case "java": - err = unpopulate(val, "Java", &a.Java) - 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 ApplicationLiveViewComponent. -func (a ApplicationLiveViewComponent) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "instances", a.Instances) - populate(objectMap, "name", &a.Name) - populate(objectMap, "resourceRequests", a.ResourceRequests) +// 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 ApplicationLiveViewComponent. -func (a *ApplicationLiveViewComponent) 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 "instances": - err = unpopulate(val, "Instances", &a.Instances) + case "bindingParameters": + err = unpopulate(val, "BindingParameters", &b.BindingParameters) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) + case "createdAt": + err = unpopulate(val, "CreatedAt", &b.CreatedAt) delete(rawMsg, key) - case "resourceRequests": - err = unpopulate(val, "ResourceRequests", &a.ResourceRequests) + 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", 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) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", a.Name) - populate(objectMap, "status", a.Status) +// MarshalJSON implements the json.Marshaller interface for type Build. +func (b Build) 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 ApplicationLiveViewInstance. -func (a *ApplicationLiveViewInstance) 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 "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 ApplicationLiveViewProperties. -func (a ApplicationLiveViewProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "components", a.Components) - populate(objectMap, "provisioningState", a.ProvisioningState) +// MarshalJSON implements the json.Marshaller interface for type BuildCollection. +func (b BuildCollection) 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 ApplicationLiveViewProperties. -func (a *ApplicationLiveViewProperties) 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 "components": - err = unpopulate(val, "Components", &a.Components) + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + 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 ApplicationLiveViewResource. -func (a ApplicationLiveViewResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - 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) +// MarshalJSON implements the json.Marshaller interface for type BuildProperties. +func (b BuildProperties) 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) 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 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 "id": - err = unpopulate(val, "ID", &a.ID) + case "agentPool": + err = unpopulate(val, "AgentPool", &b.AgentPool) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) + case "builder": + err = unpopulate(val, "Builder", &b.Builder) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) + case "env": + err = unpopulate(val, "Env", &b.Env) delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) + case "relativePath": + err = unpopulate(val, "RelativePath", &b.RelativePath) + delete(rawMsg, key) + case "resourceRequests": + err = unpopulate(val, "ResourceRequests", &b.ResourceRequests) + 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 ApplicationLiveViewResourceCollection. -func (a ApplicationLiveViewResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) +// 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 ApplicationLiveViewResourceCollection. -func (a *ApplicationLiveViewResourceCollection) UnmarshalJSON(data []byte) error { +// 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", 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 "cpu": + err = unpopulate(val, "CPU", &b.CPU) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) + case "memory": + err = unpopulate(val, "Memory", &b.Memory) 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) { - objectMap := make(map[string]interface{}) - populate(objectMap, "cpu", a.CPU) - populate(objectMap, "instanceCount", a.InstanceCount) - populate(objectMap, "memory", a.Memory) +// 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 ApplicationLiveViewResourceRequests. -func (a *ApplicationLiveViewResourceRequests) 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 "cpu": - err = unpopulate(val, "CPU", &a.CPU) + case "id": + err = unpopulate(val, "ID", &b.ID) delete(rawMsg, key) - case "instanceCount": - err = unpopulate(val, "InstanceCount", &a.InstanceCount) + case "name": + err = unpopulate(val, "Name", &b.Name) delete(rawMsg, key) - case "memory": - err = unpopulate(val, "Memory", &a.Memory) + 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 AvailableOperations. -func (a AvailableOperations) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) +// 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 AvailableOperations. -func (a *AvailableOperations) 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 AvailableRuntimeVersions. -func (a AvailableRuntimeVersions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", a.Value) +// 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 AvailableRuntimeVersions. -func (a *AvailableRuntimeVersions) 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 "value": - err = unpopulate(val, "Value", &a.Value) + 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 AzureFileVolume. -func (a AzureFileVolume) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - 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 { +// 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, "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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { - case "mountOptions": - err = unpopulate(val, "MountOptions", &a.MountOptions) + case "buildPodName": + err = unpopulate(val, "BuildPodName", &b.BuildPodName) delete(rawMsg, key) - case "mountPath": - err = unpopulate(val, "MountPath", &a.MountPath) + case "buildStages": + err = unpopulate(val, "BuildStages", &b.BuildStages) delete(rawMsg, key) - case "readOnly": - err = unpopulate(val, "ReadOnly", &a.ReadOnly) + case "name": + err = unpopulate(val, "Name", &b.Name) delete(rawMsg, key) - case "shareName": - err = unpopulate(val, "ShareName", &a.ShareName) + 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", &a.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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type BindingResource. -func (b BindingResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) +// 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) @@ -1261,8 +1130,8 @@ func (b BindingResource) MarshalJSON() ([]byte, error) { 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 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) @@ -1293,16 +1162,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) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", b.NextLink) - populate(objectMap, "value", b.Value) +// 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 BindingResourceCollection. -func (b *BindingResourceCollection) 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", b, err) @@ -1310,11 +1179,11 @@ func (b *BindingResourceCollection) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &b.NextLink) + case "poolSize": + err = unpopulate(val, "PoolSize", &b.PoolSize) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &b.Value) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) delete(rawMsg, key) } if err != nil { @@ -1324,22 +1193,19 @@ 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]interface{}) - 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) +// 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 BindingResourceProperties. -func (b *BindingResourceProperties) 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", b, err) @@ -1347,29 +1213,51 @@ func (b *BindingResourceProperties) UnmarshalJSON(data []byte) error { 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) + case "id": + err = unpopulate(val, "ID", &b.ID) delete(rawMsg, key) - case "generatedProperties": - err = unpopulate(val, "GeneratedProperties", &b.GeneratedProperties) + case "name": + err = unpopulate(val, "Name", &b.Name) delete(rawMsg, key) - case "key": - err = unpopulate(val, "Key", &b.Key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &b.ResourceID) + case "systemData": + err = unpopulate(val, "SystemData", &b.SystemData) delete(rawMsg, key) - case "resourceName": - err = unpopulate(val, "ResourceName", &b.ResourceName) + case "type": + err = unpopulate(val, "Type", &b.Type) delete(rawMsg, key) - case "resourceType": - err = unpopulate(val, "ResourceType", &b.ResourceType) + } + 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 "updatedAt": - err = unpopulate(val, "UpdatedAt", &b.UpdatedAt) + case "value": + err = unpopulate(val, "Value", &b.Value) delete(rawMsg, key) } if err != nil { @@ -1379,19 +1267,17 @@ func (b *BindingResourceProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type Build. -func (b Build) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", b.ID) +// 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) - 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 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) @@ -1399,21 +1285,15 @@ func (b *Build) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &b.ID) + 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) - 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 +1302,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) { - objectMap := make(map[string]interface{}) +// 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 BuildCollection. -func (b *BuildCollection) 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", b, err) @@ -1453,21 +1333,17 @@ func (b *BuildCollection) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type BuildProperties. -func (b BuildProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "agentPool", b.AgentPool) - populate(objectMap, "builder", b.Builder) - populate(objectMap, "env", b.Env) +// 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, "relativePath", b.RelativePath) populate(objectMap, "resourceRequests", b.ResourceRequests) - 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 { +// 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) @@ -1475,27 +1351,15 @@ func (b *BuildProperties) UnmarshalJSON(data []byte) error { 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) - delete(rawMsg, key) - case "env": - err = unpopulate(val, "Env", &b.Env) + case "kPackVersion": + err = unpopulate(val, "KPackVersion", &b.KPackVersion) 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 "resourceRequests": err = unpopulate(val, "ResourceRequests", &b.ResourceRequests) delete(rawMsg, key) - case "triggeredBuildResult": - err = unpopulate(val, "TriggeredBuildResult", &b.TriggeredBuildResult) - delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", b, err) @@ -1504,16 +1368,16 @@ func (b *BuildProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type BuildResourceRequests. -func (b BuildResourceRequests) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) +// 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 BuildResourceRequests. -func (b *BuildResourceRequests) 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", b, err) @@ -1535,40 +1399,28 @@ func (b *BuildResourceRequests) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type BuildResult. -func (b BuildResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", b.ID) +// 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, "properties", b.Properties) - populate(objectMap, "systemData", b.SystemData) - populate(objectMap, "type", b.Type) + populate(objectMap, "status", b.Status) 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 +// 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 "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) + case "status": + err = unpopulate(val, "Status", &b.Status) delete(rawMsg, key) } if err != nil { @@ -1578,16 +1430,17 @@ func (b *BuildResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type BuildResultCollection. -func (b BuildResultCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", b.NextLink) - populate(objectMap, "value", b.Value) +// 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 BuildResultCollection. -func (b *BuildResultCollection) 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", b, err) @@ -1595,38 +1448,14 @@ func (b *BuildResultCollection) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &b.NextLink) + case "buildpackGroups": + err = unpopulate(val, "BuildpackGroups", &b.BuildpackGroups) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &b.Value) + 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 BuildResultLog. -func (b BuildResultLog) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - 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) + case "stack": + err = unpopulate(val, "Stack", &b.Stack) delete(rawMsg, key) } if err != nil { @@ -1636,19 +1465,19 @@ func (b *BuildResultLog) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type BuildResultProperties. -func (b BuildResultProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "buildPodName", b.BuildPodName) - populate(objectMap, "buildStages", b.BuildStages) - populate(objectMap, "error", b.Error) +// 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, "provisioningState", b.ProvisioningState) + 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 BuildResultProperties. -func (b *BuildResultProperties) 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", b, err) @@ -1656,20 +1485,20 @@ func (b *BuildResultProperties) UnmarshalJSON(data []byte) error { 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) + case "id": + err = unpopulate(val, "ID", &b.ID) delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &b.Name) delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + 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 { @@ -1679,17 +1508,16 @@ func (b *BuildResultProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type BuildResultUserSourceInfo. -func (b BuildResultUserSourceInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "buildResultId", b.BuildResultID) - objectMap["type"] = "BuildResult" - populate(objectMap, "version", b.Version) +// 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 BuildResultUserSourceInfo. -func (b *BuildResultUserSourceInfo) 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", b, err) @@ -1697,14 +1525,11 @@ func (b *BuildResultUserSourceInfo) UnmarshalJSON(data []byte) error { 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) + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &b.Version) + case "value": + err = unpopulate(val, "Value", &b.Value) delete(rawMsg, key) } if err != nil { @@ -1714,19 +1539,16 @@ func (b *BuildResultUserSourceInfo) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type BuildService. -func (b BuildService) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", b.ID) - populate(objectMap, "name", b.Name) +// 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, "systemData", b.SystemData) - populate(objectMap, "type", b.Type) + populate(objectMap, "secrets", b.Secrets) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildService. -func (b *BuildService) 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", b, err) @@ -1734,20 +1556,11 @@ func (b *BuildService) UnmarshalJSON(data []byte) error { 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) + case "secrets": + err = unpopulate(val, "Secrets", &b.Secrets) delete(rawMsg, key) } if err != nil { @@ -1757,16 +1570,17 @@ func (b *BuildService) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolProperties. -func (b BuildServiceAgentPoolProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "poolSize", b.PoolSize) +// 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 BuildServiceAgentPoolProperties. -func (b *BuildServiceAgentPoolProperties) 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", b, err) @@ -1774,8 +1588,11 @@ func (b *BuildServiceAgentPoolProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "poolSize": - err = unpopulate(val, "PoolSize", &b.PoolSize) + 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) @@ -1788,9 +1605,9 @@ func (b *BuildServiceAgentPoolProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolResource. -func (b BuildServiceAgentPoolResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) +// 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) @@ -1799,8 +1616,8 @@ func (b BuildServiceAgentPoolResource) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceAgentPoolResource. -func (b *BuildServiceAgentPoolResource) 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) @@ -1831,82 +1648,16 @@ func (b *BuildServiceAgentPoolResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolResourceCollection. -func (b BuildServiceAgentPoolResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - 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]interface{}) - 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]interface{}) +// 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 BuildServiceCollection. -func (b *BuildServiceCollection) 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) @@ -1924,793 +1675,85 @@ func (b *BuildServiceCollection) UnmarshalJSON(data []byte) error { 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]interface{}) - 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]interface{}) - 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]interface{}) - 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]interface{}) - 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]interface{}) - 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]interface{}) - 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]interface{}) - 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]interface{}) - 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]interface{}) - 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]interface{}) - 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]interface{}) - 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]interface{}) - 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]interface{}) - 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]interface{}) - 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]interface{}) - 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]interface{}) - 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]interface{}) - 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]interface{}) - 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]interface{}) - 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 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 ConfigServerResource. -func (c *ConfigServerResource) 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", c, 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", &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) + err = unpopulate(val, "ID", &b.ID) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ConfigServerSettings. -func (c ConfigServerSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "gitProperty", c.GitProperty) +// 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 ConfigServerSettings. -func (c *ConfigServerSettings) 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", c, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { - case "gitProperty": - err = unpopulate(val, "GitProperty", &c.GitProperty) + 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", c, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ConfigServerSettingsErrorRecord. -func (c ConfigServerSettingsErrorRecord) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "messages", c.Messages) - populate(objectMap, "name", c.Name) - populate(objectMap, "uri", c.URI) +// 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 ConfigServerSettingsErrorRecord. -func (c *ConfigServerSettingsErrorRecord) 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", c, err) @@ -2718,14 +1761,32 @@ func (c *ConfigServerSettingsErrorRecord) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "messages": - err = unpopulate(val, "Messages", &c.Messages) + case "activateDate": + err = unpopulate(val, "ActivateDate", &c.ActivateDate) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) + case "dnsNames": + err = unpopulate(val, "DNSNames", &c.DNSNames) delete(rawMsg, key) - case "uri": - err = unpopulate(val, "URI", &c.URI) + 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 { @@ -2735,16 +1796,19 @@ func (c *ConfigServerSettingsErrorRecord) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ConfigServerSettingsValidateResult. -func (c ConfigServerSettingsValidateResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "details", c.Details) - populate(objectMap, "isValid", c.IsValid) +// 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 ConfigServerSettingsValidateResult. -func (c *ConfigServerSettingsValidateResult) 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", c, err) @@ -2752,11 +1816,20 @@ func (c *ConfigServerSettingsValidateResult) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "details": - err = unpopulate(val, "Details", &c.Details) + case "id": + err = unpopulate(val, "ID", &c.ID) delete(rawMsg, key) - case "isValid": - err = unpopulate(val, "IsValid", &c.IsValid) + 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 { @@ -2766,15 +1839,16 @@ func (c *ConfigServerSettingsValidateResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceGitProperty. -func (c ConfigurationServiceGitProperty) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "repositories", c.Repositories) +// 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 ConfigurationServiceGitProperty. -func (c *ConfigurationServiceGitProperty) 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", c, err) @@ -2782,8 +1856,11 @@ func (c *ConfigurationServiceGitProperty) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "repositories": - err = unpopulate(val, "Repositories", &c.Repositories) + 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 { @@ -2793,16 +1870,22 @@ func (c *ConfigurationServiceGitProperty) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceGitPropertyValidateResult. -func (c ConfigurationServiceGitPropertyValidateResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "gitReposValidationResult", c.GitReposValidationResult) - populate(objectMap, "isValid", c.IsValid) +// 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, "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 ConfigurationServiceGitPropertyValidateResult. -func (c *ConfigurationServiceGitPropertyValidateResult) 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) @@ -2810,11 +1893,29 @@ func (c *ConfigurationServiceGitPropertyValidateResult) UnmarshalJSON(data []byt for key, val := range rawMsg { var err error switch key { - case "gitReposValidationResult": - err = unpopulate(val, "GitReposValidationResult", &c.GitReposValidationResult) + case "fqdn": + err = unpopulate(val, "Fqdn", &c.Fqdn) delete(rawMsg, key) - case "isValid": - err = unpopulate(val, "IsValid", &c.IsValid) + 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 { @@ -2824,16 +1925,15 @@ func (c *ConfigurationServiceGitPropertyValidateResult) UnmarshalJSON(data []byt return nil } -// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceGitRepository. -func (c ConfigurationServiceGitRepository) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) +// 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, "name", c.Name) populate(objectMap, "password", c.Password) - populate(objectMap, "patterns", c.Patterns) 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) @@ -2841,8 +1941,8 @@ func (c ConfigurationServiceGitRepository) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceGitRepository. -func (c *ConfigurationServiceGitRepository) 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", c, err) @@ -2859,18 +1959,15 @@ func (c *ConfigurationServiceGitRepository) UnmarshalJSON(data []byte) error { 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 "repositories": + err = unpopulate(val, "Repositories", &c.Repositories) + delete(rawMsg, key) case "searchPaths": err = unpopulate(val, "SearchPaths", &c.SearchPaths) delete(rawMsg, key) @@ -2891,49 +1988,17 @@ func (c *ConfigurationServiceGitRepository) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceInstance. -func (c ConfigurationServiceInstance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - 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]interface{}) - populate(objectMap, "instances", c.Instances) +// 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) - 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 { +// 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) @@ -2941,18 +2006,15 @@ func (c *ConfigurationServiceProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "instances": - err = unpopulate(val, "Instances", &c.Instances) + 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) - 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) @@ -2961,9 +2023,9 @@ func (c *ConfigurationServiceProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceResource. -func (c ConfigurationServiceResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) +// 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) @@ -2972,8 +2034,8 @@ func (c ConfigurationServiceResource) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceResource. -func (c *ConfigurationServiceResource) 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", c, err) @@ -3004,16 +2066,15 @@ func (c *ConfigurationServiceResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceResourceCollection. -func (c ConfigurationServiceResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", c.NextLink) - populate(objectMap, "value", c.Value) +// 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 ConfigurationServiceResourceCollection. -func (c *ConfigurationServiceResourceCollection) 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", c, err) @@ -3021,11 +2082,8 @@ func (c *ConfigurationServiceResourceCollection) 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) + case "gitProperty": + err = unpopulate(val, "GitProperty", &c.GitProperty) delete(rawMsg, key) } if err != nil { @@ -3035,17 +2093,17 @@ func (c *ConfigurationServiceResourceCollection) UnmarshalJSON(data []byte) erro return nil } -// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceResourceRequests. -func (c ConfigurationServiceResourceRequests) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "cpu", c.CPU) - populate(objectMap, "instanceCount", c.InstanceCount) - populate(objectMap, "memory", c.Memory) +// 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 ConfigurationServiceResourceRequests. -func (c *ConfigurationServiceResourceRequests) 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", c, err) @@ -3053,14 +2111,14 @@ func (c *ConfigurationServiceResourceRequests) UnmarshalJSON(data []byte) error for key, val := range rawMsg { var err error switch key { - case "cpu": - err = unpopulate(val, "CPU", &c.CPU) + case "messages": + err = unpopulate(val, "Messages", &c.Messages) delete(rawMsg, key) - case "instanceCount": - err = unpopulate(val, "InstanceCount", &c.InstanceCount) + case "name": + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) - case "memory": - err = unpopulate(val, "Memory", &c.Memory) + case "uri": + err = unpopulate(val, "URI", &c.URI) delete(rawMsg, key) } if err != nil { @@ -3070,15 +2128,16 @@ func (c *ConfigurationServiceResourceRequests) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceSettings. -func (c ConfigurationServiceSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "gitProperty", c.GitProperty) +// 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 ConfigurationServiceSettings. -func (c *ConfigurationServiceSettings) 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", c, err) @@ -3086,8 +2145,11 @@ func (c *ConfigurationServiceSettings) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "gitProperty": - err = unpopulate(val, "GitProperty", &c.GitProperty) + 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 { @@ -3097,15 +2159,15 @@ func (c *ConfigurationServiceSettings) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceSettingsValidateResult. -func (c ConfigurationServiceSettingsValidateResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "gitPropertyValidationResult", c.GitPropertyValidationResult) +// 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 ConfigurationServiceSettingsValidateResult. -func (c *ConfigurationServiceSettingsValidateResult) 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", c, err) @@ -3113,8 +2175,8 @@ func (c *ConfigurationServiceSettingsValidateResult) UnmarshalJSON(data []byte) for key, val := range rawMsg { var err error switch key { - case "gitPropertyValidationResult": - err = unpopulate(val, "GitPropertyValidationResult", &c.GitPropertyValidationResult) + case "repositories": + err = unpopulate(val, "Repositories", &c.Repositories) delete(rawMsg, key) } if err != nil { @@ -3124,15 +2186,16 @@ func (c *ConfigurationServiceSettingsValidateResult) UnmarshalJSON(data []byte) return nil } -// MarshalJSON implements the json.Marshaller interface for type ContainerProbeSettings. -func (c ContainerProbeSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "disableProbe", c.DisableProbe) +// 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 ContainerProbeSettings. -func (c *ContainerProbeSettings) 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", c, err) @@ -3140,8 +2203,11 @@ func (c *ContainerProbeSettings) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "disableProbe": - err = unpopulate(val, "DisableProbe", &c.DisableProbe) + 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 { @@ -3151,24 +2217,25 @@ func (c *ContainerProbeSettings) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ContentCertificateProperties. -func (c ContentCertificateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - 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" +// 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 ContentCertificateProperties. -func (c *ContentCertificateProperties) 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", c, err) @@ -3176,82 +2243,38 @@ func (c *ContentCertificateProperties) UnmarshalJSON(data []byte) error { 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) + case "hostKey": + err = unpopulate(val, "HostKey", &c.HostKey) delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + case "hostKeyAlgorithm": + err = unpopulate(val, "HostKeyAlgorithm", &c.HostKeyAlgorithm) delete(rawMsg, key) - case "subjectName": - err = unpopulate(val, "SubjectName", &c.SubjectName) + case "label": + err = unpopulate(val, "Label", &c.Label) delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &c.Thumbprint) + case "name": + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) + case "password": + err = unpopulate(val, "Password", &c.Password) 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]interface{}) - 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) + case "patterns": + err = unpopulate(val, "Patterns", &c.Patterns) delete(rawMsg, key) - case "command": - err = unpopulate(val, "Command", &c.Command) + case "privateKey": + err = unpopulate(val, "PrivateKey", &c.PrivateKey) delete(rawMsg, key) - case "containerImage": - err = unpopulate(val, "ContainerImage", &c.ContainerImage) + case "searchPaths": + err = unpopulate(val, "SearchPaths", &c.SearchPaths) delete(rawMsg, key) - case "imageRegistryCredential": - err = unpopulate(val, "ImageRegistryCredential", &c.ImageRegistryCredential) + case "strictHostKeyChecking": + err = unpopulate(val, "StrictHostKeyChecking", &c.StrictHostKeyChecking) delete(rawMsg, key) - case "languageFramework": - err = unpopulate(val, "LanguageFramework", &c.LanguageFramework) + case "uri": + err = unpopulate(val, "URI", &c.URI) delete(rawMsg, key) - case "server": - err = unpopulate(val, "Server", &c.Server) + case "username": + err = unpopulate(val, "Username", &c.Username) delete(rawMsg, key) } if err != nil { @@ -3261,17 +2284,16 @@ func (c *CustomContainer) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CustomContainerUserSourceInfo. -func (c CustomContainerUserSourceInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "customContainer", c.CustomContainer) - objectMap["type"] = "Container" - populate(objectMap, "version", c.Version) +// 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 CustomContainerUserSourceInfo. -func (c *CustomContainerUserSourceInfo) 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", c, err) @@ -3279,14 +2301,11 @@ func (c *CustomContainerUserSourceInfo) UnmarshalJSON(data []byte) error { 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) + case "name": + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &c.Version) + case "status": + err = unpopulate(val, "Status", &c.Status) delete(rawMsg, key) } if err != nil { @@ -3296,18 +2315,18 @@ func (c *CustomContainerUserSourceInfo) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CustomDomainProperties. -func (c CustomDomainProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appName", c.AppName) - populate(objectMap, "certName", c.CertName) +// 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, "thumbprint", c.Thumbprint) + populate(objectMap, "resourceRequests", c.ResourceRequests) + populate(objectMap, "settings", c.Settings) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainProperties. -func (c *CustomDomainProperties) 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", c, err) @@ -3315,17 +2334,17 @@ func (c *CustomDomainProperties) UnmarshalJSON(data []byte) error { 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) + case "instances": + err = unpopulate(val, "Instances", &c.Instances) delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &c.Thumbprint) + 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 { @@ -3335,9 +2354,9 @@ func (c *CustomDomainProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CustomDomainResource. -func (c CustomDomainResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) +// 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) @@ -3346,8 +2365,8 @@ func (c CustomDomainResource) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainResource. -func (c *CustomDomainResource) 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", c, err) @@ -3378,16 +2397,16 @@ func (c *CustomDomainResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CustomDomainResourceCollection. -func (c CustomDomainResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) +// 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 CustomDomainResourceCollection. -func (c *CustomDomainResourceCollection) 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", c, err) @@ -3409,15 +2428,17 @@ func (c *CustomDomainResourceCollection) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CustomDomainValidatePayload. -func (c CustomDomainValidatePayload) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", c.Name) +// 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 CustomDomainValidatePayload. -func (c *CustomDomainValidatePayload) 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", c, err) @@ -3425,8 +2446,14 @@ func (c *CustomDomainValidatePayload) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "name": - err = unpopulate(val, "Name", &c.Name) + 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 { @@ -3436,16 +2463,15 @@ func (c *CustomDomainValidatePayload) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CustomDomainValidateResult. -func (c CustomDomainValidateResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "isValid", c.IsValid) - populate(objectMap, "message", c.Message) +// 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 CustomDomainValidateResult. -func (c *CustomDomainValidateResult) 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", c, err) @@ -3453,11 +2479,8 @@ func (c *CustomDomainValidateResult) UnmarshalJSON(data []byte) error { 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) + case "gitProperty": + err = unpopulate(val, "GitProperty", &c.GitProperty) delete(rawMsg, key) } if err != nil { @@ -3467,18 +2490,15 @@ func (c *CustomDomainValidateResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CustomPersistentDiskProperties. -func (c CustomPersistentDiskProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "mountOptions", c.MountOptions) - populate(objectMap, "mountPath", c.MountPath) - populate(objectMap, "readOnly", c.ReadOnly) - objectMap["type"] = c.Type +// 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 CustomPersistentDiskProperties. -func (c *CustomPersistentDiskProperties) 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", c, err) @@ -3486,17 +2506,8 @@ func (c *CustomPersistentDiskProperties) UnmarshalJSON(data []byte) error { 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) + case "gitPropertyValidationResult": + err = unpopulate(val, "GitPropertyValidationResult", &c.GitPropertyValidationResult) delete(rawMsg, key) } if err != nil { @@ -3506,16 +2517,15 @@ func (c *CustomPersistentDiskProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CustomPersistentDiskResource. -func (c CustomPersistentDiskResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "customPersistentDiskProperties", c.CustomPersistentDiskProperties) - populate(objectMap, "storageId", c.StorageID) +// 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 CustomPersistentDiskResource. -func (c *CustomPersistentDiskResource) UnmarshalJSON(data []byte) error { +// 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) @@ -3523,11 +2533,8 @@ func (c *CustomPersistentDiskResource) UnmarshalJSON(data []byte) error { 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) + case "disableProbe": + err = unpopulate(val, "DisableProbe", &c.DisableProbe) delete(rawMsg, key) } if err != nil { @@ -3537,20 +2544,24 @@ func (c *CustomPersistentDiskResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CustomizedAcceleratorProperties. -func (c CustomizedAcceleratorProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - 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) +// 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 CustomizedAcceleratorProperties. -func (c *CustomizedAcceleratorProperties) 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", c, err) @@ -3558,67 +2569,32 @@ func (c *CustomizedAcceleratorProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "acceleratorTags": - err = unpopulate(val, "AcceleratorTags", &c.AcceleratorTags) + case "activateDate": + err = unpopulate(val, "ActivateDate", &c.ActivateDate) delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &c.Description) + case "content": + err = unpopulate(val, "Content", &c.Content) delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &c.DisplayName) + case "dnsNames": + err = unpopulate(val, "DNSNames", &c.DNSNames) + delete(rawMsg, key) + case "expirationDate": + err = unpopulate(val, "ExpirationDate", &c.ExpirationDate) delete(rawMsg, key) - case "gitRepository": - err = unpopulate(val, "GitRepository", &c.GitRepository) + case "issuedDate": + err = unpopulate(val, "IssuedDate", &c.IssuedDate) delete(rawMsg, key) - case "iconUrl": - err = unpopulate(val, "IconURL", &c.IconURL) + case "issuer": + err = unpopulate(val, "Issuer", &c.Issuer) 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]interface{}) - 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) + case "subjectName": + err = unpopulate(val, "SubjectName", &c.SubjectName) delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &c.SystemData) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &c.Thumbprint) delete(rawMsg, key) case "type": err = unpopulate(val, "Type", &c.Type) @@ -3631,16 +2607,20 @@ func (c *CustomizedAcceleratorResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CustomizedAcceleratorResourceCollection. -func (c CustomizedAcceleratorResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", c.NextLink) - populate(objectMap, "value", c.Value) +// 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 CustomizedAcceleratorResourceCollection. -func (c *CustomizedAcceleratorResourceCollection) UnmarshalJSON(data []byte) error { +// 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) @@ -3648,377 +2628,322 @@ func (c *CustomizedAcceleratorResourceCollection) UnmarshalJSON(data []byte) err for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &c.NextLink) + case "args": + err = unpopulate(val, "Args", &c.Args) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &c.Value) + case "command": + err = unpopulate(val, "Command", &c.Command) 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]interface{}) - 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) + 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 "state": - err = unpopulate(val, "State", &c.State) + 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 DeploymentInstance. -func (d DeploymentInstance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - 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 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 DeploymentInstance. -func (d *DeploymentInstance) UnmarshalJSON(data []byte) error { +// 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", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, 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) + case "customContainer": + err = unpopulate(val, "CustomContainer", &c.CustomContainer) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &d.Status) + case "type": + err = unpopulate(val, "Type", &c.Type) delete(rawMsg, key) - case "zone": - err = unpopulate(val, "Zone", &d.Zone) + case "version": + err = unpopulate(val, "Version", &c.Version) 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 DeploymentList. -func (d DeploymentList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "deployments", d.Deployments) +// 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 DeploymentList. -func (d *DeploymentList) 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", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "deployments": - err = unpopulate(val, "Deployments", &d.Deployments) + 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", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DeploymentResource. -func (d DeploymentResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - 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) +// 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 DeploymentResource. -func (d *DeploymentResource) 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", 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) + err = unpopulate(val, "ID", &c.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &d.Name) + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &d.SKU) + err = unpopulate(val, "Properties", &c.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &d.SystemData) + err = unpopulate(val, "SystemData", &c.SystemData) 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 DeploymentResourceCollection. -func (d DeploymentResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", d.NextLink) - populate(objectMap, "value", d.Value) +// 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 DeploymentResourceCollection. -func (d *DeploymentResourceCollection) 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", 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) + err = unpopulate(val, "NextLink", &c.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &d.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 DeploymentResourceProperties. -func (d DeploymentResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - 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) +// 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 DeploymentResourceProperties. -func (d *DeploymentResourceProperties) 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", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, 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) + 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 DeploymentSettings. -func (d DeploymentSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - 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) +// 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 DeploymentSettings. -func (d *DeploymentSettings) 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", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, 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) + case "isValid": + err = unpopulate(val, "IsValid", &c.IsValid) delete(rawMsg, key) - case "terminationGracePeriodSeconds": - err = unpopulate(val, "TerminationGracePeriodSeconds", &d.TerminationGracePeriodSeconds) + case "message": + err = unpopulate(val, "Message", &c.Message) 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 DevToolPortalFeatureDetail. -func (d DevToolPortalFeatureDetail) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "route", d.Route) - populate(objectMap, "state", d.State) +// 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 DevToolPortalFeatureDetail. -func (d *DevToolPortalFeatureDetail) UnmarshalJSON(data []byte) error { +// 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", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "route": - err = unpopulate(val, "Route", &d.Route) + 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 "state": - err = unpopulate(val, "State", &d.State) + 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 DevToolPortalFeatureSettings. -func (d DevToolPortalFeatureSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "applicationAccelerator", d.ApplicationAccelerator) - populate(objectMap, "applicationLiveView", d.ApplicationLiveView) +// 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 DevToolPortalFeatureSettings. -func (d *DevToolPortalFeatureSettings) UnmarshalJSON(data []byte) error { +// 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", 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 "customPersistentDiskProperties": + c.CustomPersistentDiskProperties, err = unmarshalCustomPersistentDiskPropertiesClassification(val) delete(rawMsg, key) - case "applicationLiveView": - err = unpopulate(val, "ApplicationLiveView", &d.ApplicationLiveView) + case "storageId": + err = unpopulate(val, "StorageID", &c.StorageID) 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) { - objectMap := make(map[string]interface{}) +// 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 DevToolPortalInstance. -func (d *DevToolPortalInstance) 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", d, err) @@ -4026,12 +2951,24 @@ func (d *DevToolPortalInstance) UnmarshalJSON(data []byte) error { 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) @@ -4040,21 +2977,15 @@ func (d *DevToolPortalInstance) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DevToolPortalProperties. -func (d DevToolPortalProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - 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) +// 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 DevToolPortalProperties. -func (d *DevToolPortalProperties) UnmarshalJSON(data []byte) error { +// 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) @@ -4062,26 +2993,8 @@ func (d *DevToolPortalProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "features": - err = unpopulate(val, "Features", &d.Features) - 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 "public": - err = unpopulate(val, "Public", &d.Public) - delete(rawMsg, key) - case "resourceRequests": - err = unpopulate(val, "ResourceRequests", &d.ResourceRequests) - delete(rawMsg, key) - case "ssoProperties": - err = unpopulate(val, "SsoProperties", &d.SsoProperties) - delete(rawMsg, key) - case "url": - err = unpopulate(val, "URL", &d.URL) + case "deployments": + err = unpopulate(val, "Deployments", &d.Deployments) delete(rawMsg, key) } if err != nil { @@ -4091,19 +3004,20 @@ func (d *DevToolPortalProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DevToolPortalResource. -func (d DevToolPortalResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) +// 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 DevToolPortalResource. -func (d *DevToolPortalResource) 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", d, err) @@ -4120,6 +3034,9 @@ func (d *DevToolPortalResource) UnmarshalJSON(data []byte) error { 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) @@ -4134,16 +3051,16 @@ func (d *DevToolPortalResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DevToolPortalResourceCollection. -func (d DevToolPortalResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) +// 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 DevToolPortalResourceCollection. -func (d *DevToolPortalResourceCollection) 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", d, err) @@ -4165,17 +3082,20 @@ func (d *DevToolPortalResourceCollection) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DevToolPortalResourceRequests. -func (d DevToolPortalResourceRequests) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "cpu", d.CPU) - populate(objectMap, "instanceCount", d.InstanceCount) - populate(objectMap, "memory", d.Memory) +// 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 DevToolPortalResourceRequests. -func (d *DevToolPortalResourceRequests) 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", d, err) @@ -4183,14 +3103,23 @@ func (d *DevToolPortalResourceRequests) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "cpu": - err = unpopulate(val, "CPU", &d.CPU) + case "active": + err = unpopulate(val, "Active", &d.Active) delete(rawMsg, key) - case "instanceCount": - err = unpopulate(val, "InstanceCount", &d.InstanceCount) + case "deploymentSettings": + err = unpopulate(val, "DeploymentSettings", &d.DeploymentSettings) delete(rawMsg, key) - case "memory": - err = unpopulate(val, "Memory", &d.Memory) + 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 { @@ -4200,18 +3129,22 @@ func (d *DevToolPortalResourceRequests) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DevToolPortalSsoProperties. -func (d DevToolPortalSsoProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "clientId", d.ClientID) - populate(objectMap, "clientSecret", d.ClientSecret) - populate(objectMap, "metadataUrl", d.MetadataURL) - populate(objectMap, "scopes", d.Scopes) +// 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 DevToolPortalSsoProperties. -func (d *DevToolPortalSsoProperties) 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", d, err) @@ -4219,17 +3152,29 @@ func (d *DevToolPortalSsoProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "clientId": - err = unpopulate(val, "ClientID", &d.ClientID) + case "addonConfigs": + err = unpopulate(val, "AddonConfigs", &d.AddonConfigs) delete(rawMsg, key) - case "clientSecret": - err = unpopulate(val, "ClientSecret", &d.ClientSecret) + case "containerProbeSettings": + err = unpopulate(val, "ContainerProbeSettings", &d.ContainerProbeSettings) + delete(rawMsg, key) + case "environmentVariables": + err = unpopulate(val, "EnvironmentVariables", &d.EnvironmentVariables) delete(rawMsg, key) - case "metadataUrl": - err = unpopulate(val, "MetadataURL", &d.MetadataURL) + 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 "scopes": - err = unpopulate(val, "Scopes", &d.Scopes) + 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 { @@ -4241,7 +3186,7 @@ func (d *DevToolPortalSsoProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DiagnosticParameters. func (d DiagnosticParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "appInstance", d.AppInstance) populate(objectMap, "duration", d.Duration) populate(objectMap, "filePath", d.FilePath) @@ -4276,7 +3221,7 @@ func (d *DiagnosticParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Error. func (e Error) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "code", e.Code) populate(objectMap, "message", e.Message) return json.Marshal(objectMap) @@ -4307,7 +3252,7 @@ func (e *Error) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExecAction. func (e ExecAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "command", e.Command) objectMap["type"] = ProbeActionTypeExecAction return json.Marshal(objectMap) @@ -4338,7 +3283,7 @@ func (e *ExecAction) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayAPIMetadataProperties. func (g GatewayAPIMetadataProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", g.Description) populate(objectMap, "documentation", g.Documentation) populate(objectMap, "serverUrl", g.ServerURL) @@ -4381,7 +3326,7 @@ func (g *GatewayAPIMetadataProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayAPIRoute. func (g GatewayAPIRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", g.Description) populate(objectMap, "filters", g.Filters) populate(objectMap, "order", g.Order) @@ -4440,7 +3385,7 @@ func (g *GatewayAPIRoute) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayCorsProperties. func (g GatewayCorsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "allowCredentials", g.AllowCredentials) populate(objectMap, "allowedHeaders", g.AllowedHeaders) populate(objectMap, "allowedMethods", g.AllowedMethods) @@ -4487,7 +3432,7 @@ func (g *GatewayCorsProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayCustomDomainProperties. func (g GatewayCustomDomainProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "thumbprint", g.Thumbprint) return json.Marshal(objectMap) } @@ -4514,7 +3459,7 @@ func (g *GatewayCustomDomainProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayCustomDomainResource. func (g GatewayCustomDomainResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", g.ID) populate(objectMap, "name", g.Name) populate(objectMap, "properties", g.Properties) @@ -4557,7 +3502,7 @@ func (g *GatewayCustomDomainResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayCustomDomainResourceCollection. func (g GatewayCustomDomainResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", g.NextLink) populate(objectMap, "value", g.Value) return json.Marshal(objectMap) @@ -4588,7 +3533,7 @@ func (g *GatewayCustomDomainResourceCollection) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type GatewayInstance. func (g GatewayInstance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", g.Name) populate(objectMap, "status", g.Status) return json.Marshal(objectMap) @@ -4619,7 +3564,7 @@ func (g *GatewayInstance) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayOperatorProperties. func (g GatewayOperatorProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "instances", g.Instances) populate(objectMap, "resourceRequests", g.ResourceRequests) return json.Marshal(objectMap) @@ -4650,7 +3595,7 @@ func (g *GatewayOperatorProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayOperatorResourceRequests. func (g GatewayOperatorResourceRequests) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cpu", g.CPU) populate(objectMap, "instanceCount", g.InstanceCount) populate(objectMap, "memory", g.Memory) @@ -4685,11 +3630,9 @@ func (g *GatewayOperatorResourceRequests) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayProperties. func (g GatewayProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + 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) @@ -4713,15 +3656,9 @@ func (g *GatewayProperties) UnmarshalJSON(data []byte) error { 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) - delete(rawMsg, key) case "httpsOnly": err = unpopulate(val, "HTTPSOnly", &g.HTTPSOnly) delete(rawMsg, key) @@ -4754,40 +3691,9 @@ func (g *GatewayProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type GatewayPropertiesEnvironmentVariables. -func (g GatewayPropertiesEnvironmentVariables) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", g.Properties) - populate(objectMap, "secrets", g.Secrets) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayPropertiesEnvironmentVariables. -func (g *GatewayPropertiesEnvironmentVariables) UnmarshalJSON(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 "properties": - err = unpopulate(val, "Properties", &g.Properties) - delete(rawMsg, key) - case "secrets": - err = unpopulate(val, "Secrets", &g.Secrets) - 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 GatewayResource. func (g GatewayResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", g.ID) populate(objectMap, "name", g.Name) populate(objectMap, "properties", g.Properties) @@ -4834,7 +3740,7 @@ func (g *GatewayResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayResourceCollection. func (g GatewayResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", g.NextLink) populate(objectMap, "value", g.Value) return json.Marshal(objectMap) @@ -4865,7 +3771,7 @@ func (g *GatewayResourceCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayResourceRequests. func (g GatewayResourceRequests) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cpu", g.CPU) populate(objectMap, "memory", g.Memory) return json.Marshal(objectMap) @@ -4896,7 +3802,7 @@ func (g *GatewayResourceRequests) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayRouteConfigOpenAPIProperties. func (g GatewayRouteConfigOpenAPIProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "uri", g.URI) return json.Marshal(objectMap) } @@ -4923,15 +3829,12 @@ func (g *GatewayRouteConfigOpenAPIProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayRouteConfigProperties. func (g GatewayRouteConfigProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + 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) return json.Marshal(objectMap) } @@ -4947,15 +3850,9 @@ func (g *GatewayRouteConfigProperties) UnmarshalJSON(data []byte) error { 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) delete(rawMsg, key) - case "predicates": - err = unpopulate(val, "Predicates", &g.Predicates) - delete(rawMsg, key) case "protocol": err = unpopulate(val, "Protocol", &g.Protocol) delete(rawMsg, key) @@ -4965,9 +3862,6 @@ func (g *GatewayRouteConfigProperties) UnmarshalJSON(data []byte) error { case "routes": err = unpopulate(val, "Routes", &g.Routes) delete(rawMsg, key) - case "ssoEnabled": - err = unpopulate(val, "SsoEnabled", &g.SsoEnabled) - delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", g, err) @@ -4978,7 +3872,7 @@ func (g *GatewayRouteConfigProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayRouteConfigResource. func (g GatewayRouteConfigResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", g.ID) populate(objectMap, "name", g.Name) populate(objectMap, "properties", g.Properties) @@ -5021,7 +3915,7 @@ func (g *GatewayRouteConfigResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayRouteConfigResourceCollection. func (g GatewayRouteConfigResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", g.NextLink) populate(objectMap, "value", g.Value) return json.Marshal(objectMap) @@ -5052,7 +3946,7 @@ func (g *GatewayRouteConfigResourceCollection) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type GitPatternRepository. func (g GitPatternRepository) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "hostKey", g.HostKey) populate(objectMap, "hostKeyAlgorithm", g.HostKeyAlgorithm) populate(objectMap, "label", g.Label) @@ -5119,7 +4013,7 @@ func (g *GitPatternRepository) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type HTTPGetAction. func (h HTTPGetAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "path", h.Path) populate(objectMap, "scheme", h.Scheme) objectMap["type"] = ProbeActionTypeHTTPGetAction @@ -5154,7 +4048,7 @@ func (h *HTTPGetAction) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ImageRegistryCredential. func (i ImageRegistryCredential) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "password", i.Password) populate(objectMap, "username", i.Username) return json.Marshal(objectMap) @@ -5185,7 +4079,7 @@ func (i *ImageRegistryCredential) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IngressConfig. func (i IngressConfig) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "readTimeoutInSeconds", i.ReadTimeoutInSeconds) return json.Marshal(objectMap) } @@ -5212,7 +4106,7 @@ func (i *IngressConfig) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IngressSettings. func (i IngressSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "backendProtocol", i.BackendProtocol) populate(objectMap, "clientAuth", i.ClientAuth) populate(objectMap, "readTimeoutInSeconds", i.ReadTimeoutInSeconds) @@ -5259,7 +4153,7 @@ func (i *IngressSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IngressSettingsClientAuth. func (i IngressSettingsClientAuth) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "certificates", i.Certificates) return json.Marshal(objectMap) } @@ -5286,7 +4180,7 @@ func (i *IngressSettingsClientAuth) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type JarUploadedUserSourceInfo. func (j JarUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "jvmOptions", j.JvmOptions) populate(objectMap, "relativePath", j.RelativePath) populate(objectMap, "runtimeVersion", j.RuntimeVersion) @@ -5329,7 +4223,7 @@ func (j *JarUploadedUserSourceInfo) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type KeyVaultCertificateProperties. func (k KeyVaultCertificateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "activateDate", k.ActivateDate) populate(objectMap, "certVersion", k.CertVersion) populate(objectMap, "dnsNames", k.DNSNames) @@ -5404,7 +4298,7 @@ func (k *KeyVaultCertificateProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LoadedCertificate. func (l LoadedCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "loadTrustStore", l.LoadTrustStore) populate(objectMap, "resourceId", l.ResourceID) return json.Marshal(objectMap) @@ -5435,7 +4329,7 @@ func (l *LoadedCertificate) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LogFileURLResponse. func (l LogFileURLResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "url", l.URL) return json.Marshal(objectMap) } @@ -5462,7 +4356,7 @@ func (l *LogFileURLResponse) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LogSpecification. func (l LogSpecification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "blobDuration", l.BlobDuration) populate(objectMap, "displayName", l.DisplayName) populate(objectMap, "name", l.Name) @@ -5497,7 +4391,7 @@ func (l *LogSpecification) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagedIdentityProperties. func (m ManagedIdentityProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "principalId", m.PrincipalID) populate(objectMap, "tenantId", m.TenantID) populate(objectMap, "type", m.Type) @@ -5534,44 +4428,9 @@ func (m *ManagedIdentityProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MarketplaceResource. -func (m MarketplaceResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - 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) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type MetricDimension. func (m MetricDimension) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "displayName", m.DisplayName) populate(objectMap, "name", m.Name) populate(objectMap, "toBeExportedForShoebox", m.ToBeExportedForShoebox) @@ -5606,7 +4465,7 @@ func (m *MetricDimension) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type MetricSpecification. func (m MetricSpecification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "aggregationType", m.AggregationType) populate(objectMap, "category", m.Category) populate(objectMap, "dimensions", m.Dimensions) @@ -5673,7 +4532,7 @@ func (m *MetricSpecification) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type MonitoringSettingProperties. func (m MonitoringSettingProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "appInsightsAgentVersions", m.AppInsightsAgentVersions) populate(objectMap, "appInsightsInstrumentationKey", m.AppInsightsInstrumentationKey) populate(objectMap, "appInsightsSamplingRate", m.AppInsightsSamplingRate) @@ -5720,7 +4579,7 @@ func (m *MonitoringSettingProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type MonitoringSettingResource. func (m MonitoringSettingResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", m.ID) populate(objectMap, "name", m.Name) populate(objectMap, "properties", m.Properties) @@ -5763,7 +4622,7 @@ func (m *MonitoringSettingResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NameAvailability. func (n NameAvailability) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "message", n.Message) populate(objectMap, "nameAvailable", n.NameAvailable) populate(objectMap, "reason", n.Reason) @@ -5798,7 +4657,7 @@ func (n *NameAvailability) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NameAvailabilityParameters. func (n NameAvailabilityParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", n.Name) populate(objectMap, "type", n.Type) return json.Marshal(objectMap) @@ -5829,7 +4688,7 @@ func (n *NameAvailabilityParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NetCoreZipUploadedUserSourceInfo. func (n NetCoreZipUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "netCoreMainEntryPath", n.NetCoreMainEntryPath) populate(objectMap, "relativePath", n.RelativePath) populate(objectMap, "runtimeVersion", n.RuntimeVersion) @@ -5872,7 +4731,7 @@ func (n *NetCoreZipUploadedUserSourceInfo) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NetworkProfile. func (n NetworkProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "appNetworkResourceGroup", n.AppNetworkResourceGroup) populate(objectMap, "appSubnetId", n.AppSubnetID) populate(objectMap, "ingressConfig", n.IngressConfig) @@ -5931,7 +4790,7 @@ func (n *NetworkProfile) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NetworkProfileOutboundIPs. func (n NetworkProfileOutboundIPs) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "publicIPs", n.PublicIPs) return json.Marshal(objectMap) } @@ -5958,7 +4817,7 @@ func (n *NetworkProfileOutboundIPs) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OperationDetail. func (o OperationDetail) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "actionType", o.ActionType) populate(objectMap, "display", o.Display) populate(objectMap, "isDataAction", o.IsDataAction) @@ -6005,7 +4864,7 @@ func (o *OperationDetail) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OperationDisplay. func (o OperationDisplay) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", o.Description) populate(objectMap, "operation", o.Operation) populate(objectMap, "provider", o.Provider) @@ -6044,7 +4903,7 @@ func (o *OperationDisplay) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OperationProperties. func (o OperationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "serviceSpecification", o.ServiceSpecification) return json.Marshal(objectMap) } @@ -6071,7 +4930,7 @@ func (o *OperationProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PersistentDisk. func (p PersistentDisk) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "mountPath", p.MountPath) populate(objectMap, "sizeInGB", p.SizeInGB) populate(objectMap, "usedInGB", p.UsedInGB) @@ -6104,134 +4963,9 @@ func (p *PersistentDisk) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type PredefinedAcceleratorProperties. -func (p PredefinedAcceleratorProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - 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]interface{}) - 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]interface{}) - 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]interface{}) + objectMap := make(map[string]any) populate(objectMap, "disableProbe", p.DisableProbe) populate(objectMap, "failureThreshold", p.FailureThreshold) populate(objectMap, "initialDelaySeconds", p.InitialDelaySeconds) @@ -6282,7 +5016,7 @@ func (p *Probe) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ProbeAction. func (p ProbeAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["type"] = p.Type return json.Marshal(objectMap) } @@ -6309,7 +5043,7 @@ func (p *ProbeAction) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ProxyResource. func (p ProxyResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", p.ID) populate(objectMap, "name", p.Name) populate(objectMap, "systemData", p.SystemData) @@ -6348,7 +5082,7 @@ func (p *ProxyResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RegenerateTestKeyRequestPayload. func (r RegenerateTestKeyRequestPayload) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "keyType", r.KeyType) return json.Marshal(objectMap) } @@ -6375,7 +5109,7 @@ func (r *RegenerateTestKeyRequestPayload) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RemoteDebugging. func (r RemoteDebugging) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "enabled", r.Enabled) populate(objectMap, "port", r.Port) return json.Marshal(objectMap) @@ -6406,7 +5140,7 @@ func (r *RemoteDebugging) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RemoteDebuggingPayload. func (r RemoteDebuggingPayload) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "port", r.Port) return json.Marshal(objectMap) } @@ -6433,7 +5167,7 @@ func (r *RemoteDebuggingPayload) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RequiredTraffic. func (r RequiredTraffic) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "direction", r.Direction) populate(objectMap, "fqdns", r.Fqdns) populate(objectMap, "ips", r.IPs) @@ -6476,7 +5210,7 @@ func (r *RequiredTraffic) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Resource. func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", r.ID) populate(objectMap, "name", r.Name) populate(objectMap, "systemData", r.SystemData) @@ -6515,7 +5249,7 @@ func (r *Resource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceRequests. func (r ResourceRequests) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cpu", r.CPU) populate(objectMap, "memory", r.Memory) return json.Marshal(objectMap) @@ -6546,7 +5280,7 @@ func (r *ResourceRequests) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceSKU. func (r ResourceSKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "capacity", r.Capacity) populate(objectMap, "locationInfo", r.LocationInfo) populate(objectMap, "locations", r.Locations) @@ -6597,7 +5331,7 @@ func (r *ResourceSKU) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceSKUCapabilities. func (r ResourceSKUCapabilities) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", r.Name) populate(objectMap, "value", r.Value) return json.Marshal(objectMap) @@ -6628,7 +5362,7 @@ func (r *ResourceSKUCapabilities) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceSKUCollection. func (r ResourceSKUCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", r.NextLink) populate(objectMap, "value", r.Value) return json.Marshal(objectMap) @@ -6659,7 +5393,7 @@ func (r *ResourceSKUCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceSKULocationInfo. func (r ResourceSKULocationInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "location", r.Location) populate(objectMap, "zoneDetails", r.ZoneDetails) populate(objectMap, "zones", r.Zones) @@ -6694,7 +5428,7 @@ func (r *ResourceSKULocationInfo) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceSKURestrictionInfo. func (r ResourceSKURestrictionInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "locations", r.Locations) populate(objectMap, "zones", r.Zones) return json.Marshal(objectMap) @@ -6725,7 +5459,7 @@ func (r *ResourceSKURestrictionInfo) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceSKURestrictions. func (r ResourceSKURestrictions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "reasonCode", r.ReasonCode) populate(objectMap, "restrictionInfo", r.RestrictionInfo) populate(objectMap, "type", r.Type) @@ -6764,7 +5498,7 @@ func (r *ResourceSKURestrictions) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceSKUZoneDetails. func (r ResourceSKUZoneDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "capabilities", r.Capabilities) populate(objectMap, "name", r.Name) return json.Marshal(objectMap) @@ -6795,7 +5529,7 @@ func (r *ResourceSKUZoneDetails) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceUploadDefinition. func (r ResourceUploadDefinition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "relativePath", r.RelativePath) populate(objectMap, "uploadUrl", r.UploadURL) return json.Marshal(objectMap) @@ -6826,7 +5560,7 @@ func (r *ResourceUploadDefinition) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SKU. func (s SKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "capacity", s.Capacity) populate(objectMap, "name", s.Name) populate(objectMap, "tier", s.Tier) @@ -6861,7 +5595,7 @@ func (s *SKU) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SKUCapacity. func (s SKUCapacity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "default", s.Default) populate(objectMap, "maximum", s.Maximum) populate(objectMap, "minimum", s.Minimum) @@ -6900,7 +5634,7 @@ func (s *SKUCapacity) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceRegistryInstance. func (s ServiceRegistryInstance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", s.Name) populate(objectMap, "status", s.Status) return json.Marshal(objectMap) @@ -6931,7 +5665,7 @@ func (s *ServiceRegistryInstance) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceRegistryProperties. func (s ServiceRegistryProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "instances", s.Instances) populate(objectMap, "provisioningState", s.ProvisioningState) populate(objectMap, "resourceRequests", s.ResourceRequests) @@ -6966,7 +5700,7 @@ func (s *ServiceRegistryProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceRegistryResource. func (s ServiceRegistryResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) @@ -7009,7 +5743,7 @@ func (s *ServiceRegistryResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceRegistryResourceCollection. func (s ServiceRegistryResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -7040,7 +5774,7 @@ func (s *ServiceRegistryResourceCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceRegistryResourceRequests. func (s ServiceRegistryResourceRequests) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cpu", s.CPU) populate(objectMap, "instanceCount", s.InstanceCount) populate(objectMap, "memory", s.Memory) @@ -7075,7 +5809,7 @@ func (s *ServiceRegistryResourceRequests) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceResource. func (s ServiceResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "location", s.Location) populate(objectMap, "name", s.Name) @@ -7130,7 +5864,7 @@ func (s *ServiceResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceResourceList. func (s ServiceResourceList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -7161,7 +5895,7 @@ func (s *ServiceResourceList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceSpecification. func (s ServiceSpecification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "logSpecifications", s.LogSpecifications) populate(objectMap, "metricSpecifications", s.MetricSpecifications) return json.Marshal(objectMap) @@ -7192,7 +5926,7 @@ func (s *ServiceSpecification) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceVNetAddons. func (s ServiceVNetAddons) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "logStreamPublicEndpoint", s.LogStreamPublicEndpoint) return json.Marshal(objectMap) } @@ -7219,7 +5953,7 @@ func (s *ServiceVNetAddons) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SourceUploadedUserSourceInfo. func (s SourceUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "artifactSelector", s.ArtifactSelector) populate(objectMap, "relativePath", s.RelativePath) populate(objectMap, "runtimeVersion", s.RuntimeVersion) @@ -7262,7 +5996,7 @@ func (s *SourceUploadedUserSourceInfo) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SsoProperties. func (s SsoProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "clientId", s.ClientID) populate(objectMap, "clientSecret", s.ClientSecret) populate(objectMap, "issuerUri", s.IssuerURI) @@ -7301,7 +6035,7 @@ func (s *SsoProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type StackProperties. func (s StackProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "version", s.Version) return json.Marshal(objectMap) @@ -7332,7 +6066,7 @@ func (s *StackProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type StorageAccount. func (s StorageAccount) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "accountKey", s.AccountKey) populate(objectMap, "accountName", s.AccountName) objectMap["storageType"] = StorageTypeStorageAccount @@ -7367,7 +6101,7 @@ func (s *StorageAccount) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type StorageProperties. func (s StorageProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["storageType"] = s.StorageType return json.Marshal(objectMap) } @@ -7394,7 +6128,7 @@ func (s *StorageProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type StorageResource. func (s StorageResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) @@ -7437,7 +6171,7 @@ func (s *StorageResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type StorageResourceCollection. func (s StorageResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -7468,7 +6202,7 @@ func (s *StorageResourceCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SupportedBuildpackResource. func (s SupportedBuildpackResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) @@ -7511,7 +6245,7 @@ func (s *SupportedBuildpackResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SupportedBuildpackResourceProperties. func (s SupportedBuildpackResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "buildpackId", s.BuildpackID) return json.Marshal(objectMap) } @@ -7538,7 +6272,7 @@ func (s *SupportedBuildpackResourceProperties) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type SupportedBuildpacksCollection. func (s SupportedBuildpacksCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -7569,7 +6303,7 @@ func (s *SupportedBuildpacksCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SupportedRuntimeVersion. func (s SupportedRuntimeVersion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "platform", s.Platform) populate(objectMap, "value", s.Value) populate(objectMap, "version", s.Version) @@ -7604,7 +6338,7 @@ func (s *SupportedRuntimeVersion) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SupportedStackResource. func (s SupportedStackResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) @@ -7647,7 +6381,7 @@ func (s *SupportedStackResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SupportedStackResourceProperties. func (s SupportedStackResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "stackId", s.StackID) populate(objectMap, "version", s.Version) return json.Marshal(objectMap) @@ -7678,7 +6412,7 @@ func (s *SupportedStackResourceProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SupportedStacksCollection. func (s SupportedStacksCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -7709,7 +6443,7 @@ func (s *SupportedStacksCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "createdBy", s.CreatedBy) populate(objectMap, "createdByType", s.CreatedByType) @@ -7756,7 +6490,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TCPSocketAction. func (t TCPSocketAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["type"] = ProbeActionTypeTCPSocketAction return json.Marshal(objectMap) } @@ -7783,7 +6517,7 @@ func (t *TCPSocketAction) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TemporaryDisk. func (t TemporaryDisk) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "mountPath", t.MountPath) populate(objectMap, "sizeInGB", t.SizeInGB) return json.Marshal(objectMap) @@ -7814,7 +6548,7 @@ func (t *TemporaryDisk) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TestKeys. func (t TestKeys) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "enabled", t.Enabled) populate(objectMap, "primaryKey", t.PrimaryKey) populate(objectMap, "primaryTestEndpoint", t.PrimaryTestEndpoint) @@ -7857,7 +6591,7 @@ func (t *TestKeys) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TrackedResource. func (t TrackedResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", t.ID) populate(objectMap, "location", t.Location) populate(objectMap, "name", t.Name) @@ -7904,7 +6638,7 @@ func (t *TrackedResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TriggeredBuildResult. func (t TriggeredBuildResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", t.ID) return json.Marshal(objectMap) } @@ -7931,7 +6665,7 @@ func (t *TriggeredBuildResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type UploadedUserSourceInfo. func (u UploadedUserSourceInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "relativePath", u.RelativePath) objectMap["type"] = "UploadedUserSourceInfo" populate(objectMap, "version", u.Version) @@ -7966,7 +6700,7 @@ func (u *UploadedUserSourceInfo) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type UserAssignedManagedIdentity. func (u UserAssignedManagedIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "clientId", u.ClientID) populate(objectMap, "principalId", u.PrincipalID) return json.Marshal(objectMap) @@ -7997,7 +6731,7 @@ func (u *UserAssignedManagedIdentity) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type UserSourceInfo. func (u UserSourceInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["type"] = u.Type populate(objectMap, "version", u.Version) return json.Marshal(objectMap) @@ -8028,7 +6762,7 @@ func (u *UserSourceInfo) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ValidationMessages. func (v ValidationMessages) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "messages", v.Messages) populate(objectMap, "name", v.Name) return json.Marshal(objectMap) @@ -8057,7 +6791,7 @@ func (v *ValidationMessages) UnmarshalJSON(data []byte) error { return nil } -func populate(m map[string]interface{}, k string, v interface{}) { +func populate(m map[string]any, k string, v any) { if v == nil { return } else if azcore.IsNullValue(v) { @@ -8067,7 +6801,7 @@ func populate(m map[string]interface{}, k string, v interface{}) { } } -func unpopulate(data json.RawMessage, fn string, v interface{}) error { +func unpopulate(data json.RawMessage, fn string, v any) error { if data == nil { return nil } diff --git a/sdk/resourcemanager/appplatform/armappplatform/monitoringsettings_client.go b/sdk/resourcemanager/appplatform/armappplatform/monitoringsettings_client.go index 10ecbbea15d1..bc7b91afb5ef 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/monitoringsettings_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/monitoringsettings_client.go @@ -32,10 +32,10 @@ type MonitoringSettingsClient struct { } // NewMonitoringSettingsClient creates a new instance of MonitoringSettingsClient 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. +// - 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 NewMonitoringSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MonitoringSettingsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,11 +58,12 @@ 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 -// 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 - MonitoringSettingsClientGetOptions contains the optional parameters for the MonitoringSettingsClient.Get method. +// +// Generated from API version 2022-12-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. +// - options - MonitoringSettingsClientGetOptions contains the optional parameters for the MonitoringSettingsClient.Get method. func (client *MonitoringSettingsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *MonitoringSettingsClientGetOptions) (MonitoringSettingsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { @@ -98,7 +99,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -115,13 +116,14 @@ 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 -// 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. -// monitoringSettingResource - Parameters for the update operation -// options - MonitoringSettingsClientBeginUpdatePatchOptions contains the optional parameters for the MonitoringSettingsClient.BeginUpdatePatch -// method. +// +// Generated from API version 2022-12-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. +// - monitoringSettingResource - Parameters for the update operation +// - options - MonitoringSettingsClientBeginUpdatePatchOptions contains the optional parameters for the MonitoringSettingsClient.BeginUpdatePatch +// method. func (client *MonitoringSettingsClient) BeginUpdatePatch(ctx context.Context, resourceGroupName string, serviceName string, monitoringSettingResource MonitoringSettingResource, options *MonitoringSettingsClientBeginUpdatePatchOptions) (*runtime.Poller[MonitoringSettingsClientUpdatePatchResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.updatePatch(ctx, resourceGroupName, serviceName, monitoringSettingResource, options) @@ -136,7 +138,8 @@ 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-12-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 { @@ -172,7 +175,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, monitoringSettingResource) @@ -180,13 +183,14 @@ 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 -// 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. -// monitoringSettingResource - Parameters for the update operation -// options - MonitoringSettingsClientBeginUpdatePutOptions contains the optional parameters for the MonitoringSettingsClient.BeginUpdatePut -// method. +// +// Generated from API version 2022-12-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. +// - monitoringSettingResource - Parameters for the update operation +// - options - MonitoringSettingsClientBeginUpdatePutOptions contains the optional parameters for the MonitoringSettingsClient.BeginUpdatePut +// method. func (client *MonitoringSettingsClient) BeginUpdatePut(ctx context.Context, resourceGroupName string, serviceName string, monitoringSettingResource MonitoringSettingResource, options *MonitoringSettingsClientBeginUpdatePutOptions) (*runtime.Poller[MonitoringSettingsClientUpdatePutResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.updatePut(ctx, resourceGroupName, serviceName, monitoringSettingResource, options) @@ -201,7 +205,8 @@ 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-12-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 { @@ -237,7 +242,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-12-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 deleted file mode 100644 index 22908cea5fe0..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/monitoringsettings_client_example_test.go +++ /dev/null @@ -1,95 +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. - -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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/MonitoringSettings_Get.json -func ExampleMonitoringSettingsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewMonitoringSettingsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/MonitoringSettings_UpdatePut.json -func ExampleMonitoringSettingsClient_BeginUpdatePut() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewMonitoringSettingsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdatePut(ctx, "myResourceGroup", "myservice", armappplatform.MonitoringSettingResource{ - Properties: &armappplatform.MonitoringSettingProperties{ - AppInsightsInstrumentationKey: to.Ptr("00000000-0000-0000-0000-000000000000"), - AppInsightsSamplingRate: to.Ptr[float64](10), - TraceEnabled: 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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/MonitoringSettings_UpdatePatch.json -func ExampleMonitoringSettingsClient_BeginUpdatePatch() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewMonitoringSettingsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdatePatch(ctx, "myResourceGroup", "myservice", armappplatform.MonitoringSettingResource{ - Properties: &armappplatform.MonitoringSettingProperties{ - AppInsightsInstrumentationKey: to.Ptr("00000000-0000-0000-0000-000000000000"), - AppInsightsSamplingRate: to.Ptr[float64](10), - TraceEnabled: 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) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/operations_client.go b/sdk/resourcemanager/appplatform/armappplatform/operations_client.go index 2f2faffdb921..78a869dfddf4 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/operations_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/operations_client.go @@ -28,8 +28,8 @@ type OperationsClient struct { } // NewOperationsClient creates a new instance of OperationsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -50,8 +50,9 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO } // NewListPager - Lists all of the available REST API operations of the Microsoft.AppPlatform provider. -// Generated from API version 2022-11-01-preview -// options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. +// +// Generated from API version 2022-12-01 +// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ More: func(page OperationsClientListResponse) bool { @@ -88,7 +89,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-12-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 deleted file mode 100644 index 35328e4c1b61..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/operations_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. - -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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Operations_List.json -func ExampleOperationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewOperationsClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/polymorphic_helpers.go b/sdk/resourcemanager/appplatform/armappplatform/polymorphic_helpers.go index ccfaa7cc32ca..00883875b74a 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/polymorphic_helpers.go +++ b/sdk/resourcemanager/appplatform/armappplatform/polymorphic_helpers.go @@ -11,33 +11,11 @@ package armappplatform import "encoding/json" -func unmarshalAcceleratorAuthSettingClassification(rawMsg json.RawMessage) (AcceleratorAuthSettingClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - 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 } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -57,7 +35,7 @@ func unmarshalCustomPersistentDiskPropertiesClassification(rawMsg json.RawMessag if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -75,7 +53,7 @@ func unmarshalProbeActionClassification(rawMsg json.RawMessage) (ProbeActionClas if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -97,7 +75,7 @@ func unmarshalStoragePropertiesClassification(rawMsg json.RawMessage) (StoragePr if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -115,7 +93,7 @@ func unmarshalUserSourceInfoClassification(rawMsg json.RawMessage) (UserSourceIn if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } diff --git a/sdk/resourcemanager/appplatform/armappplatform/predefinedaccelerators_client.go b/sdk/resourcemanager/appplatform/armappplatform/predefinedaccelerators_client.go deleted file mode 100644 index f3b001903c56..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/predefinedaccelerators_client.go +++ /dev/null @@ -1,348 +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" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "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 { - host string - subscriptionID string - pl runtime.Pipeline -} - -// 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) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &PredefinedAcceleratorsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - 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.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[PredefinedAcceleratorsClientDisableResponse](options.ResumeToken, client.pl, 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.pl.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.host, 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.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[PredefinedAcceleratorsClientEnableResponse](options.ResumeToken, client.pl, 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.pl.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.host, 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.pl.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.host, 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.List -// 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.pl.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.host, 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 1193344a496d..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/predefinedaccelerators_client_example_test.go +++ /dev/null @@ -1,102 +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. - -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/tree/main/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() - client, err := armappplatform.NewPredefinedAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", "default", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewPredefinedAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", "acc-name", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewPredefinedAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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/tree/main/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() - client, err := armappplatform.NewPredefinedAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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 d73c83024b42..4fca67264596 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/response_types.go +++ b/sdk/resourcemanager/appplatform/armappplatform/response_types.go @@ -9,12 +9,12 @@ package armappplatform -// APIPortalCustomDomainsClientCreateOrUpdateResponse contains the response from method APIPortalCustomDomainsClient.CreateOrUpdate. +// APIPortalCustomDomainsClientCreateOrUpdateResponse contains the response from method APIPortalCustomDomainsClient.BeginCreateOrUpdate. type APIPortalCustomDomainsClientCreateOrUpdateResponse struct { APIPortalCustomDomainResource } -// APIPortalCustomDomainsClientDeleteResponse contains the response from method APIPortalCustomDomainsClient.Delete. +// APIPortalCustomDomainsClientDeleteResponse contains the response from method APIPortalCustomDomainsClient.BeginDelete. type APIPortalCustomDomainsClientDeleteResponse struct { // placeholder for future response values } @@ -24,17 +24,17 @@ type APIPortalCustomDomainsClientGetResponse struct { APIPortalCustomDomainResource } -// APIPortalCustomDomainsClientListResponse contains the response from method APIPortalCustomDomainsClient.List. +// APIPortalCustomDomainsClientListResponse contains the response from method APIPortalCustomDomainsClient.NewListPager. type APIPortalCustomDomainsClientListResponse struct { APIPortalCustomDomainResourceCollection } -// APIPortalsClientCreateOrUpdateResponse contains the response from method APIPortalsClient.CreateOrUpdate. +// APIPortalsClientCreateOrUpdateResponse contains the response from method APIPortalsClient.BeginCreateOrUpdate. type APIPortalsClientCreateOrUpdateResponse struct { APIPortalResource } -// APIPortalsClientDeleteResponse contains the response from method APIPortalsClient.Delete. +// APIPortalsClientDeleteResponse contains the response from method APIPortalsClient.BeginDelete. type APIPortalsClientDeleteResponse struct { // placeholder for future response values } @@ -44,7 +44,7 @@ type APIPortalsClientGetResponse struct { APIPortalResource } -// APIPortalsClientListResponse contains the response from method APIPortalsClient.List. +// APIPortalsClientListResponse contains the response from method APIPortalsClient.NewListPager. type APIPortalsClientListResponse struct { APIPortalResourceCollection } @@ -54,52 +54,12 @@ type APIPortalsClientValidateDomainResponse struct { CustomDomainValidateResult } -// ApplicationAcceleratorsClientCreateOrUpdateResponse contains the response from method ApplicationAcceleratorsClient.CreateOrUpdate. -type ApplicationAcceleratorsClientCreateOrUpdateResponse struct { - ApplicationAcceleratorResource -} - -// ApplicationAcceleratorsClientDeleteResponse contains the response from method ApplicationAcceleratorsClient.Delete. -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.List. -type ApplicationAcceleratorsClientListResponse struct { - ApplicationAcceleratorResourceCollection -} - -// ApplicationLiveViewsClientCreateOrUpdateResponse contains the response from method ApplicationLiveViewsClient.CreateOrUpdate. -type ApplicationLiveViewsClientCreateOrUpdateResponse struct { - ApplicationLiveViewResource -} - -// ApplicationLiveViewsClientDeleteResponse contains the response from method ApplicationLiveViewsClient.Delete. -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.List. -type ApplicationLiveViewsClientListResponse struct { - ApplicationLiveViewResourceCollection -} - -// AppsClientCreateOrUpdateResponse contains the response from method AppsClient.CreateOrUpdate. +// AppsClientCreateOrUpdateResponse contains the response from method AppsClient.BeginCreateOrUpdate. type AppsClientCreateOrUpdateResponse struct { AppResource } -// AppsClientDeleteResponse contains the response from method AppsClient.Delete. +// AppsClientDeleteResponse contains the response from method AppsClient.BeginDelete. type AppsClientDeleteResponse struct { // placeholder for future response values } @@ -114,17 +74,17 @@ type AppsClientGetResponse struct { AppResource } -// AppsClientListResponse contains the response from method AppsClient.List. +// AppsClientListResponse contains the response from method AppsClient.NewListPager. type AppsClientListResponse struct { AppResourceCollection } -// AppsClientSetActiveDeploymentsResponse contains the response from method AppsClient.SetActiveDeployments. +// AppsClientSetActiveDeploymentsResponse contains the response from method AppsClient.BeginSetActiveDeployments. type AppsClientSetActiveDeploymentsResponse struct { AppResource } -// AppsClientUpdateResponse contains the response from method AppsClient.Update. +// AppsClientUpdateResponse contains the response from method AppsClient.BeginUpdate. type AppsClientUpdateResponse struct { AppResource } @@ -134,12 +94,12 @@ type AppsClientValidateDomainResponse struct { CustomDomainValidateResult } -// BindingsClientCreateOrUpdateResponse contains the response from method BindingsClient.CreateOrUpdate. +// BindingsClientCreateOrUpdateResponse contains the response from method BindingsClient.BeginCreateOrUpdate. type BindingsClientCreateOrUpdateResponse struct { BindingResource } -// BindingsClientDeleteResponse contains the response from method BindingsClient.Delete. +// BindingsClientDeleteResponse contains the response from method BindingsClient.BeginDelete. type BindingsClientDeleteResponse struct { // placeholder for future response values } @@ -149,12 +109,12 @@ type BindingsClientGetResponse struct { BindingResource } -// BindingsClientListResponse contains the response from method BindingsClient.List. +// BindingsClientListResponse contains the response from method BindingsClient.NewListPager. type BindingsClientListResponse struct { BindingResourceCollection } -// BindingsClientUpdateResponse contains the response from method BindingsClient.Update. +// BindingsClientUpdateResponse contains the response from method BindingsClient.BeginUpdate. type BindingsClientUpdateResponse struct { BindingResource } @@ -164,22 +124,22 @@ type BuildServiceAgentPoolClientGetResponse struct { BuildServiceAgentPoolResource } -// BuildServiceAgentPoolClientListResponse contains the response from method BuildServiceAgentPoolClient.List. +// BuildServiceAgentPoolClientListResponse contains the response from method BuildServiceAgentPoolClient.NewListPager. type BuildServiceAgentPoolClientListResponse struct { BuildServiceAgentPoolResourceCollection } -// BuildServiceAgentPoolClientUpdatePutResponse contains the response from method BuildServiceAgentPoolClient.UpdatePut. +// BuildServiceAgentPoolClientUpdatePutResponse contains the response from method BuildServiceAgentPoolClient.BeginUpdatePut. type BuildServiceAgentPoolClientUpdatePutResponse struct { BuildServiceAgentPoolResource } -// BuildServiceBuilderClientCreateOrUpdateResponse contains the response from method BuildServiceBuilderClient.CreateOrUpdate. +// BuildServiceBuilderClientCreateOrUpdateResponse contains the response from method BuildServiceBuilderClient.BeginCreateOrUpdate. type BuildServiceBuilderClientCreateOrUpdateResponse struct { BuilderResource } -// BuildServiceBuilderClientDeleteResponse contains the response from method BuildServiceBuilderClient.Delete. +// BuildServiceBuilderClientDeleteResponse contains the response from method BuildServiceBuilderClient.BeginDelete. type BuildServiceBuilderClientDeleteResponse struct { // placeholder for future response values } @@ -194,7 +154,7 @@ type BuildServiceBuilderClientListDeploymentsResponse struct { DeploymentList } -// BuildServiceBuilderClientListResponse contains the response from method BuildServiceBuilderClient.List. +// BuildServiceBuilderClientListResponse contains the response from method BuildServiceBuilderClient.NewListPager. type BuildServiceBuilderClientListResponse struct { BuilderResourceCollection } @@ -239,17 +199,17 @@ type BuildServiceClientGetSupportedStackResponse struct { SupportedStackResource } -// BuildServiceClientListBuildResultsResponse contains the response from method BuildServiceClient.ListBuildResults. +// BuildServiceClientListBuildResultsResponse contains the response from method BuildServiceClient.NewListBuildResultsPager. type BuildServiceClientListBuildResultsResponse struct { BuildResultCollection } -// BuildServiceClientListBuildServicesResponse contains the response from method BuildServiceClient.ListBuildServices. +// BuildServiceClientListBuildServicesResponse contains the response from method BuildServiceClient.NewListBuildServicesPager. type BuildServiceClientListBuildServicesResponse struct { BuildServiceCollection } -// BuildServiceClientListBuildsResponse contains the response from method BuildServiceClient.ListBuilds. +// BuildServiceClientListBuildsResponse contains the response from method BuildServiceClient.NewListBuildsPager. type BuildServiceClientListBuildsResponse struct { BuildCollection } @@ -264,12 +224,12 @@ type BuildServiceClientListSupportedStacksResponse struct { SupportedStacksCollection } -// BuildpackBindingClientCreateOrUpdateResponse contains the response from method BuildpackBindingClient.CreateOrUpdate. +// BuildpackBindingClientCreateOrUpdateResponse contains the response from method BuildpackBindingClient.BeginCreateOrUpdate. type BuildpackBindingClientCreateOrUpdateResponse struct { BuildpackBindingResource } -// BuildpackBindingClientDeleteResponse contains the response from method BuildpackBindingClient.Delete. +// BuildpackBindingClientDeleteResponse contains the response from method BuildpackBindingClient.BeginDelete. type BuildpackBindingClientDeleteResponse struct { // placeholder for future response values } @@ -279,17 +239,17 @@ type BuildpackBindingClientGetResponse struct { BuildpackBindingResource } -// BuildpackBindingClientListResponse contains the response from method BuildpackBindingClient.List. +// BuildpackBindingClientListResponse contains the response from method BuildpackBindingClient.NewListPager. type BuildpackBindingClientListResponse struct { BuildpackBindingResourceCollection } -// CertificatesClientCreateOrUpdateResponse contains the response from method CertificatesClient.CreateOrUpdate. +// CertificatesClientCreateOrUpdateResponse contains the response from method CertificatesClient.BeginCreateOrUpdate. type CertificatesClientCreateOrUpdateResponse struct { CertificateResource } -// CertificatesClientDeleteResponse contains the response from method CertificatesClient.Delete. +// CertificatesClientDeleteResponse contains the response from method CertificatesClient.BeginDelete. type CertificatesClientDeleteResponse struct { // placeholder for future response values } @@ -299,7 +259,7 @@ type CertificatesClientGetResponse struct { CertificateResource } -// CertificatesClientListResponse contains the response from method CertificatesClient.List. +// CertificatesClientListResponse contains the response from method CertificatesClient.NewListPager. type CertificatesClientListResponse struct { CertificateResourceCollection } @@ -309,27 +269,27 @@ type ConfigServersClientGetResponse struct { ConfigServerResource } -// ConfigServersClientUpdatePatchResponse contains the response from method ConfigServersClient.UpdatePatch. +// ConfigServersClientUpdatePatchResponse contains the response from method ConfigServersClient.BeginUpdatePatch. type ConfigServersClientUpdatePatchResponse struct { ConfigServerResource } -// ConfigServersClientUpdatePutResponse contains the response from method ConfigServersClient.UpdatePut. +// ConfigServersClientUpdatePutResponse contains the response from method ConfigServersClient.BeginUpdatePut. type ConfigServersClientUpdatePutResponse struct { ConfigServerResource } -// ConfigServersClientValidateResponse contains the response from method ConfigServersClient.Validate. +// ConfigServersClientValidateResponse contains the response from method ConfigServersClient.BeginValidate. type ConfigServersClientValidateResponse struct { ConfigServerSettingsValidateResult } -// ConfigurationServicesClientCreateOrUpdateResponse contains the response from method ConfigurationServicesClient.CreateOrUpdate. +// ConfigurationServicesClientCreateOrUpdateResponse contains the response from method ConfigurationServicesClient.BeginCreateOrUpdate. type ConfigurationServicesClientCreateOrUpdateResponse struct { ConfigurationServiceResource } -// ConfigurationServicesClientDeleteResponse contains the response from method ConfigurationServicesClient.Delete. +// ConfigurationServicesClientDeleteResponse contains the response from method ConfigurationServicesClient.BeginDelete. type ConfigurationServicesClientDeleteResponse struct { // placeholder for future response values } @@ -339,22 +299,22 @@ type ConfigurationServicesClientGetResponse struct { ConfigurationServiceResource } -// ConfigurationServicesClientListResponse contains the response from method ConfigurationServicesClient.List. +// ConfigurationServicesClientListResponse contains the response from method ConfigurationServicesClient.NewListPager. type ConfigurationServicesClientListResponse struct { ConfigurationServiceResourceCollection } -// ConfigurationServicesClientValidateResponse contains the response from method ConfigurationServicesClient.Validate. +// ConfigurationServicesClientValidateResponse contains the response from method ConfigurationServicesClient.BeginValidate. type ConfigurationServicesClientValidateResponse struct { ConfigurationServiceSettingsValidateResult } -// CustomDomainsClientCreateOrUpdateResponse contains the response from method CustomDomainsClient.CreateOrUpdate. +// CustomDomainsClientCreateOrUpdateResponse contains the response from method CustomDomainsClient.BeginCreateOrUpdate. type CustomDomainsClientCreateOrUpdateResponse struct { CustomDomainResource } -// CustomDomainsClientDeleteResponse contains the response from method CustomDomainsClient.Delete. +// CustomDomainsClientDeleteResponse contains the response from method CustomDomainsClient.BeginDelete. type CustomDomainsClientDeleteResponse struct { // placeholder for future response values } @@ -364,67 +324,42 @@ type CustomDomainsClientGetResponse struct { CustomDomainResource } -// CustomDomainsClientListResponse contains the response from method CustomDomainsClient.List. +// CustomDomainsClientListResponse contains the response from method CustomDomainsClient.NewListPager. type CustomDomainsClientListResponse struct { CustomDomainResourceCollection } -// CustomDomainsClientUpdateResponse contains the response from method CustomDomainsClient.Update. +// CustomDomainsClientUpdateResponse contains the response from method CustomDomainsClient.BeginUpdate. type CustomDomainsClientUpdateResponse struct { CustomDomainResource } -// CustomizedAcceleratorsClientCreateOrUpdateResponse contains the response from method CustomizedAcceleratorsClient.CreateOrUpdate. -type CustomizedAcceleratorsClientCreateOrUpdateResponse struct { - CustomizedAcceleratorResource -} - -// CustomizedAcceleratorsClientDeleteResponse contains the response from method CustomizedAcceleratorsClient.Delete. -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.List. -type CustomizedAcceleratorsClientListResponse struct { - CustomizedAcceleratorResourceCollection -} - -// CustomizedAcceleratorsClientValidateResponse contains the response from method CustomizedAcceleratorsClient.Validate. -type CustomizedAcceleratorsClientValidateResponse struct { - CustomizedAcceleratorValidateResult -} - -// DeploymentsClientCreateOrUpdateResponse contains the response from method DeploymentsClient.CreateOrUpdate. +// DeploymentsClientCreateOrUpdateResponse contains the response from method DeploymentsClient.BeginCreateOrUpdate. type DeploymentsClientCreateOrUpdateResponse struct { DeploymentResource } -// DeploymentsClientDeleteResponse contains the response from method DeploymentsClient.Delete. +// DeploymentsClientDeleteResponse contains the response from method DeploymentsClient.BeginDelete. type DeploymentsClientDeleteResponse struct { // placeholder for future response values } -// DeploymentsClientDisableRemoteDebuggingResponse contains the response from method DeploymentsClient.DisableRemoteDebugging. +// DeploymentsClientDisableRemoteDebuggingResponse contains the response from method DeploymentsClient.BeginDisableRemoteDebugging. type DeploymentsClientDisableRemoteDebuggingResponse struct { RemoteDebugging } -// DeploymentsClientEnableRemoteDebuggingResponse contains the response from method DeploymentsClient.EnableRemoteDebugging. +// DeploymentsClientEnableRemoteDebuggingResponse contains the response from method DeploymentsClient.BeginEnableRemoteDebugging. type DeploymentsClientEnableRemoteDebuggingResponse struct { RemoteDebugging } -// DeploymentsClientGenerateHeapDumpResponse contains the response from method DeploymentsClient.GenerateHeapDump. +// DeploymentsClientGenerateHeapDumpResponse contains the response from method DeploymentsClient.BeginGenerateHeapDump. type DeploymentsClientGenerateHeapDumpResponse struct { // placeholder for future response values } -// DeploymentsClientGenerateThreadDumpResponse contains the response from method DeploymentsClient.GenerateThreadDump. +// DeploymentsClientGenerateThreadDumpResponse contains the response from method DeploymentsClient.BeginGenerateThreadDump. type DeploymentsClientGenerateThreadDumpResponse struct { // placeholder for future response values } @@ -444,67 +379,47 @@ type DeploymentsClientGetResponse struct { DeploymentResource } -// DeploymentsClientListForClusterResponse contains the response from method DeploymentsClient.ListForCluster. +// DeploymentsClientListForClusterResponse contains the response from method DeploymentsClient.NewListForClusterPager. type DeploymentsClientListForClusterResponse struct { DeploymentResourceCollection } -// DeploymentsClientListResponse contains the response from method DeploymentsClient.List. +// DeploymentsClientListResponse contains the response from method DeploymentsClient.NewListPager. type DeploymentsClientListResponse struct { DeploymentResourceCollection } -// DeploymentsClientRestartResponse contains the response from method DeploymentsClient.Restart. +// DeploymentsClientRestartResponse contains the response from method DeploymentsClient.BeginRestart. type DeploymentsClientRestartResponse struct { // placeholder for future response values } -// DeploymentsClientStartJFRResponse contains the response from method DeploymentsClient.StartJFR. +// DeploymentsClientStartJFRResponse contains the response from method DeploymentsClient.BeginStartJFR. type DeploymentsClientStartJFRResponse struct { // placeholder for future response values } -// DeploymentsClientStartResponse contains the response from method DeploymentsClient.Start. +// DeploymentsClientStartResponse contains the response from method DeploymentsClient.BeginStart. type DeploymentsClientStartResponse struct { // placeholder for future response values } -// DeploymentsClientStopResponse contains the response from method DeploymentsClient.Stop. +// DeploymentsClientStopResponse contains the response from method DeploymentsClient.BeginStop. type DeploymentsClientStopResponse struct { // placeholder for future response values } -// DeploymentsClientUpdateResponse contains the response from method DeploymentsClient.Update. +// DeploymentsClientUpdateResponse contains the response from method DeploymentsClient.BeginUpdate. type DeploymentsClientUpdateResponse struct { DeploymentResource } -// DevToolPortalsClientCreateOrUpdateResponse contains the response from method DevToolPortalsClient.CreateOrUpdate. -type DevToolPortalsClientCreateOrUpdateResponse struct { - DevToolPortalResource -} - -// DevToolPortalsClientDeleteResponse contains the response from method DevToolPortalsClient.Delete. -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.List. -type DevToolPortalsClientListResponse struct { - DevToolPortalResourceCollection -} - -// GatewayCustomDomainsClientCreateOrUpdateResponse contains the response from method GatewayCustomDomainsClient.CreateOrUpdate. +// GatewayCustomDomainsClientCreateOrUpdateResponse contains the response from method GatewayCustomDomainsClient.BeginCreateOrUpdate. type GatewayCustomDomainsClientCreateOrUpdateResponse struct { GatewayCustomDomainResource } -// GatewayCustomDomainsClientDeleteResponse contains the response from method GatewayCustomDomainsClient.Delete. +// GatewayCustomDomainsClientDeleteResponse contains the response from method GatewayCustomDomainsClient.BeginDelete. type GatewayCustomDomainsClientDeleteResponse struct { // placeholder for future response values } @@ -514,17 +429,17 @@ type GatewayCustomDomainsClientGetResponse struct { GatewayCustomDomainResource } -// GatewayCustomDomainsClientListResponse contains the response from method GatewayCustomDomainsClient.List. +// GatewayCustomDomainsClientListResponse contains the response from method GatewayCustomDomainsClient.NewListPager. type GatewayCustomDomainsClientListResponse struct { GatewayCustomDomainResourceCollection } -// GatewayRouteConfigsClientCreateOrUpdateResponse contains the response from method GatewayRouteConfigsClient.CreateOrUpdate. +// GatewayRouteConfigsClientCreateOrUpdateResponse contains the response from method GatewayRouteConfigsClient.BeginCreateOrUpdate. type GatewayRouteConfigsClientCreateOrUpdateResponse struct { GatewayRouteConfigResource } -// GatewayRouteConfigsClientDeleteResponse contains the response from method GatewayRouteConfigsClient.Delete. +// GatewayRouteConfigsClientDeleteResponse contains the response from method GatewayRouteConfigsClient.BeginDelete. type GatewayRouteConfigsClientDeleteResponse struct { // placeholder for future response values } @@ -534,17 +449,17 @@ type GatewayRouteConfigsClientGetResponse struct { GatewayRouteConfigResource } -// GatewayRouteConfigsClientListResponse contains the response from method GatewayRouteConfigsClient.List. +// GatewayRouteConfigsClientListResponse contains the response from method GatewayRouteConfigsClient.NewListPager. type GatewayRouteConfigsClientListResponse struct { GatewayRouteConfigResourceCollection } -// GatewaysClientCreateOrUpdateResponse contains the response from method GatewaysClient.CreateOrUpdate. +// GatewaysClientCreateOrUpdateResponse contains the response from method GatewaysClient.BeginCreateOrUpdate. type GatewaysClientCreateOrUpdateResponse struct { GatewayResource } -// GatewaysClientDeleteResponse contains the response from method GatewaysClient.Delete. +// GatewaysClientDeleteResponse contains the response from method GatewaysClient.BeginDelete. type GatewaysClientDeleteResponse struct { // placeholder for future response values } @@ -554,13 +469,7 @@ 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.List. +// GatewaysClientListResponse contains the response from method GatewaysClient.NewListPager. type GatewaysClientListResponse struct { GatewayResourceCollection } @@ -575,57 +484,37 @@ type MonitoringSettingsClientGetResponse struct { MonitoringSettingResource } -// MonitoringSettingsClientUpdatePatchResponse contains the response from method MonitoringSettingsClient.UpdatePatch. +// MonitoringSettingsClientUpdatePatchResponse contains the response from method MonitoringSettingsClient.BeginUpdatePatch. type MonitoringSettingsClientUpdatePatchResponse struct { MonitoringSettingResource } -// MonitoringSettingsClientUpdatePutResponse contains the response from method MonitoringSettingsClient.UpdatePut. +// MonitoringSettingsClientUpdatePutResponse contains the response from method MonitoringSettingsClient.BeginUpdatePut. type MonitoringSettingsClientUpdatePutResponse struct { MonitoringSettingResource } -// OperationsClientListResponse contains the response from method OperationsClient.List. +// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { AvailableOperations } -// PredefinedAcceleratorsClientDisableResponse contains the response from method PredefinedAcceleratorsClient.Disable. -type PredefinedAcceleratorsClientDisableResponse struct { - // placeholder for future response values -} - -// PredefinedAcceleratorsClientEnableResponse contains the response from method PredefinedAcceleratorsClient.Enable. -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.List. -type PredefinedAcceleratorsClientListResponse struct { - PredefinedAcceleratorResourceCollection -} - // RuntimeVersionsClientListRuntimeVersionsResponse contains the response from method RuntimeVersionsClient.ListRuntimeVersions. type RuntimeVersionsClientListRuntimeVersionsResponse struct { AvailableRuntimeVersions } -// SKUsClientListResponse contains the response from method SKUsClient.List. +// SKUsClientListResponse contains the response from method SKUsClient.NewListPager. type SKUsClientListResponse struct { ResourceSKUCollection } -// ServiceRegistriesClientCreateOrUpdateResponse contains the response from method ServiceRegistriesClient.CreateOrUpdate. +// ServiceRegistriesClientCreateOrUpdateResponse contains the response from method ServiceRegistriesClient.BeginCreateOrUpdate. type ServiceRegistriesClientCreateOrUpdateResponse struct { ServiceRegistryResource } -// ServiceRegistriesClientDeleteResponse contains the response from method ServiceRegistriesClient.Delete. +// ServiceRegistriesClientDeleteResponse contains the response from method ServiceRegistriesClient.BeginDelete. type ServiceRegistriesClientDeleteResponse struct { // placeholder for future response values } @@ -635,7 +524,7 @@ type ServiceRegistriesClientGetResponse struct { ServiceRegistryResource } -// ServiceRegistriesClientListResponse contains the response from method ServiceRegistriesClient.List. +// ServiceRegistriesClientListResponse contains the response from method ServiceRegistriesClient.NewListPager. type ServiceRegistriesClientListResponse struct { ServiceRegistryResourceCollection } @@ -645,12 +534,12 @@ type ServicesClientCheckNameAvailabilityResponse struct { NameAvailability } -// ServicesClientCreateOrUpdateResponse contains the response from method ServicesClient.CreateOrUpdate. +// ServicesClientCreateOrUpdateResponse contains the response from method ServicesClient.BeginCreateOrUpdate. type ServicesClientCreateOrUpdateResponse struct { ServiceResource } -// ServicesClientDeleteResponse contains the response from method ServicesClient.Delete. +// ServicesClientDeleteResponse contains the response from method ServicesClient.BeginDelete. type ServicesClientDeleteResponse struct { // placeholder for future response values } @@ -670,12 +559,12 @@ type ServicesClientGetResponse struct { ServiceResource } -// ServicesClientListBySubscriptionResponse contains the response from method ServicesClient.ListBySubscription. +// ServicesClientListBySubscriptionResponse contains the response from method ServicesClient.NewListBySubscriptionPager. type ServicesClientListBySubscriptionResponse struct { ServiceResourceList } -// ServicesClientListResponse contains the response from method ServicesClient.List. +// ServicesClientListResponse contains the response from method ServicesClient.NewListPager. type ServicesClientListResponse struct { ServiceResourceList } @@ -690,27 +579,27 @@ type ServicesClientRegenerateTestKeyResponse struct { TestKeys } -// ServicesClientStartResponse contains the response from method ServicesClient.Start. +// ServicesClientStartResponse contains the response from method ServicesClient.BeginStart. type ServicesClientStartResponse struct { // placeholder for future response values } -// ServicesClientStopResponse contains the response from method ServicesClient.Stop. +// ServicesClientStopResponse contains the response from method ServicesClient.BeginStop. type ServicesClientStopResponse struct { // placeholder for future response values } -// ServicesClientUpdateResponse contains the response from method ServicesClient.Update. +// ServicesClientUpdateResponse contains the response from method ServicesClient.BeginUpdate. type ServicesClientUpdateResponse struct { ServiceResource } -// StoragesClientCreateOrUpdateResponse contains the response from method StoragesClient.CreateOrUpdate. +// StoragesClientCreateOrUpdateResponse contains the response from method StoragesClient.BeginCreateOrUpdate. type StoragesClientCreateOrUpdateResponse struct { StorageResource } -// StoragesClientDeleteResponse contains the response from method StoragesClient.Delete. +// StoragesClientDeleteResponse contains the response from method StoragesClient.BeginDelete. type StoragesClientDeleteResponse struct { // placeholder for future response values } @@ -720,7 +609,7 @@ type StoragesClientGetResponse struct { StorageResource } -// StoragesClientListResponse contains the response from method StoragesClient.List. +// 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 bfc2bae5af9f..28aa7c514cea 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/runtimeversions_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/runtimeversions_client.go @@ -28,8 +28,8 @@ type RuntimeVersionsClient struct { } // NewRuntimeVersionsClient creates a new instance of RuntimeVersionsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewRuntimeVersionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RuntimeVersionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -51,9 +51,10 @@ 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 -// options - RuntimeVersionsClientListRuntimeVersionsOptions contains the optional parameters for the RuntimeVersionsClient.ListRuntimeVersions -// method. +// +// Generated from API version 2022-12-01 +// - options - RuntimeVersionsClientListRuntimeVersionsOptions contains the optional parameters for the RuntimeVersionsClient.ListRuntimeVersions +// method. func (client *RuntimeVersionsClient) ListRuntimeVersions(ctx context.Context, options *RuntimeVersionsClientListRuntimeVersionsOptions) (RuntimeVersionsClientListRuntimeVersionsResponse, error) { req, err := client.listRuntimeVersionsCreateRequest(ctx, options) if err != nil { @@ -77,7 +78,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-12-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 deleted file mode 100644 index db85e52ade10..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/runtimeversions_client_example_test.go +++ /dev/null @@ -1,36 +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. - -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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/RuntimeVersions_ListRuntimeVersions.json -func ExampleRuntimeVersionsClient_ListRuntimeVersions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewRuntimeVersionsClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListRuntimeVersions(ctx, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/serviceregistries_client.go b/sdk/resourcemanager/appplatform/armappplatform/serviceregistries_client.go index 60efc80fa8b9..59fc0767d21f 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/serviceregistries_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/serviceregistries_client.go @@ -32,10 +32,10 @@ type ServiceRegistriesClient struct { } // NewServiceRegistriesClient creates a new instance of ServiceRegistriesClient 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. +// - 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 NewServiceRegistriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceRegistriesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ 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 -// 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. -// serviceRegistryName - The name of Service Registry. -// options - ServiceRegistriesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceRegistriesClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2022-12-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. +// - serviceRegistryName - The name of Service Registry. +// - options - ServiceRegistriesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceRegistriesClient.BeginCreateOrUpdate +// method. func (client *ServiceRegistriesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServiceRegistriesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, serviceRegistryName, options) @@ -79,7 +80,8 @@ 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-12-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 { @@ -119,7 +121,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -127,13 +129,14 @@ 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 -// 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. -// serviceRegistryName - The name of Service Registry. -// options - ServiceRegistriesClientBeginDeleteOptions contains the optional parameters for the ServiceRegistriesClient.BeginDelete -// method. +// +// Generated from API version 2022-12-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. +// - serviceRegistryName - The name of Service Registry. +// - options - ServiceRegistriesClientBeginDeleteOptions contains the optional parameters for the ServiceRegistriesClient.BeginDelete +// method. func (client *ServiceRegistriesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientBeginDeleteOptions) (*runtime.Poller[ServiceRegistriesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, serviceRegistryName, options) @@ -148,7 +151,8 @@ 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-12-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 { @@ -188,7 +192,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -196,12 +200,13 @@ 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 -// 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. -// serviceRegistryName - The name of Service Registry. -// options - ServiceRegistriesClientGetOptions contains the optional parameters for the ServiceRegistriesClient.Get method. +// +// Generated from API version 2022-12-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. +// - serviceRegistryName - The name of Service Registry. +// - options - ServiceRegistriesClientGetOptions contains the optional parameters for the ServiceRegistriesClient.Get method. func (client *ServiceRegistriesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientGetOptions) (ServiceRegistriesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, serviceRegistryName, options) if err != nil { @@ -241,7 +246,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -257,11 +262,13 @@ 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 -// 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 - ServiceRegistriesClientListOptions contains the optional parameters for the ServiceRegistriesClient.List method. +// +// Generated from API version 2022-12-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. +// - options - ServiceRegistriesClientListOptions contains the optional parameters for the ServiceRegistriesClient.NewListPager +// method. func (client *ServiceRegistriesClient) NewListPager(resourceGroupName string, serviceName string, options *ServiceRegistriesClientListOptions) *runtime.Pager[ServiceRegistriesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ServiceRegistriesClientListResponse]{ More: func(page ServiceRegistriesClientListResponse) bool { @@ -310,7 +317,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-12-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 deleted file mode 100644 index 10d7ab2b696b..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/serviceregistries_client_example_test.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. - -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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ServiceRegistries_Get.json -func ExampleServiceRegistriesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServiceRegistriesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ServiceRegistries_CreateOrUpdate.json -func ExampleServiceRegistriesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServiceRegistriesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", 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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ServiceRegistries_Delete.json -func ExampleServiceRegistriesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServiceRegistriesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ServiceRegistries_List.json -func ExampleServiceRegistriesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServiceRegistriesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/services_client.go b/sdk/resourcemanager/appplatform/armappplatform/services_client.go index 62ef66013766..805034610934 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/services_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/services_client.go @@ -32,10 +32,10 @@ type ServicesClient struct { } // NewServicesClient creates a new instance of ServicesClient 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. +// - 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 NewServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServicesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,11 +58,12 @@ 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 -// location - the region -// availabilityParameters - Parameters supplied to the operation. -// options - ServicesClientCheckNameAvailabilityOptions contains the optional parameters for the ServicesClient.CheckNameAvailability -// method. +// +// Generated from API version 2022-12-01 +// - location - the region +// - availabilityParameters - Parameters supplied to the operation. +// - options - ServicesClientCheckNameAvailabilityOptions contains the optional parameters for the ServicesClient.CheckNameAvailability +// method. func (client *ServicesClient) CheckNameAvailability(ctx context.Context, location string, availabilityParameters NameAvailabilityParameters, options *ServicesClientCheckNameAvailabilityOptions) (ServicesClientCheckNameAvailabilityResponse, error) { req, err := client.checkNameAvailabilityCreateRequest(ctx, location, availabilityParameters, options) if err != nil { @@ -94,7 +95,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, availabilityParameters) @@ -111,13 +112,14 @@ 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 -// 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. -// resource - Parameters for the create or update operation -// options - ServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServicesClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2022-12-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. +// - resource - Parameters for the create or update operation +// - options - ServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServicesClient.BeginCreateOrUpdate +// method. func (client *ServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource, options *ServicesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServicesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, resource, options) @@ -132,7 +134,8 @@ 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-12-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 { @@ -168,7 +171,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, resource) @@ -176,11 +179,12 @@ 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 -// 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 - ServicesClientBeginDeleteOptions contains the optional parameters for the ServicesClient.BeginDelete method. +// +// Generated from API version 2022-12-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. +// - options - ServicesClientBeginDeleteOptions contains the optional parameters for the ServicesClient.BeginDelete method. func (client *ServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginDeleteOptions) (*runtime.Poller[ServicesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, options) @@ -195,7 +199,8 @@ 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-12-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 { @@ -231,7 +236,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -239,12 +244,13 @@ 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 -// 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 - ServicesClientDisableTestEndpointOptions contains the optional parameters for the ServicesClient.DisableTestEndpoint -// method. +// +// Generated from API version 2022-12-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. +// - options - ServicesClientDisableTestEndpointOptions contains the optional parameters for the ServicesClient.DisableTestEndpoint +// method. func (client *ServicesClient) DisableTestEndpoint(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientDisableTestEndpointOptions) (ServicesClientDisableTestEndpointResponse, error) { req, err := client.disableTestEndpointCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { @@ -280,7 +286,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -288,12 +294,13 @@ 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 -// 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 - ServicesClientEnableTestEndpointOptions contains the optional parameters for the ServicesClient.EnableTestEndpoint -// method. +// +// Generated from API version 2022-12-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. +// - options - ServicesClientEnableTestEndpointOptions contains the optional parameters for the ServicesClient.EnableTestEndpoint +// method. func (client *ServicesClient) EnableTestEndpoint(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientEnableTestEndpointOptions) (ServicesClientEnableTestEndpointResponse, error) { req, err := client.enableTestEndpointCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { @@ -329,7 +336,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -346,11 +353,12 @@ 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 -// 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 - ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method. +// +// Generated from API version 2022-12-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. +// - options - ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method. func (client *ServicesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientGetOptions) (ServicesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { @@ -386,7 +394,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -402,10 +410,11 @@ 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 -// 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.List method. +// +// Generated from API version 2022-12-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. func (client *ServicesClient) NewListPager(resourceGroupName string, options *ServicesClientListOptions) *runtime.Pager[ServicesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ServicesClientListResponse]{ More: func(page ServicesClientListResponse) bool { @@ -450,7 +459,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -466,9 +475,10 @@ 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 -// options - ServicesClientListBySubscriptionOptions contains the optional parameters for the ServicesClient.ListBySubscription -// method. +// +// Generated from API version 2022-12-01 +// - options - ServicesClientListBySubscriptionOptions contains the optional parameters for the ServicesClient.NewListBySubscriptionPager +// method. func (client *ServicesClient) NewListBySubscriptionPager(options *ServicesClientListBySubscriptionOptions) *runtime.Pager[ServicesClientListBySubscriptionResponse] { return runtime.NewPager(runtime.PagingHandler[ServicesClientListBySubscriptionResponse]{ More: func(page ServicesClientListBySubscriptionResponse) bool { @@ -509,7 +519,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -526,11 +536,12 @@ 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 -// 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 - ServicesClientListTestKeysOptions contains the optional parameters for the ServicesClient.ListTestKeys method. +// +// Generated from API version 2022-12-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. +// - options - ServicesClientListTestKeysOptions contains the optional parameters for the ServicesClient.ListTestKeys method. func (client *ServicesClient) ListTestKeys(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientListTestKeysOptions) (ServicesClientListTestKeysResponse, error) { req, err := client.listTestKeysCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { @@ -566,7 +577,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -583,13 +594,14 @@ 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 -// 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. -// regenerateTestKeyRequest - Parameters for the operation -// options - ServicesClientRegenerateTestKeyOptions contains the optional parameters for the ServicesClient.RegenerateTestKey -// method. +// +// Generated from API version 2022-12-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. +// - regenerateTestKeyRequest - Parameters for the operation +// - options - ServicesClientRegenerateTestKeyOptions contains the optional parameters for the ServicesClient.RegenerateTestKey +// method. func (client *ServicesClient) RegenerateTestKey(ctx context.Context, resourceGroupName string, serviceName string, regenerateTestKeyRequest RegenerateTestKeyRequestPayload, options *ServicesClientRegenerateTestKeyOptions) (ServicesClientRegenerateTestKeyResponse, error) { req, err := client.regenerateTestKeyCreateRequest(ctx, resourceGroupName, serviceName, regenerateTestKeyRequest, options) if err != nil { @@ -625,7 +637,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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, regenerateTestKeyRequest) @@ -642,11 +654,12 @@ func (client *ServicesClient) regenerateTestKeyHandleResponse(resp *http.Respons // 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. +// +// Generated from API version 2022-12-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. +// - 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) @@ -661,7 +674,8 @@ func (client *ServicesClient) BeginStart(ctx context.Context, resourceGroupName // Start - Start 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-12-01 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 { @@ -697,7 +711,7 @@ func (client *ServicesClient) startCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -705,11 +719,12 @@ func (client *ServicesClient) startCreateRequest(ctx context.Context, resourceGr // 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. +// +// Generated from API version 2022-12-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. +// - 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) @@ -724,7 +739,8 @@ func (client *ServicesClient) BeginStop(ctx context.Context, resourceGroupName s // Stop - Stop 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-12-01 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 { @@ -760,7 +776,7 @@ func (client *ServicesClient) stopCreateRequest(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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -768,12 +784,13 @@ func (client *ServicesClient) stopCreateRequest(ctx context.Context, resourceGro // 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 -// 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. -// resource - Parameters for the update operation -// options - ServicesClientBeginUpdateOptions contains the optional parameters for the ServicesClient.BeginUpdate method. +// +// Generated from API version 2022-12-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. +// - resource - Parameters for the update operation +// - options - ServicesClientBeginUpdateOptions contains the optional parameters for the ServicesClient.BeginUpdate method. func (client *ServicesClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource, options *ServicesClientBeginUpdateOptions) (*runtime.Poller[ServicesClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, serviceName, resource, options) @@ -788,7 +805,8 @@ 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-12-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 { @@ -824,7 +842,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-12-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 deleted file mode 100644 index 35c68d633c31..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/services_client_example_test.go +++ /dev/null @@ -1,398 +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. - -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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_Get.json -func ExampleServicesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_CreateOrUpdate.json -func ExampleServicesClient_BeginCreateOrUpdate_servicesCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", armappplatform.ServiceResource{ - Location: to.Ptr("eastus"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armappplatform.ClusterResourceProperties{}, - SKU: &armappplatform.SKU{ - Name: to.Ptr("S0"), - Tier: to.Ptr("Standard"), - }, - }, 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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_CreateOrUpdate_VNetInjection.json -func ExampleServicesClient_BeginCreateOrUpdate_servicesCreateOrUpdateVNetInjection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", armappplatform.ServiceResource{ - Location: to.Ptr("eastus"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - 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), - }, - 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"), - Tier: to.Ptr("Standard"), - }, - }, 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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_Delete.json -func ExampleServicesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_Update.json -func ExampleServicesClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, "myResourceGroup", "myservice", armappplatform.ServiceResource{ - Location: to.Ptr("eastus"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armappplatform.ClusterResourceProperties{}, - SKU: &armappplatform.SKU{ - Name: to.Ptr("S0"), - Tier: to.Ptr("Standard"), - }, - }, 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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_ListTestKeys.json -func ExampleServicesClient_ListTestKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListTestKeys(ctx, "myResourceGroup", "myservice", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_RegenerateTestKey.json -func ExampleServicesClient_RegenerateTestKey() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.RegenerateTestKey(ctx, "myResourceGroup", "myservice", armappplatform.RegenerateTestKeyRequestPayload{ - KeyType: to.Ptr(armappplatform.TestKeyTypePrimary), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_DisableTestEndpoint.json -func ExampleServicesClient_DisableTestEndpoint() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.DisableTestEndpoint(ctx, "myResourceGroup", "myservice", 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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_EnableTestEndpoint.json -func ExampleServicesClient_EnableTestEndpoint() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.EnableTestEndpoint(ctx, "myResourceGroup", "myservice", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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/tree/main/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() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_CheckNameAvailability.json -func ExampleServicesClient_CheckNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CheckNameAvailability(ctx, "eastus", armappplatform.NameAvailabilityParameters{ - Name: to.Ptr("myservice"), - Type: to.Ptr("Microsoft.AppPlatform/Spring"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_ListBySubscription.json -func ExampleServicesClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBySubscriptionPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_List.json -func ExampleServicesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/skus_client.go b/sdk/resourcemanager/appplatform/armappplatform/skus_client.go index 5f504a26cb25..a625b5a01aff 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/skus_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/skus_client.go @@ -32,10 +32,10 @@ type SKUsClient struct { } // NewSKUsClient creates a new instance of SKUsClient 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. +// - 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 NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SKUsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,8 +57,9 @@ 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 -// options - SKUsClientListOptions contains the optional parameters for the SKUsClient.List method. +// +// Generated from API version 2022-12-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]{ More: func(page SKUsClientListResponse) bool { @@ -99,7 +100,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-12-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 deleted file mode 100644 index deef09d5b745..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/skus_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. - -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/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Skus_List.json -func ExampleSKUsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewSKUsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/storages_client.go b/sdk/resourcemanager/appplatform/armappplatform/storages_client.go index 7ba97d7df408..711c84e322ed 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/storages_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/storages_client.go @@ -32,10 +32,10 @@ type StoragesClient struct { } // 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. +// - 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) { if options == nil { options = &arm.ClientOptions{} @@ -58,14 +58,15 @@ func NewStoragesClient(subscriptionID string, credential azcore.TokenCredential, // 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. +// +// Generated from API version 2022-12-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. +// - 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) @@ -80,7 +81,8 @@ func (client *StoragesClient) BeginCreateOrUpdate(ctx context.Context, resourceG // CreateOrUpdate - Create or update storage resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2022-12-01 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 { @@ -120,7 +122,7 @@ func (client *StoragesClient) 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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, storageResource) @@ -128,12 +130,13 @@ func (client *StoragesClient) createOrUpdateCreateRequest(ctx context.Context, r // 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. +// +// Generated from API version 2022-12-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. +// - 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) @@ -148,7 +151,8 @@ func (client *StoragesClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Delete the storage resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2022-12-01 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 { @@ -188,7 +192,7 @@ func (client *StoragesClient) 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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -196,12 +200,13 @@ func (client *StoragesClient) deleteCreateRequest(ctx context.Context, resourceG // 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. +// +// Generated from API version 2022-12-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. +// - 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 { @@ -241,7 +246,7 @@ func (client *StoragesClient) 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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -257,11 +262,12 @@ func (client *StoragesClient) getHandleResponse(resp *http.Response) (StoragesCl } // 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.List method. +// +// Generated from API version 2022-12-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. +// - 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 { @@ -310,7 +316,7 @@ func (client *StoragesClient) 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-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, 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 65e9edd463bf..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/storages_client_example_test.go +++ /dev/null @@ -1,111 +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. - -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/tree/main/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() - client, err := armappplatform.NewStoragesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "mystorage", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewStoragesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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() - client, err := armappplatform.NewStoragesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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/tree/main/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() - client, err := armappplatform.NewStoragesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myService", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/time_rfc3339.go b/sdk/resourcemanager/appplatform/armappplatform/time_rfc3339.go index c2e3f14d72a8..22ee10481ef1 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/time_rfc3339.go +++ b/sdk/resourcemanager/appplatform/armappplatform/time_rfc3339.go @@ -62,7 +62,7 @@ func (t *timeRFC3339) Parse(layout, value string) error { return err } -func populateTimeRFC3339(m map[string]interface{}, k string, t *time.Time) { +func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) {