diff --git a/sdk/resourcemanager/appplatform/armappplatform/CHANGELOG.md b/sdk/resourcemanager/appplatform/armappplatform/CHANGELOG.md index 34d3245f6145..85cee4ffe7ca 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 (2022-12-05) +### 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..6e4a4c8cfd6d 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/apiportalcustomdomains_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/apiportalcustomdomains_client.go @@ -58,7 +58,7 @@ 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 +// 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. @@ -81,7 +81,7 @@ 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 +125,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,7 +133,7 @@ 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 +// 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. @@ -155,7 +155,7 @@ 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 +199,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,7 +207,7 @@ 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 +// 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. @@ -258,7 +258,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,7 +274,7 @@ 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 +// 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. @@ -333,7 +333,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..ed610d9458b4 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/apiportals_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/apiportals_client.go @@ -58,7 +58,7 @@ 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 +// 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. @@ -80,7 +80,7 @@ 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 +120,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,7 +128,7 @@ 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 +// 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. @@ -148,7 +148,7 @@ 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 +188,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,7 +196,7 @@ 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 +// 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. @@ -241,7 +241,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,7 +257,7 @@ 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 +// 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. @@ -310,7 +310,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,7 +327,7 @@ 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 +// 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. @@ -374,7 +374,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..2800465283f5 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/apps_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/apps_client.go @@ -58,7 +58,7 @@ func NewAppsClient(subscriptionID string, credential azcore.TokenCredential, opt // BeginCreateOrUpdate - Create a new App or update an exiting App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -80,7 +80,7 @@ func (client *AppsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroup // CreateOrUpdate - Create a new App or update an exiting App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +120,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,7 +128,7 @@ func (client *AppsClient) createOrUpdateCreateRequest(ctx context.Context, resou // BeginDelete - Operation to delete an App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -148,7 +148,7 @@ func (client *AppsClient) BeginDelete(ctx context.Context, resourceGroupName str // Delete - Operation to delete an App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +188,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,7 +196,7 @@ func (client *AppsClient) deleteCreateRequest(ctx context.Context, resourceGroup // Get - Get an App and its properties. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -241,7 +241,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,7 +261,7 @@ func (client *AppsClient) getHandleResponse(resp *http.Response) (AppsClientGetR // GetResourceUploadURL - Get an resource upload URL for an App, which may be artifacts or source archive. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -307,7 +307,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,7 +323,7 @@ func (client *AppsClient) getResourceUploadURLHandleResponse(resp *http.Response } // NewListPager - Handles requests to list all resources in a Service. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -376,7 +376,7 @@ func (client *AppsClient) listCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -393,7 +393,7 @@ func (client *AppsClient) listHandleResponse(resp *http.Response) (AppsClientLis // BeginSetActiveDeployments - Set existing Deployment under the app as active // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -415,7 +415,7 @@ func (client *AppsClient) BeginSetActiveDeployments(ctx context.Context, resourc // SetActiveDeployments - Set existing Deployment under the app as active // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +455,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,7 +463,7 @@ func (client *AppsClient) setActiveDeploymentsCreateRequest(ctx context.Context, // BeginUpdate - Operation to update an exiting App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -484,7 +484,7 @@ func (client *AppsClient) BeginUpdate(ctx context.Context, resourceGroupName str // Update - Operation to update an exiting App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +524,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,7 +532,7 @@ func (client *AppsClient) updateCreateRequest(ctx context.Context, resourceGroup // ValidateDomain - Check the resource name is valid as well as not in use. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -578,7 +578,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..a88da688ef68 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/bindings_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/bindings_client.go @@ -58,7 +58,7 @@ func NewBindingsClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreateOrUpdate - Create a new Binding or update an exiting Binding. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -81,7 +81,7 @@ func (client *BindingsClient) BeginCreateOrUpdate(ctx context.Context, resourceG // CreateOrUpdate - Create a new Binding or update an exiting Binding. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +125,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,7 +133,7 @@ func (client *BindingsClient) createOrUpdateCreateRequest(ctx context.Context, r // BeginDelete - Operation to delete a Binding. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -154,7 +154,7 @@ func (client *BindingsClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Operation to delete a Binding. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +198,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,7 +206,7 @@ func (client *BindingsClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Get a Binding and its properties. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -256,7 +256,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,7 +272,7 @@ func (client *BindingsClient) getHandleResponse(resp *http.Response) (BindingsCl } // NewListPager - Handles requests to list all resources in an App. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -330,7 +330,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,7 +347,7 @@ func (client *BindingsClient) listHandleResponse(resp *http.Response) (BindingsC // BeginUpdate - Operation to update an exiting Binding. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -369,7 +369,7 @@ func (client *BindingsClient) BeginUpdate(ctx context.Context, resourceGroupName // Update - Operation to update an exiting Binding. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +413,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..a5ef3e7668e1 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/buildpackbinding_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/buildpackbinding_client.go @@ -58,7 +58,7 @@ func NewBuildpackBindingClient(subscriptionID string, credential azcore.TokenCre // BeginCreateOrUpdate - Create or update a buildpack binding. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -82,7 +82,7 @@ func (client *BuildpackBindingClient) BeginCreateOrUpdate(ctx context.Context, r // CreateOrUpdate - Create or update a buildpack binding. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +130,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,7 +138,7 @@ func (client *BuildpackBindingClient) createOrUpdateCreateRequest(ctx context.Co // BeginDelete - Operation to delete a Buildpack Binding // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -161,7 +161,7 @@ func (client *BuildpackBindingClient) BeginDelete(ctx context.Context, resourceG // Delete - Operation to delete a Buildpack Binding // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +209,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,7 +217,7 @@ func (client *BuildpackBindingClient) deleteCreateRequest(ctx context.Context, r // Get - Get a buildpack binding by name. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -272,7 +272,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,7 +288,7 @@ func (client *BuildpackBindingClient) getHandleResponse(resp *http.Response) (Bu } // NewListPager - Handles requests to list all buildpack bindings in a builder. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -351,7 +351,7 @@ func (client *BuildpackBindingClient) listCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-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..ea43c3ae89eb 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/buildservice_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/buildservice_client.go @@ -58,7 +58,7 @@ func NewBuildServiceClient(subscriptionID string, credential azcore.TokenCredent // CreateOrUpdateBuild - Create or update a KPack build. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -110,7 +110,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,7 +127,7 @@ func (client *BuildServiceClient) createOrUpdateBuildHandleResponse(resp *http.R // GetBuild - Get a KPack build. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -177,7 +177,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,7 +194,7 @@ func (client *BuildServiceClient) getBuildHandleResponse(resp *http.Response) (B // GetBuildResult - Get a KPack build result. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -250,7 +250,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,7 +267,7 @@ func (client *BuildServiceClient) getBuildResultHandleResponse(resp *http.Respon // GetBuildResultLog - Get a KPack build result log download URL. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -323,7 +323,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,7 +340,7 @@ func (client *BuildServiceClient) getBuildResultLogHandleResponse(resp *http.Res // GetBuildService - Get a build service resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -386,7 +386,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,7 +403,7 @@ func (client *BuildServiceClient) getBuildServiceHandleResponse(resp *http.Respo // GetResourceUploadURL - Get an resource upload URL for build service, which may be artifacts or source archive. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -449,7 +449,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,7 +466,7 @@ func (client *BuildServiceClient) getResourceUploadURLHandleResponse(resp *http. // GetSupportedBuildpack - Get the supported buildpack resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -517,7 +517,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,7 +534,7 @@ func (client *BuildServiceClient) getSupportedBuildpackHandleResponse(resp *http // GetSupportedStack - Get the supported stack resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -585,7 +585,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,7 +601,7 @@ func (client *BuildServiceClient) getSupportedStackHandleResponse(resp *http.Res } // NewListBuildResultsPager - List KPack build results. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -665,7 +665,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,7 +681,7 @@ func (client *BuildServiceClient) listBuildResultsHandleResponse(resp *http.Resp } // NewListBuildServicesPager - List build services resource. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -735,7 +735,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,7 +751,7 @@ func (client *BuildServiceClient) listBuildServicesHandleResponse(resp *http.Res } // NewListBuildsPager - List KPack builds. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -809,7 +809,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,7 +826,7 @@ func (client *BuildServiceClient) listBuildsHandleResponse(resp *http.Response) // ListSupportedBuildpacks - Get all supported buildpacks. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -872,7 +872,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,7 +889,7 @@ func (client *BuildServiceClient) listSupportedBuildpacksHandleResponse(resp *ht // ListSupportedStacks - Get all supported stacks. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -935,7 +935,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..ce340fe67225 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/buildserviceagentpool_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/buildserviceagentpool_client.go @@ -58,7 +58,7 @@ func NewBuildServiceAgentPoolClient(subscriptionID string, credential azcore.Tok // Get - Get build service agent pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -109,7 +109,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,7 +125,7 @@ func (client *BuildServiceAgentPoolClient) getHandleResponse(resp *http.Response } // NewListPager - List build service agent pool. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -184,7 +184,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,7 +201,7 @@ func (client *BuildServiceAgentPoolClient) listHandleResponse(resp *http.Respons // BeginUpdatePut - Create or update build service agent pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -224,7 +224,7 @@ func (client *BuildServiceAgentPoolClient) BeginUpdatePut(ctx context.Context, r // UpdatePut - Create or update build service agent pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +268,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..8c794eb4eb7d 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/buildservicebuilder_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/buildservicebuilder_client.go @@ -58,7 +58,7 @@ func NewBuildServiceBuilderClient(subscriptionID string, credential azcore.Token // BeginCreateOrUpdate - Create or update a KPack builder. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -81,7 +81,7 @@ func (client *BuildServiceBuilderClient) BeginCreateOrUpdate(ctx context.Context // CreateOrUpdate - Create or update a KPack builder. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +125,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,7 +133,7 @@ func (client *BuildServiceBuilderClient) createOrUpdateCreateRequest(ctx context // BeginDelete - Delete a KPack builder. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -155,7 +155,7 @@ func (client *BuildServiceBuilderClient) BeginDelete(ctx context.Context, resour // Delete - Delete a KPack builder. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +199,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,7 +207,7 @@ func (client *BuildServiceBuilderClient) deleteCreateRequest(ctx context.Context // Get - Get a KPack builder. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -257,7 +257,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,7 +273,7 @@ func (client *BuildServiceBuilderClient) getHandleResponse(resp *http.Response) } // NewListPager - List KPack builders result. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -332,7 +332,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,7 +349,7 @@ 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 +// 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. @@ -400,7 +400,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..22403152419d 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/certificates_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/certificates_client.go @@ -58,7 +58,7 @@ func NewCertificatesClient(subscriptionID string, credential azcore.TokenCredent // BeginCreateOrUpdate - Create or update certificate resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -80,7 +80,7 @@ func (client *CertificatesClient) BeginCreateOrUpdate(ctx context.Context, resou // CreateOrUpdate - Create or update certificate resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +120,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,7 +128,7 @@ func (client *CertificatesClient) createOrUpdateCreateRequest(ctx context.Contex // BeginDelete - Delete the certificate resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -149,7 +149,7 @@ func (client *CertificatesClient) BeginDelete(ctx context.Context, resourceGroup // Delete - Delete the certificate resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +189,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,7 +197,7 @@ func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resou // Get - Get the certificate resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -242,7 +242,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,7 +258,7 @@ func (client *CertificatesClient) getHandleResponse(resp *http.Response) (Certif } // NewListPager - List all the certificates of one user. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -311,7 +311,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..2dee731aba4e 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/configservers_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/configservers_client.go @@ -58,7 +58,7 @@ func NewConfigServersClient(subscriptionID string, credential azcore.TokenCreden // Get - Get the config server and its properties. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -98,7 +98,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,7 +115,7 @@ func (client *ConfigServersClient) getHandleResponse(resp *http.Response) (Confi // BeginUpdatePatch - Update the config server. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -136,7 +136,7 @@ func (client *ConfigServersClient) BeginUpdatePatch(ctx context.Context, resourc // UpdatePatch - Update the config server. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +172,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,7 +180,7 @@ func (client *ConfigServersClient) updatePatchCreateRequest(ctx context.Context, // BeginUpdatePut - Update the config server. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -201,7 +201,7 @@ func (client *ConfigServersClient) BeginUpdatePut(ctx context.Context, resourceG // UpdatePut - Update the config server. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +237,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,7 +245,7 @@ func (client *ConfigServersClient) updatePutCreateRequest(ctx context.Context, r // BeginValidate - Check if the config server settings are valid. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -268,7 +268,7 @@ func (client *ConfigServersClient) BeginValidate(ctx context.Context, resourceGr // Validate - Check if the config server settings are valid. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +304,7 @@ func (client *ConfigServersClient) validateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-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..6d60e4330fb0 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/configurationservices_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/configurationservices_client.go @@ -59,7 +59,7 @@ 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 +// 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. @@ -82,7 +82,7 @@ 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 +122,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,7 +130,7 @@ func (client *ConfigurationServicesClient) createOrUpdateCreateRequest(ctx conte // BeginDelete - Disable the default Application Configuration Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -151,7 +151,7 @@ func (client *ConfigurationServicesClient) BeginDelete(ctx context.Context, reso // Delete - Disable the default Application Configuration Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +191,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,7 +199,7 @@ func (client *ConfigurationServicesClient) deleteCreateRequest(ctx context.Conte // Get - Get the Application Configuration Service and its properties. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -245,7 +245,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,7 +261,7 @@ func (client *ConfigurationServicesClient) getHandleResponse(resp *http.Response } // NewListPager - Handles requests to list all resources in a Service. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -315,7 +315,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,7 +332,7 @@ func (client *ConfigurationServicesClient) listHandleResponse(resp *http.Respons // BeginValidate - Check if the Application Configuration Service settings are valid. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -356,7 +356,7 @@ func (client *ConfigurationServicesClient) BeginValidate(ctx context.Context, re // Validate - Check if the Application Configuration Service settings are valid. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +396,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..25bdd96dc6b8 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/customdomains_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/customdomains_client.go @@ -58,7 +58,7 @@ func NewCustomDomainsClient(subscriptionID string, credential azcore.TokenCreden // BeginCreateOrUpdate - Create or update custom domain of one lifecycle application. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -81,7 +81,7 @@ func (client *CustomDomainsClient) BeginCreateOrUpdate(ctx context.Context, reso // CreateOrUpdate - Create or update custom domain of one lifecycle application. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +125,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,7 +133,7 @@ func (client *CustomDomainsClient) createOrUpdateCreateRequest(ctx context.Conte // BeginDelete - Delete the custom domain of one lifecycle application. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -155,7 +155,7 @@ func (client *CustomDomainsClient) BeginDelete(ctx context.Context, resourceGrou // Delete - Delete the custom domain of one lifecycle application. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +199,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,7 +207,7 @@ func (client *CustomDomainsClient) deleteCreateRequest(ctx context.Context, reso // Get - Get the custom domain of one lifecycle application. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -257,7 +257,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,7 +273,7 @@ func (client *CustomDomainsClient) getHandleResponse(resp *http.Response) (Custo } // NewListPager - List the custom domains of one lifecycle application. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -331,7 +331,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,7 +348,7 @@ func (client *CustomDomainsClient) listHandleResponse(resp *http.Response) (Cust // BeginUpdate - Update custom domain of one lifecycle application. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -371,7 +371,7 @@ func (client *CustomDomainsClient) BeginUpdate(ctx context.Context, resourceGrou // Update - Update custom domain of one lifecycle application. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +415,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..c871c936bf7b 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/deployments_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/deployments_client.go @@ -58,7 +58,7 @@ func NewDeploymentsClient(subscriptionID string, credential azcore.TokenCredenti // BeginCreateOrUpdate - Create a new Deployment or update an exiting Deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -81,7 +81,7 @@ func (client *DeploymentsClient) BeginCreateOrUpdate(ctx context.Context, resour // CreateOrUpdate - Create a new Deployment or update an exiting Deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +125,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,7 +133,7 @@ func (client *DeploymentsClient) createOrUpdateCreateRequest(ctx context.Context // BeginDelete - Operation to delete a Deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -154,7 +154,7 @@ func (client *DeploymentsClient) BeginDelete(ctx context.Context, resourceGroupN // Delete - Operation to delete a Deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +198,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,7 +206,7 @@ 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 +// 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. @@ -228,7 +228,7 @@ 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 +272,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,7 +280,7 @@ 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 +// 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. @@ -302,7 +302,7 @@ 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 +346,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,7 +357,7 @@ 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 +// 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. @@ -380,7 +380,7 @@ func (client *DeploymentsClient) BeginGenerateHeapDump(ctx context.Context, reso // GenerateHeapDump - Generate Heap Dump // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +424,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,7 +432,7 @@ func (client *DeploymentsClient) generateHeapDumpCreateRequest(ctx context.Conte // BeginGenerateThreadDump - Generate Thread Dump // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -455,7 +455,7 @@ func (client *DeploymentsClient) BeginGenerateThreadDump(ctx context.Context, re // GenerateThreadDump - Generate Thread Dump // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +499,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,7 +507,7 @@ func (client *DeploymentsClient) generateThreadDumpCreateRequest(ctx context.Con // Get - Get a Deployment and its properties. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -557,7 +557,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,7 +574,7 @@ func (client *DeploymentsClient) getHandleResponse(resp *http.Response) (Deploym // GetLogFileURL - Get deployment log file URL // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -625,7 +625,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,7 +642,7 @@ 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 +// 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. @@ -693,7 +693,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,7 +709,7 @@ func (client *DeploymentsClient) getRemoteDebuggingConfigHandleResponse(resp *ht } // NewListPager - Handles requests to list all resources in an App. -// Generated from API version 2022-11-01-preview +// 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. @@ -767,7 +767,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,7 +788,7 @@ func (client *DeploymentsClient) listHandleResponse(resp *http.Response) (Deploy } // NewListForClusterPager - List deployments for a certain service -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -842,7 +842,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,7 +864,7 @@ func (client *DeploymentsClient) listForClusterHandleResponse(resp *http.Respons // BeginRestart - Restart the deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -886,7 +886,7 @@ func (client *DeploymentsClient) BeginRestart(ctx context.Context, resourceGroup // Restart - Restart the deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +930,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,7 +938,7 @@ func (client *DeploymentsClient) restartCreateRequest(ctx context.Context, resou // BeginStart - Start the deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -959,7 +959,7 @@ func (client *DeploymentsClient) BeginStart(ctx context.Context, resourceGroupNa // Start - Start the deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +1003,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,7 +1011,7 @@ func (client *DeploymentsClient) startCreateRequest(ctx context.Context, resourc // BeginStartJFR - Start JFR // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -1034,7 +1034,7 @@ func (client *DeploymentsClient) BeginStartJFR(ctx context.Context, resourceGrou // StartJFR - Start JFR // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +1078,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,7 +1086,7 @@ func (client *DeploymentsClient) startJFRCreateRequest(ctx context.Context, reso // BeginStop - Stop the deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -1107,7 +1107,7 @@ func (client *DeploymentsClient) BeginStop(ctx context.Context, resourceGroupNam // Stop - Stop the deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +1151,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,7 +1159,7 @@ func (client *DeploymentsClient) stopCreateRequest(ctx context.Context, resource // BeginUpdate - Operation to update an exiting Deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -1181,7 +1181,7 @@ func (client *DeploymentsClient) BeginUpdate(ctx context.Context, resourceGroupN // Update - Operation to update an exiting Deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +1225,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..2d6a3f5f0148 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/gatewaycustomdomains_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/gatewaycustomdomains_client.go @@ -58,7 +58,7 @@ 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 +// 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. @@ -81,7 +81,7 @@ 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 +125,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,7 +133,7 @@ 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 +// 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. @@ -155,7 +155,7 @@ 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 +199,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,7 +207,7 @@ 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 +// 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. @@ -258,7 +258,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,7 +274,7 @@ 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 +// 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. @@ -333,7 +333,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..d601c92eea60 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/gatewayrouteconfigs_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/gatewayrouteconfigs_client.go @@ -59,7 +59,7 @@ 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 +// 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. @@ -83,7 +83,7 @@ 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 +127,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,7 +135,7 @@ 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 +// 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. @@ -157,7 +157,7 @@ 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 +201,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,7 +209,7 @@ 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 +// 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. @@ -259,7 +259,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,7 +275,7 @@ 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 +// 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. @@ -334,7 +334,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..9169c68554c4 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/gateways_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/gateways_client.go @@ -58,7 +58,7 @@ 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 +// 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. @@ -80,7 +80,7 @@ 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 +120,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,7 +128,7 @@ 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 +// 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. @@ -148,7 +148,7 @@ 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 +188,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,7 +196,7 @@ 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 +// 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. @@ -241,7 +241,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,7 +257,7 @@ 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 +// 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. @@ -310,7 +310,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,71 +325,9 @@ 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 +// 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. @@ -435,7 +373,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..97b2ffa9917e 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/models.go +++ b/sdk/resourcemanager/appplatform/armappplatform/models.go @@ -175,98 +175,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. @@ -357,200 +265,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. @@ -821,9 +541,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"` @@ -1074,15 +791,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"` } @@ -1307,9 +1018,6 @@ type CertificatesClientListOptions struct { // ClusterResourceProperties - Service properties payload type ClusterResourceProperties struct { - // Purchasing 3rd party product of the Service resource. - MarketplaceResource *MarketplaceResource `json:"marketplaceResource,omitempty"` - // Network profile of the Service NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` @@ -1824,84 +1532,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 @@ -2122,135 +1752,6 @@ type DeploymentsClientListOptions struct { 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 @@ -2457,15 +1958,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 +1986,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 +2036,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"` } @@ -2643,11 +2118,6 @@ 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. type GatewaysClientListOptions struct { // placeholder for future optional parameters @@ -2892,18 +2362,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 @@ -3163,77 +2621,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 { diff --git a/sdk/resourcemanager/appplatform/armappplatform/models_serde.go b/sdk/resourcemanager/appplatform/armappplatform/models_serde.go index c7f381620336..6589d358a89f 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/models_serde.go +++ b/sdk/resourcemanager/appplatform/armappplatform/models_serde.go @@ -316,181 +316,6 @@ 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{}) @@ -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) { +// MarshalJSON implements the json.Marshaller interface for type ApplicationInsightsAgentVersions. +func (a ApplicationInsightsAgentVersions) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "instances", a.Instances) - populate(objectMap, "name", a.Name) - populate(objectMap, "resourceRequests", a.ResourceRequests) + 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) { +// MarshalJSON implements the json.Marshaller interface for type AvailableOperations. +func (a AvailableOperations) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "name", a.Name) - populate(objectMap, "status", a.Status) + 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) { +// MarshalJSON implements the json.Marshaller interface for type AvailableRuntimeVersions. +func (a AvailableRuntimeVersions) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "components", a.Components) - populate(objectMap, "provisioningState", a.ProvisioningState) + 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) { +// MarshalJSON implements the json.Marshaller interface for type AzureFileVolume. +func (a AzureFileVolume) 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) + 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,408 +659,468 @@ func (a *ApplicationAcceleratorResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ApplicationAcceleratorResourceCollection. -func (a ApplicationAcceleratorResourceCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BindingResource. +func (b BindingResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "type", b.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type 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) { +// MarshalJSON implements the json.Marshaller interface for type BindingResourceCollection. +func (b BindingResourceCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "cpu", a.CPU) - populate(objectMap, "instanceCount", a.InstanceCount) - populate(objectMap, "memory", a.Memory) + 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) { +// MarshalJSON implements the json.Marshaller interface for type BindingResourceProperties. +func (b BindingResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "java", a.Java) + 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 ApplicationInsightsAgentVersions. -func (a *ApplicationInsightsAgentVersions) 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 "java": - err = unpopulate(val, "Java", &a.Java) + case "bindingParameters": + err = unpopulate(val, "BindingParameters", &b.BindingParameters) + delete(rawMsg, key) + case "createdAt": + err = unpopulate(val, "CreatedAt", &b.CreatedAt) + delete(rawMsg, key) + case "generatedProperties": + err = unpopulate(val, "GeneratedProperties", &b.GeneratedProperties) + delete(rawMsg, key) + case "key": + err = unpopulate(val, "Key", &b.Key) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &b.ResourceID) + delete(rawMsg, key) + case "resourceName": + err = unpopulate(val, "ResourceName", &b.ResourceName) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &b.ResourceType) + delete(rawMsg, key) + case "updatedAt": + err = unpopulate(val, "UpdatedAt", &b.UpdatedAt) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ApplicationLiveViewComponent. -func (a ApplicationLiveViewComponent) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Build. +func (b Build) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "instances", a.Instances) - populate(objectMap, "name", &a.Name) - populate(objectMap, "resourceRequests", a.ResourceRequests) + 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 ApplicationLiveViewComponent. -func (a *ApplicationLiveViewComponent) 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 "instances": - err = unpopulate(val, "Instances", &a.Instances) + 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 "resourceRequests": - err = unpopulate(val, "ResourceRequests", &a.ResourceRequests) + 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 ApplicationLiveViewInstance. -func (a ApplicationLiveViewInstance) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildCollection. +func (b BuildCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "name", a.Name) - populate(objectMap, "status", a.Status) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) 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 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 "name": - err = unpopulate(val, "Name", &a.Name) + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &a.Status) + 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 ApplicationLiveViewProperties. -func (a ApplicationLiveViewProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildProperties. +func (b BuildProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "components", a.Components) - populate(objectMap, "provisioningState", a.ProvisioningState) + 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 ApplicationLiveViewProperties. -func (a *ApplicationLiveViewProperties) 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 "components": - err = unpopulate(val, "Components", &a.Components) + case "agentPool": + err = unpopulate(val, "AgentPool", &b.AgentPool) + delete(rawMsg, key) + case "builder": + err = unpopulate(val, "Builder", &b.Builder) + delete(rawMsg, key) + case "env": + err = unpopulate(val, "Env", &b.Env) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.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", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ApplicationLiveViewResource. -func (a ApplicationLiveViewResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildResourceRequests. +func (b BuildResourceRequests) 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) + populate(objectMap, "cpu", b.CPU) + populate(objectMap, "memory", b.Memory) 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 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 "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) + case "cpu": + err = unpopulate(val, "CPU", &b.CPU) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) + 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 ApplicationLiveViewResourceCollection. -func (a ApplicationLiveViewResourceCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildResult. +func (b BuildResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "type", b.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationLiveViewResourceCollection. -func (a *ApplicationLiveViewResourceCollection) 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 "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 ApplicationLiveViewResourceRequests. -func (a ApplicationLiveViewResourceRequests) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildResultCollection. +func (b BuildResultCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "cpu", a.CPU) - populate(objectMap, "instanceCount", a.InstanceCount) - populate(objectMap, "memory", a.Memory) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) 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 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 "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 AvailableOperations. -func (a AvailableOperations) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildResultLog. +func (b BuildResultLog) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) + populate(objectMap, "blobUrl", b.BlobURL) 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 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 "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, 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 AvailableRuntimeVersions. -func (a AvailableRuntimeVersions) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildResultProperties. +func (b BuildResultProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "value", a.Value) + 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 AvailableRuntimeVersions. -func (a *AvailableRuntimeVersions) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildResultProperties. +func (b *BuildResultProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &a.Value) + case "buildPodName": + err = unpopulate(val, "BuildPodName", &b.BuildPodName) delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + case "buildStages": + err = unpopulate(val, "BuildStages", &b.BuildStages) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type AzureFileVolume. -func (a AzureFileVolume) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildResultUserSourceInfo. +func (b BuildResultUserSourceInfo) 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 + 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 AzureFileVolume. -func (a *AzureFileVolume) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildResultUserSourceInfo. +func (b *BuildResultUserSourceInfo) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) + return fmt.Errorf("unmarshalling type %T: %v", b, err) } for key, val := range rawMsg { var err error switch key { - case "mountOptions": - err = unpopulate(val, "MountOptions", &a.MountOptions) - delete(rawMsg, key) - case "mountPath": - err = unpopulate(val, "MountPath", &a.MountPath) - delete(rawMsg, key) - case "readOnly": - err = unpopulate(val, "ReadOnly", &a.ReadOnly) - delete(rawMsg, key) - case "shareName": - err = unpopulate(val, "ShareName", &a.ShareName) + 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) { +// 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) @@ -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) { +// MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolProperties. +func (b BuildServiceAgentPoolProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", b.NextLink) - populate(objectMap, "value", b.Value) + 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) { +// MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolResource. +func (b BuildServiceAgentPoolResource) 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) + 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]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 "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) { +// MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolSizeProperties. +func (b BuildServiceAgentPoolSizeProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "id", b.ID) + 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) { +// MarshalJSON implements the json.Marshaller interface for type BuildServiceCollection. +func (b BuildServiceCollection) 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 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) { +// MarshalJSON implements the json.Marshaller interface for type BuildServiceProperties. +func (b BuildServiceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "agentPool", b.AgentPool) - populate(objectMap, "builder", b.Builder) - populate(objectMap, "env", b.Env) + 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) { +// 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 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,19 +1399,16 @@ func (b *BuildResourceRequests) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type BuildResult. -func (b BuildResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type BuildStageProperties. +func (b BuildStageProperties) 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) + 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 { +// 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) @@ -1555,20 +1416,11 @@ func (b *BuildResult) 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 "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) { +// MarshalJSON implements the json.Marshaller interface for type BuilderProperties. +func (b BuilderProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", b.NextLink) - populate(objectMap, "value", b.Value) + 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) { +// MarshalJSON implements the json.Marshaller interface for type BuilderResource. +func (b BuilderResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "buildPodName", b.BuildPodName) - populate(objectMap, "buildStages", b.BuildStages) - populate(objectMap, "error", b.Error) + 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) { +// MarshalJSON implements the json.Marshaller interface for type BuilderResourceCollection. +func (b BuilderResourceCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "buildResultId", b.BuildResultID) - objectMap["type"] = "BuildResult" - populate(objectMap, "version", b.Version) + 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) { +// MarshalJSON implements the json.Marshaller interface for type BuildpackBindingLaunchProperties. +func (b BuildpackBindingLaunchProperties) 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) + 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) { +// MarshalJSON implements the json.Marshaller interface for type BuildpackBindingProperties. +func (b BuildpackBindingProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "poolSize", b.PoolSize) + 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,8 +1605,8 @@ func (b *BuildServiceAgentPoolProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolResource. -func (b BuildServiceAgentPoolResource) MarshalJSON() ([]byte, error) { +// 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) @@ -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) { +// 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 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) @@ -1928,789 +1679,81 @@ func (b *BuildServiceCollection) UnmarshalJSON(data []byte) error { 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) +// 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 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) { +// MarshalJSON implements the json.Marshaller interface for type BuildpacksGroupProperties. +func (b BuildpacksGroupProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "gitProperty", c.GitProperty) + 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) { +// MarshalJSON implements the json.Marshaller interface for type CertificateProperties. +func (c CertificateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "messages", c.Messages) - populate(objectMap, "name", c.Name) - populate(objectMap, "uri", c.URI) + 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) { +// MarshalJSON implements the json.Marshaller interface for type CertificateResource. +func (c CertificateResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "details", c.Details) - populate(objectMap, "isValid", c.IsValid) + 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) { +// MarshalJSON implements the json.Marshaller interface for type CertificateResourceCollection. +func (c CertificateResourceCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "repositories", c.Repositories) + 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) { +// MarshalJSON implements the json.Marshaller interface for type ClusterResourceProperties. +func (c ClusterResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "gitReposValidationResult", c.GitReposValidationResult) - populate(objectMap, "isValid", c.IsValid) + 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) { +// 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, "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) { +// MarshalJSON implements the json.Marshaller interface for type ConfigServerProperties. +func (c ConfigServerProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "instances", c.Instances) + 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,8 +2023,8 @@ func (c *ConfigurationServiceProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceResource. -func (c ConfigurationServiceResource) MarshalJSON() ([]byte, error) { +// 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) @@ -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) { +// MarshalJSON implements the json.Marshaller interface for type ConfigServerSettings. +func (c ConfigServerSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", c.NextLink) - populate(objectMap, "value", c.Value) + 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) { +// MarshalJSON implements the json.Marshaller interface for type ConfigServerSettingsErrorRecord. +func (c ConfigServerSettingsErrorRecord) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "cpu", c.CPU) - populate(objectMap, "instanceCount", c.InstanceCount) - populate(objectMap, "memory", c.Memory) + 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) { +// MarshalJSON implements the json.Marshaller interface for type ConfigServerSettingsValidateResult. +func (c ConfigServerSettingsValidateResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "gitProperty", c.GitProperty) + 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) { +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceGitProperty. +func (c ConfigurationServiceGitProperty) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "gitPropertyValidationResult", c.GitPropertyValidationResult) + 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) { +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceGitPropertyValidateResult. +func (c ConfigurationServiceGitPropertyValidateResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "disableProbe", c.DisableProbe) + 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) { +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceGitRepository. +func (c ConfigurationServiceGitRepository) 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" + 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) { +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceInstance. +func (c ConfigurationServiceInstance) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "customContainer", c.CustomContainer) - objectMap["type"] = "Container" - populate(objectMap, "version", c.Version) + 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) { +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceProperties. +func (c ConfigurationServiceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "appName", c.AppName) - populate(objectMap, "certName", c.CertName) + 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,8 +2354,8 @@ func (c *CustomDomainProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CustomDomainResource. -func (c CustomDomainResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceResource. +func (c ConfigurationServiceResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) populate(objectMap, "id", c.ID) populate(objectMap, "name", c.Name) @@ -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) { +// 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) 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) { +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceResourceRequests. +func (c ConfigurationServiceResourceRequests) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "name", c.Name) + 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) { +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceSettings. +func (c ConfigurationServiceSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "isValid", c.IsValid) - populate(objectMap, "message", c.Message) + 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) { +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceSettingsValidateResult. +func (c ConfigurationServiceSettingsValidateResult) 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 + 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) { +// MarshalJSON implements the json.Marshaller interface for type ContainerProbeSettings. +func (c ContainerProbeSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "customPersistentDiskProperties", c.CustomPersistentDiskProperties) - populate(objectMap, "storageId", c.StorageID) + 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) { +// MarshalJSON implements the json.Marshaller interface for type ContentCertificateProperties. +func (c ContentCertificateProperties) 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) + 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) { +// MarshalJSON implements the json.Marshaller interface for type CustomContainer. +func (c CustomContainer) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", c.NextLink) - populate(objectMap, "value", c.Value) + 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,42 +2628,23 @@ 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 "state": - err = unpopulate(val, "State", &c.State) + case "languageFramework": + err = unpopulate(val, "LanguageFramework", &c.LanguageFramework) + delete(rawMsg, key) + case "server": + err = unpopulate(val, "Server", &c.Server) delete(rawMsg, key) } if err != nil { @@ -3693,332 +2654,296 @@ func (c *CustomizedAcceleratorValidateResult) UnmarshalJSON(data []byte) error { 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) +// 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) 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) { +// MarshalJSON implements the json.Marshaller interface for type CustomDomainProperties. +func (c CustomDomainProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "deployments", d.Deployments) + 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) { +// MarshalJSON implements the json.Marshaller interface for type CustomDomainResource. +func (c CustomDomainResource) 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) + 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) { +// MarshalJSON implements the json.Marshaller interface for type CustomDomainResourceCollection. +func (c CustomDomainResourceCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", d.NextLink) - populate(objectMap, "value", d.Value) + 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) { +// MarshalJSON implements the json.Marshaller interface for type CustomDomainValidatePayload. +func (c CustomDomainValidatePayload) 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) + 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) { +// MarshalJSON implements the json.Marshaller interface for type CustomDomainValidateResult. +func (c CustomDomainValidateResult) 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) + 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) { +// MarshalJSON implements the json.Marshaller interface for type CustomPersistentDiskProperties. +func (c CustomPersistentDiskProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "route", d.Route) - populate(objectMap, "state", d.State) + 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 "state": - err = unpopulate(val, "State", &d.State) + case "readOnly": + err = unpopulate(val, "ReadOnly", &c.ReadOnly) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", 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) { +// MarshalJSON implements the json.Marshaller interface for type CustomPersistentDiskResource. +func (c CustomPersistentDiskResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "applicationAccelerator", d.ApplicationAccelerator) - populate(objectMap, "applicationLiveView", d.ApplicationLiveView) + 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) { +// 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 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) { +// MarshalJSON implements the json.Marshaller interface for type DeploymentList. +func (d DeploymentList) 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) + 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) { +// 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) 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) { +// 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) 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) { +// MarshalJSON implements the json.Marshaller interface for type DeploymentResourceProperties. +func (d DeploymentResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "cpu", d.CPU) - populate(objectMap, "instanceCount", d.InstanceCount) - populate(objectMap, "memory", d.Memory) + 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) { +// MarshalJSON implements the json.Marshaller interface for type DeploymentSettings. +func (d DeploymentSettings) 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) + 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 "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 "metadataUrl": - err = unpopulate(val, "MetadataURL", &d.MetadataURL) + case "startupProbe": + err = unpopulate(val, "StartupProbe", &d.StartupProbe) delete(rawMsg, key) - case "scopes": - err = unpopulate(val, "Scopes", &d.Scopes) + case "terminationGracePeriodSeconds": + err = unpopulate(val, "TerminationGracePeriodSeconds", &d.TerminationGracePeriodSeconds) delete(rawMsg, key) } if err != nil { @@ -4687,9 +3632,7 @@ func (g *GatewayOperatorResourceRequests) UnmarshalJSON(data []byte) error { func (g GatewayProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) 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,37 +3691,6 @@ 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{}) @@ -4925,13 +3831,10 @@ func (g *GatewayRouteConfigOpenAPIProperties) UnmarshalJSON(data []byte) error { func (g GatewayRouteConfigProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) 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) @@ -5534,41 +4428,6 @@ 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{}) @@ -6104,131 +4963,6 @@ 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{}) diff --git a/sdk/resourcemanager/appplatform/armappplatform/monitoringsettings_client.go b/sdk/resourcemanager/appplatform/armappplatform/monitoringsettings_client.go index 10ecbbea15d1..93a09657ad79 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/monitoringsettings_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/monitoringsettings_client.go @@ -58,7 +58,7 @@ func NewMonitoringSettingsClient(subscriptionID string, credential azcore.TokenC // Get - Get the Monitoring Setting and its properties. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -98,7 +98,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,7 +115,7 @@ func (client *MonitoringSettingsClient) getHandleResponse(resp *http.Response) ( // BeginUpdatePatch - Update the Monitoring Setting. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -136,7 +136,7 @@ func (client *MonitoringSettingsClient) BeginUpdatePatch(ctx context.Context, re // UpdatePatch - Update the Monitoring Setting. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +172,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,7 +180,7 @@ func (client *MonitoringSettingsClient) updatePatchCreateRequest(ctx context.Con // BeginUpdatePut - Update the Monitoring Setting. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -201,7 +201,7 @@ func (client *MonitoringSettingsClient) BeginUpdatePut(ctx context.Context, reso // UpdatePut - Update the Monitoring Setting. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +237,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..8b516f69f58f 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/operations_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/operations_client.go @@ -50,7 +50,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO } // NewListPager - Lists all of the available REST API operations of the Microsoft.AppPlatform provider. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-12-01 // options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -88,7 +88,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..ec4460f7cb9b 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/polymorphic_helpers.go +++ b/sdk/resourcemanager/appplatform/armappplatform/polymorphic_helpers.go @@ -11,28 +11,6 @@ package armappplatform import "encoding/json" -func unmarshalAcceleratorAuthSettingClassification(rawMsg json.RawMessage) (AcceleratorAuthSettingClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]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 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..ac98c61a0129 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/response_types.go +++ b/sdk/resourcemanager/appplatform/armappplatform/response_types.go @@ -54,46 +54,6 @@ 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. type AppsClientCreateOrUpdateResponse struct { AppResource @@ -374,31 +334,6 @@ 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. type DeploymentsClientCreateOrUpdateResponse struct { DeploymentResource @@ -479,26 +414,6 @@ 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. type GatewayCustomDomainsClientCreateOrUpdateResponse struct { GatewayCustomDomainResource @@ -554,12 +469,6 @@ 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. type GatewaysClientListResponse struct { GatewayResourceCollection @@ -590,26 +499,6 @@ 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 diff --git a/sdk/resourcemanager/appplatform/armappplatform/runtimeversions_client.go b/sdk/resourcemanager/appplatform/armappplatform/runtimeversions_client.go index bfc2bae5af9f..a5ae97babc4a 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/runtimeversions_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/runtimeversions_client.go @@ -51,7 +51,7 @@ func NewRuntimeVersionsClient(credential azcore.TokenCredential, options *arm.Cl // ListRuntimeVersions - Lists all of the available runtime versions supported by Microsoft.AppPlatform provider. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-12-01 // options - RuntimeVersionsClientListRuntimeVersionsOptions contains the optional parameters for the RuntimeVersionsClient.ListRuntimeVersions // method. func (client *RuntimeVersionsClient) ListRuntimeVersions(ctx context.Context, options *RuntimeVersionsClientListRuntimeVersionsOptions) (RuntimeVersionsClientListRuntimeVersionsResponse, error) { @@ -77,7 +77,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..e1a5d41d464a 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/serviceregistries_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/serviceregistries_client.go @@ -58,7 +58,7 @@ func NewServiceRegistriesClient(subscriptionID string, credential azcore.TokenCr // BeginCreateOrUpdate - Create the default Service Registry or update the existing Service Registry. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -79,7 +79,7 @@ func (client *ServiceRegistriesClient) BeginCreateOrUpdate(ctx context.Context, // CreateOrUpdate - Create the default Service Registry or update the existing Service Registry. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +119,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,7 +127,7 @@ func (client *ServiceRegistriesClient) createOrUpdateCreateRequest(ctx context.C // BeginDelete - Disable the default Service Registry. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -148,7 +148,7 @@ func (client *ServiceRegistriesClient) BeginDelete(ctx context.Context, resource // Delete - Disable the default Service Registry. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +188,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,7 +196,7 @@ func (client *ServiceRegistriesClient) deleteCreateRequest(ctx context.Context, // Get - Get the Service Registry and its properties. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -241,7 +241,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,7 +257,7 @@ func (client *ServiceRegistriesClient) getHandleResponse(resp *http.Response) (S } // NewListPager - Handles requests to list all resources in a Service. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -310,7 +310,7 @@ func (client *ServiceRegistriesClient) listCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-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..c30900ccc280 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/services_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/services_client.go @@ -58,7 +58,7 @@ func NewServicesClient(subscriptionID string, credential azcore.TokenCredential, // CheckNameAvailability - Checks that the resource name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-12-01 // location - the region // availabilityParameters - Parameters supplied to the operation. // options - ServicesClientCheckNameAvailabilityOptions contains the optional parameters for the ServicesClient.CheckNameAvailability @@ -94,7 +94,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,7 +111,7 @@ func (client *ServicesClient) checkNameAvailabilityHandleResponse(resp *http.Res // BeginCreateOrUpdate - Create a new Service or update an exiting Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -132,7 +132,7 @@ func (client *ServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceG // CreateOrUpdate - Create a new Service or update an exiting Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +168,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,7 +176,7 @@ func (client *ServicesClient) createOrUpdateCreateRequest(ctx context.Context, r // BeginDelete - Operation to delete a Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -195,7 +195,7 @@ func (client *ServicesClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Operation to delete a Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +231,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,7 +239,7 @@ func (client *ServicesClient) deleteCreateRequest(ctx context.Context, resourceG // DisableTestEndpoint - Disable test endpoint functionality for a Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -280,7 +280,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,7 +288,7 @@ func (client *ServicesClient) disableTestEndpointCreateRequest(ctx context.Conte // EnableTestEndpoint - Enable test endpoint functionality for a Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -329,7 +329,7 @@ func (client *ServicesClient) enableTestEndpointCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -346,7 +346,7 @@ func (client *ServicesClient) enableTestEndpointHandleResponse(resp *http.Respon // Get - Get a Service and its properties. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -386,7 +386,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,7 +402,7 @@ func (client *ServicesClient) getHandleResponse(resp *http.Response) (ServicesCl } // NewListPager - Handles requests to list all resources in a resource group. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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.List method. @@ -450,7 +450,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,7 +466,7 @@ func (client *ServicesClient) listHandleResponse(resp *http.Response) (ServicesC } // NewListBySubscriptionPager - Handles requests to list all resources in a subscription. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-12-01 // options - ServicesClientListBySubscriptionOptions contains the optional parameters for the ServicesClient.ListBySubscription // method. func (client *ServicesClient) NewListBySubscriptionPager(options *ServicesClientListBySubscriptionOptions) *runtime.Pager[ServicesClientListBySubscriptionResponse] { @@ -509,7 +509,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,7 +526,7 @@ func (client *ServicesClient) listBySubscriptionHandleResponse(resp *http.Respon // ListTestKeys - List test keys for a Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -566,7 +566,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,7 +583,7 @@ func (client *ServicesClient) listTestKeysHandleResponse(resp *http.Response) (S // RegenerateTestKey - Regenerate a test key for a Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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. @@ -625,7 +625,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,7 +642,7 @@ 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 +// 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. @@ -661,7 +661,7 @@ 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 +697,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,7 +705,7 @@ 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 +// 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. @@ -724,7 +724,7 @@ 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 +760,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,7 +768,7 @@ 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 +// 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. @@ -788,7 +788,7 @@ func (client *ServicesClient) BeginUpdate(ctx context.Context, resourceGroupName // Update - Operation to update an exiting Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-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 +824,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..5210e283317b 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/skus_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/skus_client.go @@ -57,7 +57,7 @@ func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, opt } // NewListPager - Lists all of the available skus of the Microsoft.AppPlatform provider. -// Generated from API version 2022-11-01-preview +// Generated from API version 2022-12-01 // options - SKUsClientListOptions contains the optional parameters for the SKUsClient.List method. func (client *SKUsClient) NewListPager(options *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SKUsClientListResponse]{ @@ -99,7 +99,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..5fc1ae097bfa 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/storages_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/storages_client.go @@ -58,7 +58,7 @@ 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 +// 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. @@ -80,7 +80,7 @@ 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 +120,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,7 +128,7 @@ 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 +// 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. @@ -148,7 +148,7 @@ 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 +188,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,7 +196,7 @@ 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 +// 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. @@ -241,7 +241,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,7 +257,7 @@ 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 +// 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. @@ -310,7 +310,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 - } - } -}