diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/CHANGELOG.md b/sdk/resourcemanager/healthcareapis/armhealthcareapis/CHANGELOG.md index 697e3c2d6880..e01588466da2 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/CHANGELOG.md +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/CHANGELOG.md @@ -1,12 +1,19 @@ # Release History -## 1.1.0-beta.1 (2022-05-19) +## 1.1.0 (2022-07-26) ### Features Added +- New struct `CorsConfiguration` - New struct `FhirServiceImportConfiguration` - New struct `ServiceImportConfigurationInfo` -- New field `ImportConfiguration` in struct `ServicesProperties` +- New field `EnableRegionalMdmAccount` in struct `MetricSpecification` +- New field `MetricFilterPattern` in struct `MetricSpecification` +- New field `IsInternal` in struct `MetricSpecification` +- New field `ResourceIDDimensionNameOverride` in struct `MetricSpecification` +- New field `SourceMdmAccount` in struct `MetricSpecification` - New field `ImportConfiguration` in struct `FhirServiceProperties` +- New field `CorsConfiguration` in struct `DicomServiceProperties` +- New field `ImportConfiguration` in struct `ServicesProperties` ## 1.0.0 (2022-05-18) diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/autorest.md b/sdk/resourcemanager/healthcareapis/armhealthcareapis/autorest.md index f41623548429..6607837f4af4 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/autorest.md +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/healthcareapis/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/healthcareapis/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/healthcareapis/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.0-beta.1 +module-version: 1.1.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_constants.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/constants.go similarity index 99% rename from sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_constants.go rename to sdk/resourcemanager/healthcareapis/armhealthcareapis/constants.go index 430c20dd3618..8ac8af18b982 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_constants.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/constants.go @@ -5,12 +5,13 @@ // 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 armhealthcareapis const ( moduleName = "armhealthcareapis" - moduleVersion = "v1.1.0-beta.1" + moduleVersion = "v1.1.0" ) // ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_dicomservices_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/dicomservices_client.go similarity index 96% rename from sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_dicomservices_client.go rename to sdk/resourcemanager/healthcareapis/armhealthcareapis/dicomservices_client.go index 503c41969062..ebe47050fa04 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_dicomservices_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/dicomservices_client.go @@ -5,6 +5,7 @@ // 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 armhealthcareapis @@ -56,7 +57,7 @@ func NewDicomServicesClient(subscriptionID string, credential azcore.TokenCreden // BeginCreateOrUpdate - Creates or updates a DICOM Service resource with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // workspaceName - The name of workspace resource. // dicomServiceName - The name of DICOM Service resource. @@ -77,7 +78,7 @@ func (client *DicomServicesClient) BeginCreateOrUpdate(ctx context.Context, reso // CreateOrUpdate - Creates or updates a DICOM Service resource with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 func (client *DicomServicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, dicomServiceName string, dicomservice DicomService, options *DicomServicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, dicomServiceName, dicomservice, options) if err != nil { @@ -117,7 +118,7 @@ func (client *DicomServicesClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, dicomservice) @@ -125,7 +126,7 @@ func (client *DicomServicesClient) createOrUpdateCreateRequest(ctx context.Conte // BeginDelete - Deletes a DICOM Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // dicomServiceName - The name of DICOM Service resource. // workspaceName - The name of workspace resource. @@ -145,7 +146,7 @@ func (client *DicomServicesClient) BeginDelete(ctx context.Context, resourceGrou // Delete - Deletes a DICOM Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 func (client *DicomServicesClient) deleteOperation(ctx context.Context, resourceGroupName string, dicomServiceName string, workspaceName string, options *DicomServicesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, dicomServiceName, workspaceName, options) if err != nil { @@ -185,7 +186,7 @@ func (client *DicomServicesClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -193,7 +194,7 @@ func (client *DicomServicesClient) deleteCreateRequest(ctx context.Context, reso // Get - Gets the properties of the specified DICOM Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // workspaceName - The name of workspace resource. // dicomServiceName - The name of DICOM Service resource. @@ -237,7 +238,7 @@ func (client *DicomServicesClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -254,7 +255,7 @@ func (client *DicomServicesClient) getHandleResponse(resp *http.Response) (Dicom // NewListByWorkspacePager - Lists all DICOM Services for the given workspace // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // workspaceName - The name of workspace resource. // options - DicomServicesClientListByWorkspaceOptions contains the optional parameters for the DicomServicesClient.ListByWorkspace @@ -307,7 +308,7 @@ func (client *DicomServicesClient) listByWorkspaceCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -324,7 +325,7 @@ func (client *DicomServicesClient) listByWorkspaceHandleResponse(resp *http.Resp // BeginUpdate - Patch DICOM Service details. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // dicomServiceName - The name of DICOM Service resource. // workspaceName - The name of workspace resource. @@ -345,7 +346,7 @@ func (client *DicomServicesClient) BeginUpdate(ctx context.Context, resourceGrou // Update - Patch DICOM Service details. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 func (client *DicomServicesClient) update(ctx context.Context, resourceGroupName string, dicomServiceName string, workspaceName string, dicomservicePatchResource DicomServicePatchResource, options *DicomServicesClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, dicomServiceName, workspaceName, dicomservicePatchResource, options) if err != nil { @@ -385,7 +386,7 @@ func (client *DicomServicesClient) updateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, dicomservicePatchResource) diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_fhirdestinations_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/fhirdestinations_client.go similarity index 98% rename from sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_fhirdestinations_client.go rename to sdk/resourcemanager/healthcareapis/armhealthcareapis/fhirdestinations_client.go index d1808beace1e..534ecd5075b7 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_fhirdestinations_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/fhirdestinations_client.go @@ -5,6 +5,7 @@ // 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 armhealthcareapis @@ -56,7 +57,7 @@ func NewFhirDestinationsClient(subscriptionID string, credential azcore.TokenCre // NewListByIotConnectorPager - Lists all FHIR destinations for the given IoT Connector // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // workspaceName - The name of workspace resource. // iotConnectorName - The name of IoT Connector resource. @@ -114,7 +115,7 @@ func (client *FhirDestinationsClient) listByIotConnectorCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_fhirservices_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/fhirservices_client.go similarity index 96% rename from sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_fhirservices_client.go rename to sdk/resourcemanager/healthcareapis/armhealthcareapis/fhirservices_client.go index 1cfeebbfd5aa..b908d4cda12b 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_fhirservices_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/fhirservices_client.go @@ -5,6 +5,7 @@ // 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 armhealthcareapis @@ -56,7 +57,7 @@ func NewFhirServicesClient(subscriptionID string, credential azcore.TokenCredent // BeginCreateOrUpdate - Creates or updates a FHIR Service resource with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // workspaceName - The name of workspace resource. // fhirServiceName - The name of FHIR Service resource. @@ -77,7 +78,7 @@ func (client *FhirServicesClient) BeginCreateOrUpdate(ctx context.Context, resou // CreateOrUpdate - Creates or updates a FHIR Service resource with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 func (client *FhirServicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, fhirServiceName string, fhirservice FhirService, options *FhirServicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, fhirServiceName, fhirservice, options) if err != nil { @@ -117,7 +118,7 @@ func (client *FhirServicesClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, fhirservice) @@ -125,7 +126,7 @@ func (client *FhirServicesClient) createOrUpdateCreateRequest(ctx context.Contex // BeginDelete - Deletes a FHIR Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // fhirServiceName - The name of FHIR Service resource. // workspaceName - The name of workspace resource. @@ -145,7 +146,7 @@ func (client *FhirServicesClient) BeginDelete(ctx context.Context, resourceGroup // Delete - Deletes a FHIR Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 func (client *FhirServicesClient) deleteOperation(ctx context.Context, resourceGroupName string, fhirServiceName string, workspaceName string, options *FhirServicesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, fhirServiceName, workspaceName, options) if err != nil { @@ -185,7 +186,7 @@ func (client *FhirServicesClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -193,7 +194,7 @@ func (client *FhirServicesClient) deleteCreateRequest(ctx context.Context, resou // Get - Gets the properties of the specified FHIR Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // workspaceName - The name of workspace resource. // fhirServiceName - The name of FHIR Service resource. @@ -237,7 +238,7 @@ func (client *FhirServicesClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -254,7 +255,7 @@ func (client *FhirServicesClient) getHandleResponse(resp *http.Response) (FhirSe // NewListByWorkspacePager - Lists all FHIR Services for the given workspace // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // workspaceName - The name of workspace resource. // options - FhirServicesClientListByWorkspaceOptions contains the optional parameters for the FhirServicesClient.ListByWorkspace @@ -307,7 +308,7 @@ func (client *FhirServicesClient) listByWorkspaceCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -324,7 +325,7 @@ func (client *FhirServicesClient) listByWorkspaceHandleResponse(resp *http.Respo // BeginUpdate - Patch FHIR Service details. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // fhirServiceName - The name of FHIR Service resource. // workspaceName - The name of workspace resource. @@ -345,7 +346,7 @@ func (client *FhirServicesClient) BeginUpdate(ctx context.Context, resourceGroup // Update - Patch FHIR Service details. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 func (client *FhirServicesClient) update(ctx context.Context, resourceGroupName string, fhirServiceName string, workspaceName string, fhirservicePatchResource FhirServicePatchResource, options *FhirServicesClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, fhirServiceName, workspaceName, fhirservicePatchResource, options) if err != nil { @@ -385,7 +386,7 @@ func (client *FhirServicesClient) updateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, fhirservicePatchResource) diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/go.mod b/sdk/resourcemanager/healthcareapis/armhealthcareapis/go.mod index 773e562be65b..777b6e3e72c3 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/go.mod +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/go.mod @@ -2,20 +2,12 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthcareapis/armh 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.0.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.4.0 // indirect - github.com/golang-jwt/jwt v3.2.1+incompatible // 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/healthcareapis/armhealthcareapis/go.sum b/sdk/resourcemanager/healthcareapis/armhealthcareapis/go.sum index ed5b814680ee..3afb578030a5 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/go.sum +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/go.sum @@ -1,33 +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.0.0 h1:Yoicul8bnVdQrhDMTHxdEckRGX01XvwXDHUT9zYZ3k0= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0/go.mod h1:+6sju8gk8FRmSajX3Oz4G5Gm7P+mbqE9FVaXXFYTkCM= 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.4.0 h1:WVsrXCnHlDDX8ls+tootqRE87/hL9S/g4ewig9RsD/c= -github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4= 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 v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= -github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= -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/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= -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-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -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/healthcareapis/armhealthcareapis/zz_generated_iotconnectorfhirdestination_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/iotconnectorfhirdestination_client.go similarity index 97% rename from sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_iotconnectorfhirdestination_client.go rename to sdk/resourcemanager/healthcareapis/armhealthcareapis/iotconnectorfhirdestination_client.go index a1031cff78a2..1e2e7eae5e6e 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_iotconnectorfhirdestination_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/iotconnectorfhirdestination_client.go @@ -5,6 +5,7 @@ // 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 armhealthcareapis @@ -56,7 +57,7 @@ func NewIotConnectorFhirDestinationClient(subscriptionID string, credential azco // BeginCreateOrUpdate - Creates or updates an IoT Connector FHIR destination resource with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // workspaceName - The name of workspace resource. // iotConnectorName - The name of IoT Connector resource. @@ -78,7 +79,7 @@ func (client *IotConnectorFhirDestinationClient) BeginCreateOrUpdate(ctx context // CreateOrUpdate - Creates or updates an IoT Connector FHIR destination resource with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 func (client *IotConnectorFhirDestinationClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, iotConnectorName string, fhirDestinationName string, iotFhirDestination IotFhirDestination, options *IotConnectorFhirDestinationClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, iotConnectorName, fhirDestinationName, iotFhirDestination, options) if err != nil { @@ -122,7 +123,7 @@ func (client *IotConnectorFhirDestinationClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, iotFhirDestination) @@ -130,7 +131,7 @@ func (client *IotConnectorFhirDestinationClient) createOrUpdateCreateRequest(ctx // BeginDelete - Deletes an IoT Connector FHIR destination. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // workspaceName - The name of workspace resource. // iotConnectorName - The name of IoT Connector resource. @@ -151,7 +152,7 @@ func (client *IotConnectorFhirDestinationClient) BeginDelete(ctx context.Context // Delete - Deletes an IoT Connector FHIR destination. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 func (client *IotConnectorFhirDestinationClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, iotConnectorName string, fhirDestinationName string, options *IotConnectorFhirDestinationClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, iotConnectorName, fhirDestinationName, options) if err != nil { @@ -195,7 +196,7 @@ func (client *IotConnectorFhirDestinationClient) deleteCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -203,7 +204,7 @@ func (client *IotConnectorFhirDestinationClient) deleteCreateRequest(ctx context // Get - Gets the properties of the specified Iot Connector FHIR destination. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // workspaceName - The name of workspace resource. // iotConnectorName - The name of IoT Connector resource. @@ -253,7 +254,7 @@ func (client *IotConnectorFhirDestinationClient) getCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_iotconnectors_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/iotconnectors_client.go similarity index 96% rename from sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_iotconnectors_client.go rename to sdk/resourcemanager/healthcareapis/armhealthcareapis/iotconnectors_client.go index 7a8efd7cebe3..b5a447997983 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_iotconnectors_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/iotconnectors_client.go @@ -5,6 +5,7 @@ // 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 armhealthcareapis @@ -56,7 +57,7 @@ func NewIotConnectorsClient(subscriptionID string, credential azcore.TokenCreden // BeginCreateOrUpdate - Creates or updates an IoT Connector resource with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // workspaceName - The name of workspace resource. // iotConnectorName - The name of IoT Connector resource. @@ -77,7 +78,7 @@ func (client *IotConnectorsClient) BeginCreateOrUpdate(ctx context.Context, reso // CreateOrUpdate - Creates or updates an IoT Connector resource with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 func (client *IotConnectorsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, iotConnectorName string, iotConnector IotConnector, options *IotConnectorsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, iotConnectorName, iotConnector, options) if err != nil { @@ -117,7 +118,7 @@ func (client *IotConnectorsClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, iotConnector) @@ -125,7 +126,7 @@ func (client *IotConnectorsClient) createOrUpdateCreateRequest(ctx context.Conte // BeginDelete - Deletes an IoT Connector. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // iotConnectorName - The name of IoT Connector resource. // workspaceName - The name of workspace resource. @@ -145,7 +146,7 @@ func (client *IotConnectorsClient) BeginDelete(ctx context.Context, resourceGrou // Delete - Deletes an IoT Connector. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 func (client *IotConnectorsClient) deleteOperation(ctx context.Context, resourceGroupName string, iotConnectorName string, workspaceName string, options *IotConnectorsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, iotConnectorName, workspaceName, options) if err != nil { @@ -185,7 +186,7 @@ func (client *IotConnectorsClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -193,7 +194,7 @@ func (client *IotConnectorsClient) deleteCreateRequest(ctx context.Context, reso // Get - Gets the properties of the specified IoT Connector. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // workspaceName - The name of workspace resource. // iotConnectorName - The name of IoT Connector resource. @@ -237,7 +238,7 @@ func (client *IotConnectorsClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -254,7 +255,7 @@ func (client *IotConnectorsClient) getHandleResponse(resp *http.Response) (IotCo // NewListByWorkspacePager - Lists all IoT Connectors for the given workspace // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // workspaceName - The name of workspace resource. // options - IotConnectorsClientListByWorkspaceOptions contains the optional parameters for the IotConnectorsClient.ListByWorkspace @@ -307,7 +308,7 @@ func (client *IotConnectorsClient) listByWorkspaceCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -324,7 +325,7 @@ func (client *IotConnectorsClient) listByWorkspaceHandleResponse(resp *http.Resp // BeginUpdate - Patch an IoT Connector. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // iotConnectorName - The name of IoT Connector resource. // workspaceName - The name of workspace resource. @@ -345,7 +346,7 @@ func (client *IotConnectorsClient) BeginUpdate(ctx context.Context, resourceGrou // Update - Patch an IoT Connector. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 func (client *IotConnectorsClient) update(ctx context.Context, resourceGroupName string, iotConnectorName string, workspaceName string, iotConnectorPatchResource IotConnectorPatchResource, options *IotConnectorsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, iotConnectorName, workspaceName, iotConnectorPatchResource, options) if err != nil { @@ -385,7 +386,7 @@ func (client *IotConnectorsClient) updateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, iotConnectorPatchResource) diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_models.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/models.go similarity index 97% rename from sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_models.go rename to sdk/resourcemanager/healthcareapis/armhealthcareapis/models.go index 6164d84ee47e..c03cbd493f1c 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_models.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/models.go @@ -5,6 +5,7 @@ // 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 armhealthcareapis @@ -19,6 +20,24 @@ type CheckNameAvailabilityParameters struct { Type *string `json:"type,omitempty"` } +// CorsConfiguration - The settings for the CORS configuration of the service instance. +type CorsConfiguration struct { + // If credentials are allowed via CORS. + AllowCredentials *bool `json:"allowCredentials,omitempty"` + + // The headers to be allowed via CORS. + Headers []*string `json:"headers,omitempty"` + + // The max age to be allowed via CORS. + MaxAge *int32 `json:"maxAge,omitempty"` + + // The methods to be allowed via CORS. + Methods []*string `json:"methods,omitempty"` + + // The origins to be allowed via CORS. + Origins []*string `json:"origins,omitempty"` +} + // DicomService - The description of Dicom Service type DicomService struct { // An etag associated with the resource, used for optimistic concurrency when editing it. @@ -81,6 +100,9 @@ type DicomServiceProperties struct { // Dicom Service authentication configuration. AuthenticationConfiguration *DicomServiceAuthenticationConfiguration `json:"authenticationConfiguration,omitempty"` + // Dicom Service Cors configuration. + CorsConfiguration *CorsConfiguration `json:"corsConfiguration,omitempty"` + // Control permission for data plane traffic coming from public networks while private endpoint is enabled. PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` @@ -583,13 +605,28 @@ type MetricSpecification struct { // Localized friendly display name of the metric DisplayName *string `json:"displayName,omitempty"` + // Whether regional MDM account enabled. + EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"` + // Optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` + // Whether the metric is internal. + IsInternal *bool `json:"isInternal,omitempty"` + + // Pattern for the filter of the metric. + MetricFilterPattern *string `json:"metricFilterPattern,omitempty"` + // Name of the metric Name *string `json:"name,omitempty"` - // Name of the MDM namespace. Optional. + // The resource Id dimension name override. + ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"` + + // The source MDM account. + SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"` + + // The source MDM namespace. SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"` // Supported aggregation types diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/models_serde.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/models_serde.go new file mode 100644 index 000000000000..6b6bda823c42 --- /dev/null +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/models_serde.go @@ -0,0 +1,3029 @@ +//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 armhealthcareapis + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" +) + +// MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityParameters. +func (c CheckNameAvailabilityParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "name", c.Name) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityParameters. +func (c *CheckNameAvailabilityParameters) UnmarshalJSON(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 "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 CorsConfiguration. +func (c CorsConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allowCredentials", c.AllowCredentials) + populate(objectMap, "headers", c.Headers) + populate(objectMap, "maxAge", c.MaxAge) + populate(objectMap, "methods", c.Methods) + populate(objectMap, "origins", c.Origins) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CorsConfiguration. +func (c *CorsConfiguration) UnmarshalJSON(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 "allowCredentials": + err = unpopulate(val, "AllowCredentials", &c.AllowCredentials) + delete(rawMsg, key) + case "headers": + err = unpopulate(val, "Headers", &c.Headers) + delete(rawMsg, key) + case "maxAge": + err = unpopulate(val, "MaxAge", &c.MaxAge) + delete(rawMsg, key) + case "methods": + err = unpopulate(val, "Methods", &c.Methods) + delete(rawMsg, key) + case "origins": + err = unpopulate(val, "Origins", &c.Origins) + 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 DicomService. +func (d DicomService) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", d.Etag) + populate(objectMap, "id", d.ID) + populate(objectMap, "identity", d.Identity) + populate(objectMap, "location", d.Location) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "systemData", d.SystemData) + populate(objectMap, "tags", d.Tags) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DicomService. +func (d *DicomService) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &d.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &d.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &d.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DicomServiceAuthenticationConfiguration. +func (d DicomServiceAuthenticationConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "audiences", d.Audiences) + populate(objectMap, "authority", d.Authority) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DicomServiceAuthenticationConfiguration. +func (d *DicomServiceAuthenticationConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "audiences": + err = unpopulate(val, "Audiences", &d.Audiences) + delete(rawMsg, key) + case "authority": + err = unpopulate(val, "Authority", &d.Authority) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DicomServiceCollection. +func (d DicomServiceCollection) 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 DicomServiceCollection. +func (d *DicomServiceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DicomServicePatchResource. +func (d DicomServicePatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "identity", d.Identity) + populate(objectMap, "tags", d.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DicomServicePatchResource. +func (d *DicomServicePatchResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identity": + err = unpopulate(val, "Identity", &d.Identity) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DicomServiceProperties. +func (d DicomServiceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "authenticationConfiguration", d.AuthenticationConfiguration) + populate(objectMap, "corsConfiguration", d.CorsConfiguration) + populate(objectMap, "privateEndpointConnections", d.PrivateEndpointConnections) + populate(objectMap, "provisioningState", d.ProvisioningState) + populate(objectMap, "publicNetworkAccess", d.PublicNetworkAccess) + populate(objectMap, "serviceUrl", d.ServiceURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DicomServiceProperties. +func (d *DicomServiceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authenticationConfiguration": + err = unpopulate(val, "AuthenticationConfiguration", &d.AuthenticationConfiguration) + delete(rawMsg, key) + case "corsConfiguration": + err = unpopulate(val, "CorsConfiguration", &d.CorsConfiguration) + delete(rawMsg, key) + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &d.PrivateEndpointConnections) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &d.PublicNetworkAccess) + delete(rawMsg, key) + case "serviceUrl": + err = unpopulate(val, "ServiceURL", &d.ServiceURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Error. +func (e Error) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "error", e.Error) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Error. +func (e *Error) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &e.Error) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorDetails. +func (e ErrorDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "error", e.Error) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetails. +func (e *ErrorDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &e.Error) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorDetailsInternal. +func (e ErrorDetailsInternal) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "code", e.Code) + populate(objectMap, "message", e.Message) + populate(objectMap, "target", e.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetailsInternal. +func (e *ErrorDetailsInternal) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &e.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &e.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FhirService. +func (f FhirService) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", f.Etag) + populate(objectMap, "id", f.ID) + populate(objectMap, "identity", f.Identity) + populate(objectMap, "kind", f.Kind) + populate(objectMap, "location", f.Location) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "systemData", f.SystemData) + populate(objectMap, "tags", f.Tags) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FhirService. +func (f *FhirService) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &f.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &f.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &f.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &f.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &f.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &f.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &f.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FhirServiceAccessPolicyEntry. +func (f FhirServiceAccessPolicyEntry) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "objectId", f.ObjectID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FhirServiceAccessPolicyEntry. +func (f *FhirServiceAccessPolicyEntry) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectId": + err = unpopulate(val, "ObjectID", &f.ObjectID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FhirServiceAcrConfiguration. +func (f FhirServiceAcrConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "loginServers", f.LoginServers) + populate(objectMap, "ociArtifacts", f.OciArtifacts) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FhirServiceAcrConfiguration. +func (f *FhirServiceAcrConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "loginServers": + err = unpopulate(val, "LoginServers", &f.LoginServers) + delete(rawMsg, key) + case "ociArtifacts": + err = unpopulate(val, "OciArtifacts", &f.OciArtifacts) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FhirServiceAuthenticationConfiguration. +func (f FhirServiceAuthenticationConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "audience", f.Audience) + populate(objectMap, "authority", f.Authority) + populate(objectMap, "smartProxyEnabled", f.SmartProxyEnabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FhirServiceAuthenticationConfiguration. +func (f *FhirServiceAuthenticationConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "audience": + err = unpopulate(val, "Audience", &f.Audience) + delete(rawMsg, key) + case "authority": + err = unpopulate(val, "Authority", &f.Authority) + delete(rawMsg, key) + case "smartProxyEnabled": + err = unpopulate(val, "SmartProxyEnabled", &f.SmartProxyEnabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FhirServiceCollection. +func (f FhirServiceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FhirServiceCollection. +func (f *FhirServiceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &f.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FhirServiceCorsConfiguration. +func (f FhirServiceCorsConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allowCredentials", f.AllowCredentials) + populate(objectMap, "headers", f.Headers) + populate(objectMap, "maxAge", f.MaxAge) + populate(objectMap, "methods", f.Methods) + populate(objectMap, "origins", f.Origins) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FhirServiceCorsConfiguration. +func (f *FhirServiceCorsConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowCredentials": + err = unpopulate(val, "AllowCredentials", &f.AllowCredentials) + delete(rawMsg, key) + case "headers": + err = unpopulate(val, "Headers", &f.Headers) + delete(rawMsg, key) + case "maxAge": + err = unpopulate(val, "MaxAge", &f.MaxAge) + delete(rawMsg, key) + case "methods": + err = unpopulate(val, "Methods", &f.Methods) + delete(rawMsg, key) + case "origins": + err = unpopulate(val, "Origins", &f.Origins) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FhirServiceExportConfiguration. +func (f FhirServiceExportConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "storageAccountName", f.StorageAccountName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FhirServiceExportConfiguration. +func (f *FhirServiceExportConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "storageAccountName": + err = unpopulate(val, "StorageAccountName", &f.StorageAccountName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FhirServiceImportConfiguration. +func (f FhirServiceImportConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "enabled", f.Enabled) + populate(objectMap, "initialImportMode", f.InitialImportMode) + populate(objectMap, "integrationDataStore", f.IntegrationDataStore) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FhirServiceImportConfiguration. +func (f *FhirServiceImportConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &f.Enabled) + delete(rawMsg, key) + case "initialImportMode": + err = unpopulate(val, "InitialImportMode", &f.InitialImportMode) + delete(rawMsg, key) + case "integrationDataStore": + err = unpopulate(val, "IntegrationDataStore", &f.IntegrationDataStore) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FhirServicePatchResource. +func (f FhirServicePatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "identity", f.Identity) + populate(objectMap, "tags", f.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FhirServicePatchResource. +func (f *FhirServicePatchResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identity": + err = unpopulate(val, "Identity", &f.Identity) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &f.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FhirServiceProperties. +func (f FhirServiceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "accessPolicies", f.AccessPolicies) + populate(objectMap, "acrConfiguration", f.AcrConfiguration) + populate(objectMap, "authenticationConfiguration", f.AuthenticationConfiguration) + populate(objectMap, "corsConfiguration", f.CorsConfiguration) + populate(objectMap, "eventState", f.EventState) + populate(objectMap, "exportConfiguration", f.ExportConfiguration) + populate(objectMap, "importConfiguration", f.ImportConfiguration) + populate(objectMap, "privateEndpointConnections", f.PrivateEndpointConnections) + populate(objectMap, "provisioningState", f.ProvisioningState) + populate(objectMap, "publicNetworkAccess", f.PublicNetworkAccess) + populate(objectMap, "resourceVersionPolicyConfiguration", f.ResourceVersionPolicyConfiguration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FhirServiceProperties. +func (f *FhirServiceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessPolicies": + err = unpopulate(val, "AccessPolicies", &f.AccessPolicies) + delete(rawMsg, key) + case "acrConfiguration": + err = unpopulate(val, "AcrConfiguration", &f.AcrConfiguration) + delete(rawMsg, key) + case "authenticationConfiguration": + err = unpopulate(val, "AuthenticationConfiguration", &f.AuthenticationConfiguration) + delete(rawMsg, key) + case "corsConfiguration": + err = unpopulate(val, "CorsConfiguration", &f.CorsConfiguration) + delete(rawMsg, key) + case "eventState": + err = unpopulate(val, "EventState", &f.EventState) + delete(rawMsg, key) + case "exportConfiguration": + err = unpopulate(val, "ExportConfiguration", &f.ExportConfiguration) + delete(rawMsg, key) + case "importConfiguration": + err = unpopulate(val, "ImportConfiguration", &f.ImportConfiguration) + delete(rawMsg, key) + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &f.PrivateEndpointConnections) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &f.ProvisioningState) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &f.PublicNetworkAccess) + delete(rawMsg, key) + case "resourceVersionPolicyConfiguration": + err = unpopulate(val, "ResourceVersionPolicyConfiguration", &f.ResourceVersionPolicyConfiguration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IotConnector. +func (i IotConnector) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", i.Etag) + populate(objectMap, "id", i.ID) + populate(objectMap, "identity", i.Identity) + populate(objectMap, "location", i.Location) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "systemData", i.SystemData) + populate(objectMap, "tags", i.Tags) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IotConnector. +func (i *IotConnector) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &i.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &i.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &i.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &i.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &i.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IotConnectorCollection. +func (i IotConnectorCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IotConnectorCollection. +func (i *IotConnectorCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IotConnectorPatchResource. +func (i IotConnectorPatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "identity", i.Identity) + populate(objectMap, "tags", i.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IotConnectorPatchResource. +func (i *IotConnectorPatchResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identity": + err = unpopulate(val, "Identity", &i.Identity) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &i.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IotConnectorProperties. +func (i IotConnectorProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "deviceMapping", i.DeviceMapping) + populate(objectMap, "ingestionEndpointConfiguration", i.IngestionEndpointConfiguration) + populate(objectMap, "provisioningState", i.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IotConnectorProperties. +func (i *IotConnectorProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deviceMapping": + err = unpopulate(val, "DeviceMapping", &i.DeviceMapping) + delete(rawMsg, key) + case "ingestionEndpointConfiguration": + err = unpopulate(val, "IngestionEndpointConfiguration", &i.IngestionEndpointConfiguration) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IotDestinationProperties. +func (i IotDestinationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "provisioningState", i.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IotDestinationProperties. +func (i *IotDestinationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IotEventHubIngestionEndpointConfiguration. +func (i IotEventHubIngestionEndpointConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "consumerGroup", i.ConsumerGroup) + populate(objectMap, "eventHubName", i.EventHubName) + populate(objectMap, "fullyQualifiedEventHubNamespace", i.FullyQualifiedEventHubNamespace) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IotEventHubIngestionEndpointConfiguration. +func (i *IotEventHubIngestionEndpointConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "consumerGroup": + err = unpopulate(val, "ConsumerGroup", &i.ConsumerGroup) + delete(rawMsg, key) + case "eventHubName": + err = unpopulate(val, "EventHubName", &i.EventHubName) + delete(rawMsg, key) + case "fullyQualifiedEventHubNamespace": + err = unpopulate(val, "FullyQualifiedEventHubNamespace", &i.FullyQualifiedEventHubNamespace) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IotFhirDestination. +func (i IotFhirDestination) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", i.Etag) + populate(objectMap, "id", i.ID) + populate(objectMap, "location", i.Location) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "systemData", i.SystemData) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IotFhirDestination. +func (i *IotFhirDestination) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &i.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &i.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &i.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IotFhirDestinationCollection. +func (i IotFhirDestinationCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IotFhirDestinationCollection. +func (i *IotFhirDestinationCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IotFhirDestinationProperties. +func (i IotFhirDestinationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "fhirMapping", i.FhirMapping) + populate(objectMap, "fhirServiceResourceId", i.FhirServiceResourceID) + populate(objectMap, "provisioningState", i.ProvisioningState) + populate(objectMap, "resourceIdentityResolutionType", i.ResourceIdentityResolutionType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IotFhirDestinationProperties. +func (i *IotFhirDestinationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fhirMapping": + err = unpopulate(val, "FhirMapping", &i.FhirMapping) + delete(rawMsg, key) + case "fhirServiceResourceId": + err = unpopulate(val, "FhirServiceResourceID", &i.FhirServiceResourceID) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) + delete(rawMsg, key) + case "resourceIdentityResolutionType": + err = unpopulate(val, "ResourceIdentityResolutionType", &i.ResourceIdentityResolutionType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IotMappingProperties. +func (i IotMappingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "content", &i.Content) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IotMappingProperties. +func (i *IotMappingProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "content": + err = unpopulate(val, "Content", &i.Content) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListOperations. +func (l ListOperations) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListOperations. +func (l *ListOperations) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LocationBasedResource. +func (l LocationBasedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", l.Etag) + populate(objectMap, "id", l.ID) + populate(objectMap, "location", l.Location) + populate(objectMap, "name", l.Name) + populate(objectMap, "type", l.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LocationBasedResource. +func (l *LocationBasedResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &l.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &l.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &l.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &l.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LogSpecification. +func (l LogSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "blobDuration", l.BlobDuration) + populate(objectMap, "displayName", l.DisplayName) + populate(objectMap, "name", l.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification. +func (l *LogSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobDuration": + err = unpopulate(val, "BlobDuration", &l.BlobDuration) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &l.DisplayName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetricDimension. +func (m MetricDimension) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "displayName", m.DisplayName) + populate(objectMap, "name", m.Name) + populate(objectMap, "toBeExportedForShoebox", m.ToBeExportedForShoebox) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricDimension. +func (m *MetricDimension) UnmarshalJSON(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 "displayName": + err = unpopulate(val, "DisplayName", &m.DisplayName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "toBeExportedForShoebox": + err = unpopulate(val, "ToBeExportedForShoebox", &m.ToBeExportedForShoebox) + 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 MetricSpecification. +func (m MetricSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "aggregationType", m.AggregationType) + populate(objectMap, "category", m.Category) + populate(objectMap, "dimensions", m.Dimensions) + populate(objectMap, "displayDescription", m.DisplayDescription) + populate(objectMap, "displayName", m.DisplayName) + populate(objectMap, "enableRegionalMdmAccount", m.EnableRegionalMdmAccount) + populate(objectMap, "fillGapWithZero", m.FillGapWithZero) + populate(objectMap, "isInternal", m.IsInternal) + populate(objectMap, "metricFilterPattern", m.MetricFilterPattern) + populate(objectMap, "name", m.Name) + populate(objectMap, "resourceIdDimensionNameOverride", m.ResourceIDDimensionNameOverride) + populate(objectMap, "sourceMdmAccount", m.SourceMdmAccount) + populate(objectMap, "sourceMdmNamespace", m.SourceMdmNamespace) + populate(objectMap, "supportedAggregationTypes", m.SupportedAggregationTypes) + populate(objectMap, "supportedTimeGrainTypes", m.SupportedTimeGrainTypes) + populate(objectMap, "unit", m.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecification. +func (m *MetricSpecification) UnmarshalJSON(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 "aggregationType": + err = unpopulate(val, "AggregationType", &m.AggregationType) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &m.Category) + delete(rawMsg, key) + case "dimensions": + err = unpopulate(val, "Dimensions", &m.Dimensions) + delete(rawMsg, key) + case "displayDescription": + err = unpopulate(val, "DisplayDescription", &m.DisplayDescription) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &m.DisplayName) + delete(rawMsg, key) + case "enableRegionalMdmAccount": + err = unpopulate(val, "EnableRegionalMdmAccount", &m.EnableRegionalMdmAccount) + delete(rawMsg, key) + case "fillGapWithZero": + err = unpopulate(val, "FillGapWithZero", &m.FillGapWithZero) + delete(rawMsg, key) + case "isInternal": + err = unpopulate(val, "IsInternal", &m.IsInternal) + delete(rawMsg, key) + case "metricFilterPattern": + err = unpopulate(val, "MetricFilterPattern", &m.MetricFilterPattern) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "resourceIdDimensionNameOverride": + err = unpopulate(val, "ResourceIDDimensionNameOverride", &m.ResourceIDDimensionNameOverride) + delete(rawMsg, key) + case "sourceMdmAccount": + err = unpopulate(val, "SourceMdmAccount", &m.SourceMdmAccount) + delete(rawMsg, key) + case "sourceMdmNamespace": + err = unpopulate(val, "SourceMdmNamespace", &m.SourceMdmNamespace) + delete(rawMsg, key) + case "supportedAggregationTypes": + err = unpopulate(val, "SupportedAggregationTypes", &m.SupportedAggregationTypes) + delete(rawMsg, key) + case "supportedTimeGrainTypes": + err = unpopulate(val, "SupportedTimeGrainTypes", &m.SupportedTimeGrainTypes) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &m.Unit) + 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 OperationDetail. +func (o OperationDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "actionType", o.ActionType) + populate(objectMap, "display", o.Display) + populate(objectMap, "isDataAction", o.IsDataAction) + populate(objectMap, "name", o.Name) + populate(objectMap, "origin", o.Origin) + populate(objectMap, "properties", o.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationDetail. +func (o *OperationDetail) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionType": + err = unpopulate(val, "ActionType", &o.ActionType) + delete(rawMsg, key) + case "display": + err = unpopulate(val, "Display", &o.Display) + delete(rawMsg, key) + case "isDataAction": + err = unpopulate(val, "IsDataAction", &o.IsDataAction) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "origin": + err = unpopulate(val, "Origin", &o.Origin) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationDisplay. +func (o OperationDisplay) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", o.Description) + populate(objectMap, "operation", o.Operation) + populate(objectMap, "provider", o.Provider) + populate(objectMap, "resource", o.Resource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay. +func (o *OperationDisplay) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &o.Operation) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &o.Provider) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &o.Resource) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationProperties. +func (o OperationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "serviceSpecification", o.ServiceSpecification) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationProperties. +func (o *OperationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "serviceSpecification": + err = unpopulate(val, "ServiceSpecification", &o.ServiceSpecification) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationResultsDescription. +func (o OperationResultsDescription) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "endTime", o.EndTime) + populate(objectMap, "id", o.ID) + populate(objectMap, "name", o.Name) + populate(objectMap, "properties", &o.Properties) + populate(objectMap, "startTime", o.StartTime) + populate(objectMap, "status", o.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResultsDescription. +func (o *OperationResultsDescription) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTime": + err = unpopulate(val, "EndTime", &o.EndTime) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &o.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &o.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &o.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint. +func (p PrivateEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", p.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint. +func (p *PrivateEndpoint) UnmarshalJSON(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) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection. +func (p PrivateEndpointConnection) 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, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection. +func (p *PrivateEndpointConnection) UnmarshalJSON(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 "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 PrivateEndpointConnectionDescription. +func (p PrivateEndpointConnectionDescription) 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, "systemData", p.SystemData) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionDescription. +func (p *PrivateEndpointConnectionDescription) UnmarshalJSON(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 "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 PrivateEndpointConnectionListResult. +func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult. +func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(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 "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 PrivateEndpointConnectionListResultDescription. +func (p PrivateEndpointConnectionListResultDescription) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResultDescription. +func (p *PrivateEndpointConnectionListResultDescription) UnmarshalJSON(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 "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 PrivateEndpointConnectionProperties. +func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "privateEndpoint", p.PrivateEndpoint) + populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) + populate(objectMap, "provisioningState", p.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties. +func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(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 "privateEndpoint": + err = unpopulate(val, "PrivateEndpoint", &p.PrivateEndpoint) + delete(rawMsg, key) + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + 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 PrivateLinkResource. +func (p PrivateLinkResource) 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, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource. +func (p *PrivateLinkResource) UnmarshalJSON(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 "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 PrivateLinkResourceDescription. +func (p PrivateLinkResourceDescription) 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, "systemData", p.SystemData) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceDescription. +func (p *PrivateLinkResourceDescription) UnmarshalJSON(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 "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 PrivateLinkResourceListResultDescription. +func (p PrivateLinkResourceListResultDescription) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResultDescription. +func (p *PrivateLinkResourceListResultDescription) UnmarshalJSON(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 "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 PrivateLinkResourceProperties. +func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "groupId", p.GroupID) + populate(objectMap, "requiredMembers", p.RequiredMembers) + populate(objectMap, "requiredZoneNames", p.RequiredZoneNames) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties. +func (p *PrivateLinkResourceProperties) UnmarshalJSON(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 "groupId": + err = unpopulate(val, "GroupID", &p.GroupID) + delete(rawMsg, key) + case "requiredMembers": + err = unpopulate(val, "RequiredMembers", &p.RequiredMembers) + delete(rawMsg, key) + case "requiredZoneNames": + err = unpopulate(val, "RequiredZoneNames", &p.RequiredZoneNames) + 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 PrivateLinkServiceConnectionState. +func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "actionsRequired", p.ActionsRequired) + populate(objectMap, "description", p.Description) + populate(objectMap, "status", p.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState. +func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(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 "actionsRequired": + err = unpopulate(val, "ActionsRequired", &p.ActionsRequired) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Resource. +func (r *Resource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceCore. +func (r ResourceCore) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", r.Etag) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceCore. +func (r *ResourceCore) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &r.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceTags. +func (r ResourceTags) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "tags", r.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTags. +func (r *ResourceTags) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceVersionPolicyConfiguration. +func (r ResourceVersionPolicyConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "default", r.Default) + populate(objectMap, "resourceTypeOverrides", r.ResourceTypeOverrides) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceVersionPolicyConfiguration. +func (r *ResourceVersionPolicyConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "default": + err = unpopulate(val, "Default", &r.Default) + delete(rawMsg, key) + case "resourceTypeOverrides": + err = unpopulate(val, "ResourceTypeOverrides", &r.ResourceTypeOverrides) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceAccessPolicyEntry. +func (s ServiceAccessPolicyEntry) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "objectId", s.ObjectID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceAccessPolicyEntry. +func (s *ServiceAccessPolicyEntry) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectId": + err = unpopulate(val, "ObjectID", &s.ObjectID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceAcrConfigurationInfo. +func (s ServiceAcrConfigurationInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "loginServers", s.LoginServers) + populate(objectMap, "ociArtifacts", s.OciArtifacts) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceAcrConfigurationInfo. +func (s *ServiceAcrConfigurationInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "loginServers": + err = unpopulate(val, "LoginServers", &s.LoginServers) + delete(rawMsg, key) + case "ociArtifacts": + err = unpopulate(val, "OciArtifacts", &s.OciArtifacts) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceAuthenticationConfigurationInfo. +func (s ServiceAuthenticationConfigurationInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "audience", s.Audience) + populate(objectMap, "authority", s.Authority) + populate(objectMap, "smartProxyEnabled", s.SmartProxyEnabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceAuthenticationConfigurationInfo. +func (s *ServiceAuthenticationConfigurationInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "audience": + err = unpopulate(val, "Audience", &s.Audience) + delete(rawMsg, key) + case "authority": + err = unpopulate(val, "Authority", &s.Authority) + delete(rawMsg, key) + case "smartProxyEnabled": + err = unpopulate(val, "SmartProxyEnabled", &s.SmartProxyEnabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceCorsConfigurationInfo. +func (s ServiceCorsConfigurationInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allowCredentials", s.AllowCredentials) + populate(objectMap, "headers", s.Headers) + populate(objectMap, "maxAge", s.MaxAge) + populate(objectMap, "methods", s.Methods) + populate(objectMap, "origins", s.Origins) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceCorsConfigurationInfo. +func (s *ServiceCorsConfigurationInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowCredentials": + err = unpopulate(val, "AllowCredentials", &s.AllowCredentials) + delete(rawMsg, key) + case "headers": + err = unpopulate(val, "Headers", &s.Headers) + delete(rawMsg, key) + case "maxAge": + err = unpopulate(val, "MaxAge", &s.MaxAge) + delete(rawMsg, key) + case "methods": + err = unpopulate(val, "Methods", &s.Methods) + delete(rawMsg, key) + case "origins": + err = unpopulate(val, "Origins", &s.Origins) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceCosmosDbConfigurationInfo. +func (s ServiceCosmosDbConfigurationInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "keyVaultKeyUri", s.KeyVaultKeyURI) + populate(objectMap, "offerThroughput", s.OfferThroughput) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceCosmosDbConfigurationInfo. +func (s *ServiceCosmosDbConfigurationInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyVaultKeyUri": + err = unpopulate(val, "KeyVaultKeyURI", &s.KeyVaultKeyURI) + delete(rawMsg, key) + case "offerThroughput": + err = unpopulate(val, "OfferThroughput", &s.OfferThroughput) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceExportConfigurationInfo. +func (s ServiceExportConfigurationInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "storageAccountName", s.StorageAccountName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceExportConfigurationInfo. +func (s *ServiceExportConfigurationInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "storageAccountName": + err = unpopulate(val, "StorageAccountName", &s.StorageAccountName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceImportConfigurationInfo. +func (s ServiceImportConfigurationInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "enabled", s.Enabled) + populate(objectMap, "initialImportMode", s.InitialImportMode) + populate(objectMap, "integrationDataStore", s.IntegrationDataStore) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceImportConfigurationInfo. +func (s *ServiceImportConfigurationInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &s.Enabled) + delete(rawMsg, key) + case "initialImportMode": + err = unpopulate(val, "InitialImportMode", &s.InitialImportMode) + delete(rawMsg, key) + case "integrationDataStore": + err = unpopulate(val, "IntegrationDataStore", &s.IntegrationDataStore) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceManagedIdentity. +func (s ServiceManagedIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "identity", s.Identity) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceManagedIdentity. +func (s *ServiceManagedIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identity": + err = unpopulate(val, "Identity", &s.Identity) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceManagedIdentityIdentity. +func (s ServiceManagedIdentityIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "principalId", s.PrincipalID) + populate(objectMap, "tenantId", s.TenantID) + populate(objectMap, "type", s.Type) + populate(objectMap, "userAssignedIdentities", s.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceManagedIdentityIdentity. +func (s *ServiceManagedIdentityIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "principalId": + err = unpopulate(val, "PrincipalID", &s.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &s.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &s.UserAssignedIdentities) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceOciArtifactEntry. +func (s ServiceOciArtifactEntry) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "digest", s.Digest) + populate(objectMap, "imageName", s.ImageName) + populate(objectMap, "loginServer", s.LoginServer) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceOciArtifactEntry. +func (s *ServiceOciArtifactEntry) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "digest": + err = unpopulate(val, "Digest", &s.Digest) + delete(rawMsg, key) + case "imageName": + err = unpopulate(val, "ImageName", &s.ImageName) + delete(rawMsg, key) + case "loginServer": + err = unpopulate(val, "LoginServer", &s.LoginServer) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceSpecification. +func (s ServiceSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "logSpecifications", s.LogSpecifications) + populate(objectMap, "metricSpecifications", s.MetricSpecifications) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSpecification. +func (s *ServiceSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "logSpecifications": + err = unpopulate(val, "LogSpecifications", &s.LogSpecifications) + delete(rawMsg, key) + case "metricSpecifications": + err = unpopulate(val, "MetricSpecifications", &s.MetricSpecifications) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServicesDescription. +func (s ServicesDescription) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", s.Etag) + populate(objectMap, "id", s.ID) + populate(objectMap, "identity", s.Identity) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServicesDescription. +func (s *ServicesDescription) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &s.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &s.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServicesDescriptionListResult. +func (s ServicesDescriptionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServicesDescriptionListResult. +func (s *ServicesDescriptionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServicesNameAvailabilityInfo. +func (s ServicesNameAvailabilityInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "message", s.Message) + populate(objectMap, "nameAvailable", s.NameAvailable) + populate(objectMap, "reason", s.Reason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServicesNameAvailabilityInfo. +func (s *ServicesNameAvailabilityInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "message": + err = unpopulate(val, "Message", &s.Message) + delete(rawMsg, key) + case "nameAvailable": + err = unpopulate(val, "NameAvailable", &s.NameAvailable) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &s.Reason) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServicesPatchDescription. +func (s ServicesPatchDescription) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "tags", s.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServicesPatchDescription. +func (s *ServicesPatchDescription) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServicesProperties. +func (s ServicesProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "accessPolicies", s.AccessPolicies) + populate(objectMap, "acrConfiguration", s.AcrConfiguration) + populate(objectMap, "authenticationConfiguration", s.AuthenticationConfiguration) + populate(objectMap, "corsConfiguration", s.CorsConfiguration) + populate(objectMap, "cosmosDbConfiguration", s.CosmosDbConfiguration) + populate(objectMap, "exportConfiguration", s.ExportConfiguration) + populate(objectMap, "importConfiguration", s.ImportConfiguration) + populate(objectMap, "privateEndpointConnections", s.PrivateEndpointConnections) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "publicNetworkAccess", s.PublicNetworkAccess) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServicesProperties. +func (s *ServicesProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessPolicies": + err = unpopulate(val, "AccessPolicies", &s.AccessPolicies) + delete(rawMsg, key) + case "acrConfiguration": + err = unpopulate(val, "AcrConfiguration", &s.AcrConfiguration) + delete(rawMsg, key) + case "authenticationConfiguration": + err = unpopulate(val, "AuthenticationConfiguration", &s.AuthenticationConfiguration) + delete(rawMsg, key) + case "corsConfiguration": + err = unpopulate(val, "CorsConfiguration", &s.CorsConfiguration) + delete(rawMsg, key) + case "cosmosDbConfiguration": + err = unpopulate(val, "CosmosDbConfiguration", &s.CosmosDbConfiguration) + delete(rawMsg, key) + case "exportConfiguration": + err = unpopulate(val, "ExportConfiguration", &s.ExportConfiguration) + delete(rawMsg, key) + case "importConfiguration": + err = unpopulate(val, "ImportConfiguration", &s.ImportConfiguration) + delete(rawMsg, key) + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &s.PrivateEndpointConnections) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &s.PublicNetworkAccess) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServicesPropertiesUpdateParameters. +func (s ServicesPropertiesUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "publicNetworkAccess", s.PublicNetworkAccess) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServicesPropertiesUpdateParameters. +func (s *ServicesPropertiesUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &s.PublicNetworkAccess) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServicesResource. +func (s ServicesResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", s.Etag) + populate(objectMap, "id", s.ID) + populate(objectMap, "identity", s.Identity) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServicesResource. +func (s *ServicesResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &s.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &s.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServicesResourceIdentity. +func (s ServicesResourceIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "principalId", s.PrincipalID) + populate(objectMap, "tenantId", s.TenantID) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServicesResourceIdentity. +func (s *ServicesResourceIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "principalId": + err = unpopulate(val, "PrincipalID", &s.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &s.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SystemData. +func (s SystemData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populate(objectMap, "createdBy", s.CreatedBy) + populate(objectMap, "createdByType", s.CreatedByType) + populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populate(objectMap, "lastModifiedBy", s.LastModifiedBy) + populate(objectMap, "lastModifiedByType", s.LastModifiedByType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. +func (s *SystemData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdAt": + err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + delete(rawMsg, key) + case "createdBy": + err = unpopulate(val, "CreatedBy", &s.CreatedBy) + delete(rawMsg, key) + case "createdByType": + err = unpopulate(val, "CreatedByType", &s.CreatedByType) + delete(rawMsg, key) + case "lastModifiedAt": + err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + delete(rawMsg, key) + case "lastModifiedBy": + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + delete(rawMsg, key) + case "lastModifiedByType": + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TaggedResource. +func (t TaggedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", t.Etag) + populate(objectMap, "id", t.ID) + populate(objectMap, "location", t.Location) + populate(objectMap, "name", t.Name) + populate(objectMap, "tags", t.Tags) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TaggedResource. +func (t *TaggedResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &t.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &t.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &t.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity. +func (u UserAssignedIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "clientId", u.ClientID) + populate(objectMap, "principalId", u.PrincipalID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity. +func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &u.ClientID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &u.PrincipalID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Workspace. +func (w Workspace) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", w.Etag) + populate(objectMap, "id", w.ID) + populate(objectMap, "location", w.Location) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "systemData", w.SystemData) + populate(objectMap, "tags", w.Tags) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Workspace. +func (w *Workspace) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &w.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &w.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &w.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &w.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceList. +func (w WorkspaceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceList. +func (w *WorkspaceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspacePatchResource. +func (w WorkspacePatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "tags", w.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspacePatchResource. +func (w *WorkspacePatchResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "tags": + err = unpopulate(val, "Tags", &w.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceProperties. +func (w WorkspaceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "privateEndpointConnections", w.PrivateEndpointConnections) + populate(objectMap, "provisioningState", w.ProvisioningState) + populate(objectMap, "publicNetworkAccess", w.PublicNetworkAccess) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceProperties. +func (w *WorkspaceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &w.PrivateEndpointConnections) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &w.ProvisioningState) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &w.PublicNetworkAccess) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +func populate(m map[string]interface{}, k string, v interface{}) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else if !reflect.ValueOf(v).IsNil() { + m[k] = v + } +} + +func unpopulate(data json.RawMessage, fn string, v interface{}) error { + if data == nil { + return nil + } + if err := json.Unmarshal(data, v); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + return nil +} diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_operationresults_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/operationresults_client.go similarity index 97% rename from sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_operationresults_client.go rename to sdk/resourcemanager/healthcareapis/armhealthcareapis/operationresults_client.go index ec3da211ee5f..196ee98eff2f 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_operationresults_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/operationresults_client.go @@ -5,6 +5,7 @@ // 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 armhealthcareapis @@ -56,7 +57,7 @@ func NewOperationResultsClient(subscriptionID string, credential azcore.TokenCre // Get - Get the operation result for a long running operation. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // locationName - The location of the operation. // operationResultID - The ID of the operation result to get. // options - OperationResultsClientGetOptions contains the optional parameters for the OperationResultsClient.Get method. @@ -95,7 +96,7 @@ func (client *OperationResultsClient) getCreateRequest(ctx context.Context, loca return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_operations_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/operations_client.go similarity index 97% rename from sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_operations_client.go rename to sdk/resourcemanager/healthcareapis/armhealthcareapis/operations_client.go index 6e678031be9e..000183f16782 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_operations_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/operations_client.go @@ -5,6 +5,7 @@ // 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 armhealthcareapis @@ -50,7 +51,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available operations supported by Microsoft Healthcare resource provider. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-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 +89,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_privateendpointconnections_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/privateendpointconnections_client.go similarity index 97% rename from sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_privateendpointconnections_client.go rename to sdk/resourcemanager/healthcareapis/armhealthcareapis/privateendpointconnections_client.go index b618989699ac..a1ef3a4ac0d1 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_privateendpointconnections_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/privateendpointconnections_client.go @@ -5,6 +5,7 @@ // 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 armhealthcareapis @@ -56,7 +57,7 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcor // BeginCreateOrUpdate - Update the state of the specified private endpoint connection associated with the service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // resourceName - The name of the service instance. // privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource @@ -77,7 +78,7 @@ func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context. // CreateOrUpdate - Update the state of the specified private endpoint connection associated with the service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 func (client *PrivateEndpointConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, properties PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, resourceName, privateEndpointConnectionName, properties, options) if err != nil { @@ -117,7 +118,7 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, properties) @@ -125,7 +126,7 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx // BeginDelete - Deletes a private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // resourceName - The name of the service instance. // privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource @@ -145,7 +146,7 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, // Delete - Deletes a private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, privateEndpointConnectionName, options) if err != nil { @@ -185,7 +186,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -193,7 +194,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // Get - Gets the specified private endpoint connection associated with the service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // resourceName - The name of the service instance. // privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource @@ -238,7 +239,7 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -255,7 +256,7 @@ func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Res // NewListByServicePager - Lists all private endpoint connections for a service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // resourceName - The name of the service instance. // options - PrivateEndpointConnectionsClientListByServiceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.ListByService @@ -302,7 +303,7 @@ func (client *PrivateEndpointConnectionsClient) listByServiceCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_privatelinkresources_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/privatelinkresources_client.go similarity index 97% rename from sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_privatelinkresources_client.go rename to sdk/resourcemanager/healthcareapis/armhealthcareapis/privatelinkresources_client.go index 44a2f8296b8f..43c88a4b79ae 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_privatelinkresources_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/privatelinkresources_client.go @@ -5,6 +5,7 @@ // 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 armhealthcareapis @@ -56,7 +57,7 @@ func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.Toke // Get - Gets a private link resource that need to be created for a service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // resourceName - The name of the service instance. // groupName - The name of the private link resource group. @@ -101,7 +102,7 @@ func (client *PrivateLinkResourcesClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -118,7 +119,7 @@ func (client *PrivateLinkResourcesClient) getHandleResponse(resp *http.Response) // ListByService - Gets the private link resources that need to be created for a service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // resourceName - The name of the service instance. // options - PrivateLinkResourcesClientListByServiceOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByService @@ -158,7 +159,7 @@ func (client *PrivateLinkResourcesClient) listByServiceCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_response_types.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/response_types.go similarity index 99% rename from sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_response_types.go rename to sdk/resourcemanager/healthcareapis/armhealthcareapis/response_types.go index a2ccb65469e5..b762c4f76ff0 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_response_types.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/response_types.go @@ -5,6 +5,7 @@ // 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 armhealthcareapis diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_services_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/services_client.go similarity index 96% rename from sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_services_client.go rename to sdk/resourcemanager/healthcareapis/armhealthcareapis/services_client.go index 9d409d723b1e..5861b38dee63 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_services_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/services_client.go @@ -5,6 +5,7 @@ // 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 armhealthcareapis @@ -56,7 +57,7 @@ func NewServicesClient(subscriptionID string, credential azcore.TokenCredential, // CheckNameAvailability - Check if a service instance name is available. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // checkNameAvailabilityInputs - Set the name parameter in the CheckNameAvailabilityParameters structure to the name of the // service instance to check. // options - ServicesClientCheckNameAvailabilityOptions contains the optional parameters for the ServicesClient.CheckNameAvailability @@ -88,7 +89,7 @@ func (client *ServicesClient) checkNameAvailabilityCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, checkNameAvailabilityInputs) @@ -105,7 +106,7 @@ func (client *ServicesClient) checkNameAvailabilityHandleResponse(resp *http.Res // BeginCreateOrUpdate - Create or update the metadata of a service instance. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // resourceName - The name of the service instance. // serviceDescription - The service instance metadata. @@ -125,7 +126,7 @@ func (client *ServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceG // CreateOrUpdate - Create or update the metadata of a service instance. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 func (client *ServicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, serviceDescription ServicesDescription, options *ServicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, resourceName, serviceDescription, options) if err != nil { @@ -161,7 +162,7 @@ func (client *ServicesClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, serviceDescription) @@ -169,7 +170,7 @@ func (client *ServicesClient) createOrUpdateCreateRequest(ctx context.Context, r // BeginDelete - Delete a service instance. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // resourceName - The name of the service instance. // options - ServicesClientBeginDeleteOptions contains the optional parameters for the ServicesClient.BeginDelete method. @@ -187,7 +188,7 @@ func (client *ServicesClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Delete a service instance. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 func (client *ServicesClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, options *ServicesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { @@ -223,7 +224,7 @@ func (client *ServicesClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -231,7 +232,7 @@ func (client *ServicesClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Get the metadata of a service instance. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // resourceName - The name of the service instance. // options - ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method. @@ -270,7 +271,7 @@ func (client *ServicesClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -287,7 +288,7 @@ func (client *ServicesClient) getHandleResponse(resp *http.Response) (ServicesCl // NewListPager - Get all the service instances in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // options - ServicesClientListOptions contains the optional parameters for the ServicesClient.List method. func (client *ServicesClient) NewListPager(options *ServicesClientListOptions) *runtime.Pager[ServicesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ServicesClientListResponse]{ @@ -329,7 +330,7 @@ func (client *ServicesClient) listCreateRequest(ctx context.Context, options *Se return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -346,7 +347,7 @@ func (client *ServicesClient) listHandleResponse(resp *http.Response) (ServicesC // NewListByResourceGroupPager - Get all the service instances in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // options - ServicesClientListByResourceGroupOptions contains the optional parameters for the ServicesClient.ListByResourceGroup // method. @@ -394,7 +395,7 @@ func (client *ServicesClient) listByResourceGroupCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -411,7 +412,7 @@ func (client *ServicesClient) listByResourceGroupHandleResponse(resp *http.Respo // BeginUpdate - Update the metadata of a service instance. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // resourceName - The name of the service instance. // servicePatchDescription - The service instance metadata and security metadata. @@ -430,7 +431,7 @@ func (client *ServicesClient) BeginUpdate(ctx context.Context, resourceGroupName // Update - Update the metadata of a service instance. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 func (client *ServicesClient) update(ctx context.Context, resourceGroupName string, resourceName string, servicePatchDescription ServicesPatchDescription, options *ServicesClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, resourceName, servicePatchDescription, options) if err != nil { @@ -466,7 +467,7 @@ func (client *ServicesClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, servicePatchDescription) diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_time_rfc3339.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/time_rfc3339.go similarity index 99% rename from sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_time_rfc3339.go rename to sdk/resourcemanager/healthcareapis/armhealthcareapis/time_rfc3339.go index 0b0e56b08cf5..6421580e23e5 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_time_rfc3339.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/time_rfc3339.go @@ -5,6 +5,7 @@ // 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 armhealthcareapis diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_workspaceprivateendpointconnections_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaceprivateendpointconnections_client.go similarity index 97% rename from sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_workspaceprivateendpointconnections_client.go rename to sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaceprivateendpointconnections_client.go index e29515060d73..b929d72d27aa 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_workspaceprivateendpointconnections_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaceprivateendpointconnections_client.go @@ -5,6 +5,7 @@ // 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 armhealthcareapis @@ -56,7 +57,7 @@ func NewWorkspacePrivateEndpointConnectionsClient(subscriptionID string, credent // BeginCreateOrUpdate - Update the state of the specified private endpoint connection associated with the workspace. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // workspaceName - The name of workspace resource. // privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource @@ -77,7 +78,7 @@ func (client *WorkspacePrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx // CreateOrUpdate - Update the state of the specified private endpoint connection associated with the workspace. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 func (client *WorkspacePrivateEndpointConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, properties PrivateEndpointConnectionDescription, options *WorkspacePrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, privateEndpointConnectionName, properties, options) if err != nil { @@ -117,7 +118,7 @@ func (client *WorkspacePrivateEndpointConnectionsClient) createOrUpdateCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, properties) @@ -125,7 +126,7 @@ func (client *WorkspacePrivateEndpointConnectionsClient) createOrUpdateCreateReq // BeginDelete - Deletes a private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // workspaceName - The name of workspace resource. // privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource @@ -145,7 +146,7 @@ func (client *WorkspacePrivateEndpointConnectionsClient) BeginDelete(ctx context // Delete - Deletes a private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 func (client *WorkspacePrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, options *WorkspacePrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, privateEndpointConnectionName, options) if err != nil { @@ -185,7 +186,7 @@ func (client *WorkspacePrivateEndpointConnectionsClient) deleteCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -193,7 +194,7 @@ func (client *WorkspacePrivateEndpointConnectionsClient) deleteCreateRequest(ctx // Get - Gets the specified private endpoint connection associated with the workspace. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // workspaceName - The name of workspace resource. // privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource @@ -238,7 +239,7 @@ func (client *WorkspacePrivateEndpointConnectionsClient) getCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -255,7 +256,7 @@ func (client *WorkspacePrivateEndpointConnectionsClient) getHandleResponse(resp // NewListByWorkspacePager - Lists all private endpoint connections for a workspace. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // workspaceName - The name of workspace resource. // options - WorkspacePrivateEndpointConnectionsClientListByWorkspaceOptions contains the optional parameters for the WorkspacePrivateEndpointConnectionsClient.ListByWorkspace @@ -302,7 +303,7 @@ func (client *WorkspacePrivateEndpointConnectionsClient) listByWorkspaceCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_workspaceprivatelinkresources_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaceprivatelinkresources_client.go similarity index 97% rename from sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_workspaceprivatelinkresources_client.go rename to sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaceprivatelinkresources_client.go index 59ae9ee9492a..7ceff3bcd3df 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_workspaceprivatelinkresources_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaceprivatelinkresources_client.go @@ -5,6 +5,7 @@ // 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 armhealthcareapis @@ -56,7 +57,7 @@ func NewWorkspacePrivateLinkResourcesClient(subscriptionID string, credential az // Get - Gets a private link resource that need to be created for a workspace. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // workspaceName - The name of workspace resource. // groupName - The name of the private link resource group. @@ -101,7 +102,7 @@ func (client *WorkspacePrivateLinkResourcesClient) getCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -118,7 +119,7 @@ func (client *WorkspacePrivateLinkResourcesClient) getHandleResponse(resp *http. // NewListByWorkspacePager - Gets the private link resources that need to be created for a workspace. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // workspaceName - The name of workspace resource. // options - WorkspacePrivateLinkResourcesClientListByWorkspaceOptions contains the optional parameters for the WorkspacePrivateLinkResourcesClient.ListByWorkspace @@ -165,7 +166,7 @@ func (client *WorkspacePrivateLinkResourcesClient) listByWorkspaceCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_workspaces_client.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaces_client.go similarity index 96% rename from sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_workspaces_client.go rename to sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaces_client.go index 897a45f8ceef..66afd5c1e434 100644 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_workspaces_client.go +++ b/sdk/resourcemanager/healthcareapis/armhealthcareapis/workspaces_client.go @@ -5,6 +5,7 @@ // 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 armhealthcareapis @@ -56,7 +57,7 @@ func NewWorkspacesClient(subscriptionID string, credential azcore.TokenCredentia // BeginCreateOrUpdate - Creates or updates a workspace resource with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // workspaceName - The name of workspace resource. // workspace - The parameters for creating or updating a healthcare workspace. @@ -76,7 +77,7 @@ func (client *WorkspacesClient) BeginCreateOrUpdate(ctx context.Context, resourc // CreateOrUpdate - Creates or updates a workspace resource with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 func (client *WorkspacesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, workspace Workspace, options *WorkspacesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, workspace, options) if err != nil { @@ -112,7 +113,7 @@ func (client *WorkspacesClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, workspace) @@ -120,7 +121,7 @@ func (client *WorkspacesClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Deletes a specified workspace. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // workspaceName - The name of workspace resource. // options - WorkspacesClientBeginDeleteOptions contains the optional parameters for the WorkspacesClient.BeginDelete method. @@ -138,7 +139,7 @@ func (client *WorkspacesClient) BeginDelete(ctx context.Context, resourceGroupNa // Delete - Deletes a specified workspace. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 func (client *WorkspacesClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { @@ -174,7 +175,7 @@ func (client *WorkspacesClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -182,7 +183,7 @@ func (client *WorkspacesClient) deleteCreateRequest(ctx context.Context, resourc // Get - Gets the properties of the specified workspace. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // workspaceName - The name of workspace resource. // options - WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method. @@ -221,7 +222,7 @@ func (client *WorkspacesClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -238,7 +239,7 @@ func (client *WorkspacesClient) getHandleResponse(resp *http.Response) (Workspac // NewListByResourceGroupPager - Lists all the available workspaces under the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // options - WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.ListByResourceGroup // method. @@ -286,7 +287,7 @@ func (client *WorkspacesClient) listByResourceGroupCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -303,7 +304,7 @@ func (client *WorkspacesClient) listByResourceGroupHandleResponse(resp *http.Res // NewListBySubscriptionPager - Lists all the available workspaces under the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // options - WorkspacesClientListBySubscriptionOptions contains the optional parameters for the WorkspacesClient.ListBySubscription // method. func (client *WorkspacesClient) NewListBySubscriptionPager(options *WorkspacesClientListBySubscriptionOptions) *runtime.Pager[WorkspacesClientListBySubscriptionResponse] { @@ -346,7 +347,7 @@ func (client *WorkspacesClient) listBySubscriptionCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -363,7 +364,7 @@ func (client *WorkspacesClient) listBySubscriptionHandleResponse(resp *http.Resp // BeginUpdate - Patch workspace details. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the service instance. // workspaceName - The name of workspace resource. // workspacePatchResource - The parameters for updating a specified workspace. @@ -382,7 +383,7 @@ func (client *WorkspacesClient) BeginUpdate(ctx context.Context, resourceGroupNa // Update - Patch workspace details. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-31-preview +// Generated from API version 2022-06-01 func (client *WorkspacesClient) update(ctx context.Context, resourceGroupName string, workspaceName string, workspacePatchResource WorkspacePatchResource, options *WorkspacesClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, workspaceName, workspacePatchResource, options) if err != nil { @@ -418,7 +419,7 @@ func (client *WorkspacesClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-31-preview") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, workspacePatchResource) diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_dicomservices_client_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_dicomservices_client_test.go deleted file mode 100644 index 8a4ccc65a554..000000000000 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_dicomservices_client_test.go +++ /dev/null @@ -1,155 +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 armhealthcareapis_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/healthcareapis/armhealthcareapis" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/dicomservices/DicomServices_List.json -func ExampleDicomServicesClient_NewListByWorkspacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewDicomServicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByWorkspacePager("testRG", - "workspace1", - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/dicomservices/DicomServices_Get.json -func ExampleDicomServicesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewDicomServicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "testRG", - "workspace1", - "blue", - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/dicomservices/DicomServices_Create.json -func ExampleDicomServicesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewDicomServicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "testRG", - "workspace1", - "blue", - armhealthcareapis.DicomService{ - Location: to.Ptr("westus"), - Properties: &armhealthcareapis.DicomServiceProperties{}, - }, - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/dicomservices/DicomServices_Patch.json -func ExampleDicomServicesClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewDicomServicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, - "testRG", - "blue", - "workspace1", - armhealthcareapis.DicomServicePatchResource{ - Tags: map[string]*string{ - "tagKey": to.Ptr("tagValue"), - }, - }, - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/dicomservices/DicomServices_Delete.json -func ExampleDicomServicesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewDicomServicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "testRG", - "blue", - "workspace1", - 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/healthcareapis/armhealthcareapis/ze_generated_example_fhirdestinations_client_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_fhirdestinations_client_test.go deleted file mode 100644 index 6b49c84aed31..000000000000 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_fhirdestinations_client_test.go +++ /dev/null @@ -1,44 +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 armhealthcareapis_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthcareapis/armhealthcareapis" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/iotconnectors/iotconnector_fhirdestination_List.json -func ExampleFhirDestinationsClient_NewListByIotConnectorPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewFhirDestinationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByIotConnectorPager("testRG", - "workspace1", - "blue", - 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/healthcareapis/armhealthcareapis/ze_generated_example_fhirservices_client_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_fhirservices_client_test.go deleted file mode 100644 index 464da0a3d656..000000000000 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_fhirservices_client_test.go +++ /dev/null @@ -1,204 +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 armhealthcareapis_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/healthcareapis/armhealthcareapis" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/fhirservices/FhirServices_List.json -func ExampleFhirServicesClient_NewListByWorkspacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewFhirServicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByWorkspacePager("testRG", - "workspace1", - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/fhirservices/FhirServices_Get.json -func ExampleFhirServicesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewFhirServicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "testRG", - "workspace1", - "fhirservices1", - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/fhirservices/FhirServices_Create.json -func ExampleFhirServicesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewFhirServicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "testRG", - "workspace1", - "fhirservice1", - armhealthcareapis.FhirService{ - Identity: &armhealthcareapis.ServiceManagedIdentityIdentity{ - Type: to.Ptr(armhealthcareapis.ServiceManagedIdentityTypeSystemAssigned), - }, - Location: to.Ptr("westus"), - Tags: map[string]*string{ - "additionalProp1": to.Ptr("string"), - "additionalProp2": to.Ptr("string"), - "additionalProp3": to.Ptr("string"), - }, - Kind: to.Ptr(armhealthcareapis.FhirServiceKindFhirR4), - Properties: &armhealthcareapis.FhirServiceProperties{ - AccessPolicies: []*armhealthcareapis.FhirServiceAccessPolicyEntry{ - { - ObjectID: to.Ptr("c487e7d1-3210-41a3-8ccc-e9372b78da47"), - }, - { - ObjectID: to.Ptr("5b307da8-43d4-492b-8b66-b0294ade872f"), - }}, - AcrConfiguration: &armhealthcareapis.FhirServiceAcrConfiguration{ - LoginServers: []*string{ - to.Ptr("test1.azurecr.io")}, - }, - AuthenticationConfiguration: &armhealthcareapis.FhirServiceAuthenticationConfiguration{ - Audience: to.Ptr("https://azurehealthcareapis.com"), - Authority: to.Ptr("https://login.microsoftonline.com/abfde7b2-df0f-47e6-aabf-2462b07508dc"), - SmartProxyEnabled: to.Ptr(true), - }, - CorsConfiguration: &armhealthcareapis.FhirServiceCorsConfiguration{ - AllowCredentials: to.Ptr(false), - Headers: []*string{ - to.Ptr("*")}, - MaxAge: to.Ptr[int32](1440), - Methods: []*string{ - to.Ptr("DELETE"), - to.Ptr("GET"), - to.Ptr("OPTIONS"), - to.Ptr("PATCH"), - to.Ptr("POST"), - to.Ptr("PUT")}, - Origins: []*string{ - to.Ptr("*")}, - }, - ExportConfiguration: &armhealthcareapis.FhirServiceExportConfiguration{ - StorageAccountName: to.Ptr("existingStorageAccount"), - }, - ImportConfiguration: &armhealthcareapis.FhirServiceImportConfiguration{ - Enabled: to.Ptr(false), - InitialImportMode: to.Ptr(false), - IntegrationDataStore: to.Ptr("existingStorageAccount"), - }, - }, - }, - nil) - if err != nil { - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/fhirservices/FhirServices_Patch.json -func ExampleFhirServicesClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewFhirServicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, - "testRG", - "fhirservice1", - "workspace1", - armhealthcareapis.FhirServicePatchResource{ - Tags: map[string]*string{ - "tagKey": to.Ptr("tagValue"), - }, - }, - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/fhirservices/FhirServices_Delete.json -func ExampleFhirServicesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewFhirServicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "testRG", - "fhirservice1", - "workspace1", - 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/healthcareapis/armhealthcareapis/ze_generated_example_iotconnectorfhirdestination_client_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_iotconnectorfhirdestination_client_test.go deleted file mode 100644 index 42965f00c2dd..000000000000 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_iotconnectorfhirdestination_client_test.go +++ /dev/null @@ -1,130 +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 armhealthcareapis_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/healthcareapis/armhealthcareapis" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/iotconnectors/iotconnector_fhirdestination_Get.json -func ExampleIotConnectorFhirDestinationClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewIotConnectorFhirDestinationClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "testRG", - "workspace1", - "blue", - "dest1", - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/iotconnectors/iotconnector_fhirdestination_Create.json -func ExampleIotConnectorFhirDestinationClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewIotConnectorFhirDestinationClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "testRG", - "workspace1", - "blue", - "dest1", - armhealthcareapis.IotFhirDestination{ - Location: to.Ptr("westus"), - Properties: &armhealthcareapis.IotFhirDestinationProperties{ - FhirMapping: &armhealthcareapis.IotMappingProperties{ - Content: map[string]interface{}{ - "template": []interface{}{ - map[string]interface{}{ - "template": map[string]interface{}{ - "codes": []interface{}{ - map[string]interface{}{ - "code": "8867-4", - "display": "Heart rate", - "system": "http://loinc.org", - }, - }, - "periodInterval": float64(60), - "typeName": "heartrate", - "value": map[string]interface{}{ - "defaultPeriod": float64(5000), - "unit": "count/min", - "valueName": "hr", - "valueType": "SampledData", - }, - }, - "templateType": "CodeValueFhir", - }, - }, - "templateType": "CollectionFhirTemplate", - }, - }, - FhirServiceResourceID: to.Ptr("subscriptions/11111111-2222-3333-4444-555566667777/resourceGroups/myrg/providers/Microsoft.HealthcareApis/workspaces/myworkspace/fhirservices/myfhirservice"), - ResourceIdentityResolutionType: to.Ptr(armhealthcareapis.IotIdentityResolutionTypeCreate), - }, - }, - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/iotconnectors/iotconnector_fhirdestination_Delete.json -func ExampleIotConnectorFhirDestinationClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewIotConnectorFhirDestinationClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "testRG", - "workspace1", - "blue", - "dest1", - 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/healthcareapis/armhealthcareapis/ze_generated_example_iotconnectors_client_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_iotconnectors_client_test.go deleted file mode 100644 index de9354040adc..000000000000 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_iotconnectors_client_test.go +++ /dev/null @@ -1,197 +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 armhealthcareapis_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/healthcareapis/armhealthcareapis" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/iotconnectors/iotconnector_List.json -func ExampleIotConnectorsClient_NewListByWorkspacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewIotConnectorsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByWorkspacePager("testRG", - "workspace1", - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/iotconnectors/iotconnector_Get.json -func ExampleIotConnectorsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewIotConnectorsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "testRG", - "workspace1", - "blue", - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/iotconnectors/iotconnector_Create.json -func ExampleIotConnectorsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewIotConnectorsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "testRG", - "workspace1", - "blue", - armhealthcareapis.IotConnector{ - Identity: &armhealthcareapis.ServiceManagedIdentityIdentity{ - Type: to.Ptr(armhealthcareapis.ServiceManagedIdentityTypeSystemAssigned), - }, - Location: to.Ptr("westus"), - Tags: map[string]*string{ - "additionalProp1": to.Ptr("string"), - "additionalProp2": to.Ptr("string"), - "additionalProp3": to.Ptr("string"), - }, - Properties: &armhealthcareapis.IotConnectorProperties{ - DeviceMapping: &armhealthcareapis.IotMappingProperties{ - Content: map[string]interface{}{ - "template": []interface{}{ - map[string]interface{}{ - "template": map[string]interface{}{ - "deviceIdExpression": "$.deviceid", - "timestampExpression": "$.measurementdatetime", - "typeMatchExpression": "$..[?(@heartrate)]", - "typeName": "heartrate", - "values": []interface{}{ - map[string]interface{}{ - "required": "true", - "valueExpression": "$.heartrate", - "valueName": "hr", - }, - }, - }, - "templateType": "JsonPathContent", - }, - }, - "templateType": "CollectionContent", - }, - }, - IngestionEndpointConfiguration: &armhealthcareapis.IotEventHubIngestionEndpointConfiguration{ - ConsumerGroup: to.Ptr("ConsumerGroupA"), - EventHubName: to.Ptr("MyEventHubName"), - FullyQualifiedEventHubNamespace: to.Ptr("myeventhub.servicesbus.windows.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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/iotconnectors/iotconnector_Patch.json -func ExampleIotConnectorsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewIotConnectorsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, - "testRG", - "blue", - "workspace1", - armhealthcareapis.IotConnectorPatchResource{ - Tags: map[string]*string{ - "additionalProp1": to.Ptr("string"), - "additionalProp2": to.Ptr("string"), - "additionalProp3": to.Ptr("string"), - }, - Identity: &armhealthcareapis.ServiceManagedIdentityIdentity{ - Type: to.Ptr(armhealthcareapis.ServiceManagedIdentityTypeSystemAssigned), - }, - }, - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/iotconnectors/iotconnector_Delete.json -func ExampleIotConnectorsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewIotConnectorsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "testRG", - "blue", - "workspace1", - 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/healthcareapis/armhealthcareapis/ze_generated_example_operationresults_client_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_operationresults_client_test.go deleted file mode 100644 index 782a0eff31a9..000000000000 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_operationresults_client_test.go +++ /dev/null @@ -1,39 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armhealthcareapis_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthcareapis/armhealthcareapis" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/OperationResultsGet.json -func ExampleOperationResultsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewOperationResultsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "westus", - "exampleid", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_operations_client_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_operations_client_test.go deleted file mode 100644 index 90fd86419730..000000000000 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_operations_client_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 armhealthcareapis_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthcareapis/armhealthcareapis" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/OperationsList.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 := armhealthcareapis.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/healthcareapis/armhealthcareapis/ze_generated_example_privateendpointconnections_client_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_privateendpointconnections_client_test.go deleted file mode 100644 index aa55f5692ec4..000000000000 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_privateendpointconnections_client_test.go +++ /dev/null @@ -1,127 +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 armhealthcareapis_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/healthcareapis/armhealthcareapis" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/ServiceListPrivateEndpointConnections.json -func ExamplePrivateEndpointConnectionsClient_NewListByServicePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewPrivateEndpointConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByServicePager("rgname", - "service1", - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/ServiceGetPrivateEndpointConnection.json -func ExamplePrivateEndpointConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewPrivateEndpointConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "rgname", - "service1", - "myConnection", - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/ServiceCreatePrivateEndpointConnection.json -func ExamplePrivateEndpointConnectionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewPrivateEndpointConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "rgname", - "service1", - "myConnection", - armhealthcareapis.PrivateEndpointConnection{ - Properties: &armhealthcareapis.PrivateEndpointConnectionProperties{ - PrivateLinkServiceConnectionState: &armhealthcareapis.PrivateLinkServiceConnectionState{ - Description: to.Ptr("Auto-Approved"), - Status: to.Ptr(armhealthcareapis.PrivateEndpointServiceConnectionStatusApproved), - }, - }, - }, - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/ServiceDeletePrivateEndpointConnection.json -func ExamplePrivateEndpointConnectionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewPrivateEndpointConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "rgname", - "service1", - "myConnection", - 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/healthcareapis/armhealthcareapis/ze_generated_example_privatelinkresources_client_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_privatelinkresources_client_test.go deleted file mode 100644 index 24780d5e0f6e..000000000000 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_privatelinkresources_client_test.go +++ /dev/null @@ -1,62 +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 armhealthcareapis_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthcareapis/armhealthcareapis" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/PrivateLinkResourcesListByService.json -func ExamplePrivateLinkResourcesClient_ListByService() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewPrivateLinkResourcesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListByService(ctx, - "rgname", - "service1", - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/PrivateLinkResourceGet.json -func ExamplePrivateLinkResourcesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewPrivateLinkResourcesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "rgname", - "service1", - "fhir", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_services_client_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_services_client_test.go deleted file mode 100644 index ba3dd268bc76..000000000000 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_services_client_test.go +++ /dev/null @@ -1,241 +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 armhealthcareapis_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/healthcareapis/armhealthcareapis" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/ServiceGet.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 := armhealthcareapis.NewServicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "rg1", - "service1", - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/ServiceCreate.json -func ExampleServicesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewServicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "rg1", - "service1", - armhealthcareapis.ServicesDescription{ - Identity: &armhealthcareapis.ServicesResourceIdentity{ - Type: to.Ptr(armhealthcareapis.ManagedServiceIdentityTypeSystemAssigned), - }, - Kind: to.Ptr(armhealthcareapis.KindFhirR4), - Location: to.Ptr("westus2"), - Tags: map[string]*string{}, - Properties: &armhealthcareapis.ServicesProperties{ - AccessPolicies: []*armhealthcareapis.ServiceAccessPolicyEntry{ - { - ObjectID: to.Ptr("c487e7d1-3210-41a3-8ccc-e9372b78da47"), - }, - { - ObjectID: to.Ptr("5b307da8-43d4-492b-8b66-b0294ade872f"), - }}, - AuthenticationConfiguration: &armhealthcareapis.ServiceAuthenticationConfigurationInfo{ - Audience: to.Ptr("https://azurehealthcareapis.com"), - Authority: to.Ptr("https://login.microsoftonline.com/abfde7b2-df0f-47e6-aabf-2462b07508dc"), - SmartProxyEnabled: to.Ptr(true), - }, - CorsConfiguration: &armhealthcareapis.ServiceCorsConfigurationInfo{ - AllowCredentials: to.Ptr(false), - Headers: []*string{ - to.Ptr("*")}, - MaxAge: to.Ptr[int32](1440), - Methods: []*string{ - to.Ptr("DELETE"), - to.Ptr("GET"), - to.Ptr("OPTIONS"), - to.Ptr("PATCH"), - to.Ptr("POST"), - to.Ptr("PUT")}, - Origins: []*string{ - to.Ptr("*")}, - }, - CosmosDbConfiguration: &armhealthcareapis.ServiceCosmosDbConfigurationInfo{ - KeyVaultKeyURI: to.Ptr("https://my-vault.vault.azure.net/keys/my-key"), - OfferThroughput: to.Ptr[int32](1000), - }, - ExportConfiguration: &armhealthcareapis.ServiceExportConfigurationInfo{ - StorageAccountName: to.Ptr("existingStorageAccount"), - }, - PrivateEndpointConnections: []*armhealthcareapis.PrivateEndpointConnection{}, - PublicNetworkAccess: to.Ptr(armhealthcareapis.PublicNetworkAccessDisabled), - }, - }, - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/ServicePatch.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 := armhealthcareapis.NewServicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, - "rg1", - "service1", - armhealthcareapis.ServicesPatchDescription{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/ServiceDelete.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 := armhealthcareapis.NewServicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "rg1", - "service1", - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/ServiceList.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 := armhealthcareapis.NewServicesClient("subid", 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 - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/legacy/ServiceListByResourceGroup.json -func ExampleServicesClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewServicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("rgname", - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/CheckNameAvailabilityPost.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 := armhealthcareapis.NewServicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CheckNameAvailability(ctx, - armhealthcareapis.CheckNameAvailabilityParameters{ - Name: to.Ptr("serviceName"), - Type: to.Ptr("Microsoft.HealthcareApis/services"), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_workspaceprivateendpointconnections_client_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_workspaceprivateendpointconnections_client_test.go deleted file mode 100644 index 02f833faa906..000000000000 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_workspaceprivateendpointconnections_client_test.go +++ /dev/null @@ -1,127 +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 armhealthcareapis_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/healthcareapis/armhealthcareapis" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/privatelink/WorkspaceListPrivateEndpointConnections.json -func ExampleWorkspacePrivateEndpointConnectionsClient_NewListByWorkspacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewWorkspacePrivateEndpointConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByWorkspacePager("testRG", - "workspace1", - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/privatelink/WorkspaceGetPrivateEndpointConnection.json -func ExampleWorkspacePrivateEndpointConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewWorkspacePrivateEndpointConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "testRG", - "workspace1", - "myConnection", - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/privatelink/WorkspaceCreatePrivateEndpointConnection.json -func ExampleWorkspacePrivateEndpointConnectionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewWorkspacePrivateEndpointConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "testRG", - "workspace1", - "myConnection", - armhealthcareapis.PrivateEndpointConnectionDescription{ - Properties: &armhealthcareapis.PrivateEndpointConnectionProperties{ - PrivateLinkServiceConnectionState: &armhealthcareapis.PrivateLinkServiceConnectionState{ - Description: to.Ptr("Auto-Approved"), - Status: to.Ptr(armhealthcareapis.PrivateEndpointServiceConnectionStatusApproved), - }, - }, - }, - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/privatelink/WorkspaceDeletePrivateEndpointConnection.json -func ExampleWorkspacePrivateEndpointConnectionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewWorkspacePrivateEndpointConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "testRG", - "workspace1", - "myConnection", - 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/healthcareapis/armhealthcareapis/ze_generated_example_workspaceprivatelinkresources_client_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_workspaceprivatelinkresources_client_test.go deleted file mode 100644 index f2052ad84cca..000000000000 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_workspaceprivatelinkresources_client_test.go +++ /dev/null @@ -1,66 +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 armhealthcareapis_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthcareapis/armhealthcareapis" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/privatelink/PrivateLinkResourcesListByWorkspace.json -func ExampleWorkspacePrivateLinkResourcesClient_NewListByWorkspacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewWorkspacePrivateLinkResourcesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByWorkspacePager("testRG", - "workspace1", - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/privatelink/WorkspacePrivateLinkResourceGet.json -func ExampleWorkspacePrivateLinkResourcesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewWorkspacePrivateLinkResourcesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "testRG", - "workspace1", - "healthcareworkspace", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_workspaces_client_test.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_workspaces_client_test.go deleted file mode 100644 index 1a5431436979..000000000000 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/ze_generated_example_workspaces_client_test.go +++ /dev/null @@ -1,174 +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 armhealthcareapis_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/healthcareapis/armhealthcareapis" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/workspaces/Workspaces_ListBySubscription.json -func ExampleWorkspacesClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewWorkspacesClient("subid", 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/workspaces/Workspaces_ListByResourceGroup.json -func ExampleWorkspacesClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewWorkspacesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("testRG", - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/workspaces/Workspaces_Get.json -func ExampleWorkspacesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewWorkspacesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "testRG", - "workspace1", - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/workspaces/Workspaces_Create.json -func ExampleWorkspacesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewWorkspacesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "testRG", - "workspace1", - armhealthcareapis.Workspace{ - Location: to.Ptr("westus"), - Properties: &armhealthcareapis.WorkspaceProperties{}, - }, - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/workspaces/Workspaces_Patch.json -func ExampleWorkspacesClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewWorkspacesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, - "testRG", - "workspace1", - armhealthcareapis.WorkspacePatchResource{ - Tags: map[string]*string{ - "tagKey": to.Ptr("tagValue"), - }, - }, - 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/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2022-01-31-preview/examples/workspaces/Workspaces_Delete.json -func ExampleWorkspacesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armhealthcareapis.NewWorkspacesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "testRG", - "workspace1", - 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/healthcareapis/armhealthcareapis/zz_generated_models_serde.go b/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_models_serde.go deleted file mode 100644 index 9da9a647d247..000000000000 --- a/sdk/resourcemanager/healthcareapis/armhealthcareapis/zz_generated_models_serde.go +++ /dev/null @@ -1,357 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armhealthcareapis - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" -) - -// MarshalJSON implements the json.Marshaller interface for type DicomService. -func (d DicomService) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", d.Etag) - populate(objectMap, "id", d.ID) - populate(objectMap, "identity", d.Identity) - populate(objectMap, "location", d.Location) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "systemData", d.SystemData) - populate(objectMap, "tags", d.Tags) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DicomServiceAuthenticationConfiguration. -func (d DicomServiceAuthenticationConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "audiences", d.Audiences) - populate(objectMap, "authority", d.Authority) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DicomServicePatchResource. -func (d DicomServicePatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "identity", d.Identity) - populate(objectMap, "tags", d.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DicomServiceProperties. -func (d DicomServiceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authenticationConfiguration", d.AuthenticationConfiguration) - populate(objectMap, "privateEndpointConnections", d.PrivateEndpointConnections) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "publicNetworkAccess", d.PublicNetworkAccess) - populate(objectMap, "serviceUrl", d.ServiceURL) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type FhirService. -func (f FhirService) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", f.Etag) - populate(objectMap, "id", f.ID) - populate(objectMap, "identity", f.Identity) - populate(objectMap, "kind", f.Kind) - populate(objectMap, "location", f.Location) - populate(objectMap, "name", f.Name) - populate(objectMap, "properties", f.Properties) - populate(objectMap, "systemData", f.SystemData) - populate(objectMap, "tags", f.Tags) - populate(objectMap, "type", f.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type FhirServiceAcrConfiguration. -func (f FhirServiceAcrConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "loginServers", f.LoginServers) - populate(objectMap, "ociArtifacts", f.OciArtifacts) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type FhirServiceCorsConfiguration. -func (f FhirServiceCorsConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowCredentials", f.AllowCredentials) - populate(objectMap, "headers", f.Headers) - populate(objectMap, "maxAge", f.MaxAge) - populate(objectMap, "methods", f.Methods) - populate(objectMap, "origins", f.Origins) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type FhirServicePatchResource. -func (f FhirServicePatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "identity", f.Identity) - populate(objectMap, "tags", f.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type FhirServiceProperties. -func (f FhirServiceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "accessPolicies", f.AccessPolicies) - populate(objectMap, "acrConfiguration", f.AcrConfiguration) - populate(objectMap, "authenticationConfiguration", f.AuthenticationConfiguration) - populate(objectMap, "corsConfiguration", f.CorsConfiguration) - populate(objectMap, "eventState", f.EventState) - populate(objectMap, "exportConfiguration", f.ExportConfiguration) - populate(objectMap, "importConfiguration", f.ImportConfiguration) - populate(objectMap, "privateEndpointConnections", f.PrivateEndpointConnections) - populate(objectMap, "provisioningState", f.ProvisioningState) - populate(objectMap, "publicNetworkAccess", f.PublicNetworkAccess) - populate(objectMap, "resourceVersionPolicyConfiguration", f.ResourceVersionPolicyConfiguration) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type IotConnector. -func (i IotConnector) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", i.Etag) - populate(objectMap, "id", i.ID) - populate(objectMap, "identity", i.Identity) - populate(objectMap, "location", i.Location) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "systemData", i.SystemData) - populate(objectMap, "tags", i.Tags) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type IotConnectorPatchResource. -func (i IotConnectorPatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "identity", i.Identity) - populate(objectMap, "tags", i.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. -func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "groupId", p.GroupID) - populate(objectMap, "requiredMembers", p.RequiredMembers) - populate(objectMap, "requiredZoneNames", p.RequiredZoneNames) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceTags. -func (r ResourceTags) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "tags", r.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceVersionPolicyConfiguration. -func (r ResourceVersionPolicyConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "default", r.Default) - populate(objectMap, "resourceTypeOverrides", r.ResourceTypeOverrides) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceAcrConfigurationInfo. -func (s ServiceAcrConfigurationInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "loginServers", s.LoginServers) - populate(objectMap, "ociArtifacts", s.OciArtifacts) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceCorsConfigurationInfo. -func (s ServiceCorsConfigurationInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowCredentials", s.AllowCredentials) - populate(objectMap, "headers", s.Headers) - populate(objectMap, "maxAge", s.MaxAge) - populate(objectMap, "methods", s.Methods) - populate(objectMap, "origins", s.Origins) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceManagedIdentityIdentity. -func (s ServiceManagedIdentityIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "principalId", s.PrincipalID) - populate(objectMap, "tenantId", s.TenantID) - populate(objectMap, "type", s.Type) - populate(objectMap, "userAssignedIdentities", s.UserAssignedIdentities) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ServicesDescription. -func (s ServicesDescription) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", s.Etag) - populate(objectMap, "id", s.ID) - populate(objectMap, "identity", s.Identity) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "location", s.Location) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "systemData", s.SystemData) - populate(objectMap, "tags", s.Tags) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ServicesPatchDescription. -func (s ServicesPatchDescription) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "tags", s.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ServicesProperties. -func (s ServicesProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "accessPolicies", s.AccessPolicies) - populate(objectMap, "acrConfiguration", s.AcrConfiguration) - populate(objectMap, "authenticationConfiguration", s.AuthenticationConfiguration) - populate(objectMap, "corsConfiguration", s.CorsConfiguration) - populate(objectMap, "cosmosDbConfiguration", s.CosmosDbConfiguration) - populate(objectMap, "exportConfiguration", s.ExportConfiguration) - populate(objectMap, "importConfiguration", s.ImportConfiguration) - populate(objectMap, "privateEndpointConnections", s.PrivateEndpointConnections) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "publicNetworkAccess", s.PublicNetworkAccess) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ServicesResource. -func (s ServicesResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", s.Etag) - populate(objectMap, "id", s.ID) - populate(objectMap, "identity", s.Identity) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "location", s.Location) - populate(objectMap, "name", s.Name) - populate(objectMap, "tags", s.Tags) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SystemData. -func (s SystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) - populate(objectMap, "createdBy", s.CreatedBy) - populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) - populate(objectMap, "lastModifiedBy", s.LastModifiedBy) - populate(objectMap, "lastModifiedByType", s.LastModifiedByType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. -func (s *SystemData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) - delete(rawMsg, key) - case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) - delete(rawMsg, key) - case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) - delete(rawMsg, key) - case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) - delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) - delete(rawMsg, key) - case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TaggedResource. -func (t TaggedResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", t.Etag) - populate(objectMap, "id", t.ID) - populate(objectMap, "location", t.Location) - populate(objectMap, "name", t.Name) - populate(objectMap, "tags", t.Tags) - populate(objectMap, "type", t.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Workspace. -func (w Workspace) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", w.Etag) - populate(objectMap, "id", w.ID) - populate(objectMap, "location", w.Location) - populate(objectMap, "name", w.Name) - populate(objectMap, "properties", w.Properties) - populate(objectMap, "systemData", w.SystemData) - populate(objectMap, "tags", w.Tags) - populate(objectMap, "type", w.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WorkspacePatchResource. -func (w WorkspacePatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "tags", w.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WorkspaceProperties. -func (w WorkspaceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "privateEndpointConnections", w.PrivateEndpointConnections) - populate(objectMap, "provisioningState", w.ProvisioningState) - populate(objectMap, "publicNetworkAccess", w.PublicNetworkAccess) - return json.Marshal(objectMap) -} - -func populate(m map[string]interface{}, k string, v interface{}) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else if !reflect.ValueOf(v).IsNil() { - m[k] = v - } -} - -func unpopulate(data json.RawMessage, fn string, v interface{}) error { - if data == nil { - return nil - } - if err := json.Unmarshal(data, v); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - return nil -}