// 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. DO NOT EDIT.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

package armproviderhub

import (
	"encoding/json"
	"fmt"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore"
	"reflect"
)

// MarshalJSON implements the json.Marshaller interface for type APIProfile.
func (a APIProfile) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "apiVersion", a.APIVersion)
	populate(objectMap, "profileVersion", a.ProfileVersion)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type APIProfile.
func (a *APIProfile) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "apiVersion":
			err = unpopulate(val, "APIVersion", &a.APIVersion)
			delete(rawMsg, key)
		case "profileVersion":
			err = unpopulate(val, "ProfileVersion", &a.ProfileVersion)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type AdditionalAuthorization.
func (a AdditionalAuthorization) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "applicationId", a.ApplicationID)
	populate(objectMap, "roleDefinitionId", a.RoleDefinitionID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type AdditionalAuthorization.
func (a *AdditionalAuthorization) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "applicationId":
			err = unpopulate(val, "ApplicationID", &a.ApplicationID)
			delete(rawMsg, key)
		case "roleDefinitionId":
			err = unpopulate(val, "RoleDefinitionID", &a.RoleDefinitionID)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type AllowedResourceName.
func (a AllowedResourceName) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "getActionVerb", a.GetActionVerb)
	populate(objectMap, "name", a.Name)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type AllowedResourceName.
func (a *AllowedResourceName) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "getActionVerb":
			err = unpopulate(val, "GetActionVerb", &a.GetActionVerb)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &a.Name)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type AllowedUnauthorizedActionsExtension.
func (a AllowedUnauthorizedActionsExtension) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "action", a.Action)
	populate(objectMap, "intent", a.Intent)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type AllowedUnauthorizedActionsExtension.
func (a *AllowedUnauthorizedActionsExtension) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "action":
			err = unpopulate(val, "Action", &a.Action)
			delete(rawMsg, key)
		case "intent":
			err = unpopulate(val, "Intent", &a.Intent)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ApplicationDataAuthorization.
func (a ApplicationDataAuthorization) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "resourceTypes", a.ResourceTypes)
	populate(objectMap, "role", a.Role)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationDataAuthorization.
func (a *ApplicationDataAuthorization) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "resourceTypes":
			err = unpopulate(val, "ResourceTypes", &a.ResourceTypes)
			delete(rawMsg, key)
		case "role":
			err = unpopulate(val, "Role", &a.Role)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ApplicationProviderAuthorization.
func (a ApplicationProviderAuthorization) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "managedByRoleDefinitionId", a.ManagedByRoleDefinitionID)
	populate(objectMap, "roleDefinitionId", a.RoleDefinitionID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationProviderAuthorization.
func (a *ApplicationProviderAuthorization) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "managedByRoleDefinitionId":
			err = unpopulate(val, "ManagedByRoleDefinitionID", &a.ManagedByRoleDefinitionID)
			delete(rawMsg, key)
		case "roleDefinitionId":
			err = unpopulate(val, "RoleDefinitionID", &a.RoleDefinitionID)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type AsyncOperationPollingRules.
func (a AsyncOperationPollingRules) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "additionalOptions", a.AdditionalOptions)
	populate(objectMap, "authorizationActions", a.AuthorizationActions)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type AsyncOperationPollingRules.
func (a *AsyncOperationPollingRules) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "additionalOptions":
			err = unpopulate(val, "AdditionalOptions", &a.AdditionalOptions)
			delete(rawMsg, key)
		case "authorizationActions":
			err = unpopulate(val, "AuthorizationActions", &a.AuthorizationActions)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type AsyncTimeoutRule.
func (a AsyncTimeoutRule) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "actionName", a.ActionName)
	populate(objectMap, "timeout", a.Timeout)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type AsyncTimeoutRule.
func (a *AsyncTimeoutRule) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "actionName":
			err = unpopulate(val, "ActionName", &a.ActionName)
			delete(rawMsg, key)
		case "timeout":
			err = unpopulate(val, "Timeout", &a.Timeout)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type AuthorizationActionMapping.
func (a AuthorizationActionMapping) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "desired", a.Desired)
	populate(objectMap, "original", a.Original)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationActionMapping.
func (a *AuthorizationActionMapping) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "desired":
			err = unpopulate(val, "Desired", &a.Desired)
			delete(rawMsg, key)
		case "original":
			err = unpopulate(val, "Original", &a.Original)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type AuthorizedApplication.
func (a AuthorizedApplication) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "id", a.ID)
	populate(objectMap, "name", a.Name)
	populate(objectMap, "properties", a.Properties)
	populate(objectMap, "systemData", a.SystemData)
	populate(objectMap, "type", a.Type)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizedApplication.
func (a *AuthorizedApplication) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "id":
			err = unpopulate(val, "ID", &a.ID)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &a.Name)
			delete(rawMsg, key)
		case "properties":
			err = unpopulate(val, "Properties", &a.Properties)
			delete(rawMsg, key)
		case "systemData":
			err = unpopulate(val, "SystemData", &a.SystemData)
			delete(rawMsg, key)
		case "type":
			err = unpopulate(val, "Type", &a.Type)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type AuthorizedApplicationArrayResponseWithContinuation.
func (a AuthorizedApplicationArrayResponseWithContinuation) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "nextLink", a.NextLink)
	populate(objectMap, "value", a.Value)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizedApplicationArrayResponseWithContinuation.
func (a *AuthorizedApplicationArrayResponseWithContinuation) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "nextLink":
			err = unpopulate(val, "NextLink", &a.NextLink)
			delete(rawMsg, key)
		case "value":
			err = unpopulate(val, "Value", &a.Value)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type AuthorizedApplicationProperties.
func (a AuthorizedApplicationProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "dataAuthorizations", a.DataAuthorizations)
	populate(objectMap, "providerAuthorization", a.ProviderAuthorization)
	populate(objectMap, "provisioningState", a.ProvisioningState)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizedApplicationProperties.
func (a *AuthorizedApplicationProperties) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "dataAuthorizations":
			err = unpopulate(val, "DataAuthorizations", &a.DataAuthorizations)
			delete(rawMsg, key)
		case "providerAuthorization":
			err = unpopulate(val, "ProviderAuthorization", &a.ProviderAuthorization)
			delete(rawMsg, key)
		case "provisioningState":
			err = unpopulate(val, "ProvisioningState", &a.ProvisioningState)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type CanaryTrafficRegionRolloutConfiguration.
func (c CanaryTrafficRegionRolloutConfiguration) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "regions", c.Regions)
	populate(objectMap, "skipRegions", c.SkipRegions)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type CanaryTrafficRegionRolloutConfiguration.
func (c *CanaryTrafficRegionRolloutConfiguration) UnmarshalJSON(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 "regions":
			err = unpopulate(val, "Regions", &c.Regions)
			delete(rawMsg, key)
		case "skipRegions":
			err = unpopulate(val, "SkipRegions", &c.SkipRegions)
			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 CheckNameAvailabilitySpecifications.
func (c CheckNameAvailabilitySpecifications) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "enableDefaultValidation", c.EnableDefaultValidation)
	populate(objectMap, "resourceTypesWithCustomValidation", c.ResourceTypesWithCustomValidation)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilitySpecifications.
func (c *CheckNameAvailabilitySpecifications) UnmarshalJSON(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 "enableDefaultValidation":
			err = unpopulate(val, "EnableDefaultValidation", &c.EnableDefaultValidation)
			delete(rawMsg, key)
		case "resourceTypesWithCustomValidation":
			err = unpopulate(val, "ResourceTypesWithCustomValidation", &c.ResourceTypesWithCustomValidation)
			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 CheckinManifestInfo.
func (c CheckinManifestInfo) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "commitId", c.CommitID)
	populate(objectMap, "isCheckedIn", c.IsCheckedIn)
	populate(objectMap, "pullRequest", c.PullRequest)
	populate(objectMap, "statusMessage", c.StatusMessage)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type CheckinManifestInfo.
func (c *CheckinManifestInfo) UnmarshalJSON(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 "commitId":
			err = unpopulate(val, "CommitID", &c.CommitID)
			delete(rawMsg, key)
		case "isCheckedIn":
			err = unpopulate(val, "IsCheckedIn", &c.IsCheckedIn)
			delete(rawMsg, key)
		case "pullRequest":
			err = unpopulate(val, "PullRequest", &c.PullRequest)
			delete(rawMsg, key)
		case "statusMessage":
			err = unpopulate(val, "StatusMessage", &c.StatusMessage)
			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 CheckinManifestParams.
func (c CheckinManifestParams) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "baselineArmManifestLocation", c.BaselineArmManifestLocation)
	populate(objectMap, "environment", c.Environment)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type CheckinManifestParams.
func (c *CheckinManifestParams) UnmarshalJSON(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 "baselineArmManifestLocation":
			err = unpopulate(val, "BaselineArmManifestLocation", &c.BaselineArmManifestLocation)
			delete(rawMsg, key)
		case "environment":
			err = unpopulate(val, "Environment", &c.Environment)
			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 CustomRollout.
func (c CustomRollout) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "id", c.ID)
	populate(objectMap, "name", c.Name)
	populate(objectMap, "properties", c.Properties)
	populate(objectMap, "systemData", c.SystemData)
	populate(objectMap, "type", c.Type)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type CustomRollout.
func (c *CustomRollout) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", c, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "id":
			err = unpopulate(val, "ID", &c.ID)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &c.Name)
			delete(rawMsg, key)
		case "properties":
			err = unpopulate(val, "Properties", &c.Properties)
			delete(rawMsg, key)
		case "systemData":
			err = unpopulate(val, "SystemData", &c.SystemData)
			delete(rawMsg, key)
		case "type":
			err = unpopulate(val, "Type", &c.Type)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", c, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type CustomRolloutArrayResponseWithContinuation.
func (c CustomRolloutArrayResponseWithContinuation) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "nextLink", c.NextLink)
	populate(objectMap, "value", c.Value)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type CustomRolloutArrayResponseWithContinuation.
func (c *CustomRolloutArrayResponseWithContinuation) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", c, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "nextLink":
			err = unpopulate(val, "NextLink", &c.NextLink)
			delete(rawMsg, key)
		case "value":
			err = unpopulate(val, "Value", &c.Value)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", c, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type CustomRolloutProperties.
func (c CustomRolloutProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "provisioningState", c.ProvisioningState)
	populate(objectMap, "specification", c.Specification)
	populate(objectMap, "status", c.Status)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type CustomRolloutProperties.
func (c *CustomRolloutProperties) UnmarshalJSON(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 "provisioningState":
			err = unpopulate(val, "ProvisioningState", &c.ProvisioningState)
			delete(rawMsg, key)
		case "specification":
			err = unpopulate(val, "Specification", &c.Specification)
			delete(rawMsg, key)
		case "status":
			err = unpopulate(val, "Status", &c.Status)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", c, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type CustomRolloutPropertiesSpecification.
func (c CustomRolloutPropertiesSpecification) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "autoProvisionConfig", c.AutoProvisionConfig)
	populate(objectMap, "canary", c.Canary)
	populate(objectMap, "providerRegistration", c.ProviderRegistration)
	populate(objectMap, "refreshSubscriptionRegistration", c.RefreshSubscriptionRegistration)
	populate(objectMap, "releaseScopes", c.ReleaseScopes)
	populate(objectMap, "resourceTypeRegistrations", c.ResourceTypeRegistrations)
	populate(objectMap, "skipReleaseScopeValidation", c.SkipReleaseScopeValidation)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type CustomRolloutPropertiesSpecification.
func (c *CustomRolloutPropertiesSpecification) UnmarshalJSON(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 "autoProvisionConfig":
			err = unpopulate(val, "AutoProvisionConfig", &c.AutoProvisionConfig)
			delete(rawMsg, key)
		case "canary":
			err = unpopulate(val, "Canary", &c.Canary)
			delete(rawMsg, key)
		case "providerRegistration":
			err = unpopulate(val, "ProviderRegistration", &c.ProviderRegistration)
			delete(rawMsg, key)
		case "refreshSubscriptionRegistration":
			err = unpopulate(val, "RefreshSubscriptionRegistration", &c.RefreshSubscriptionRegistration)
			delete(rawMsg, key)
		case "releaseScopes":
			err = unpopulate(val, "ReleaseScopes", &c.ReleaseScopes)
			delete(rawMsg, key)
		case "resourceTypeRegistrations":
			err = unpopulate(val, "ResourceTypeRegistrations", &c.ResourceTypeRegistrations)
			delete(rawMsg, key)
		case "skipReleaseScopeValidation":
			err = unpopulate(val, "SkipReleaseScopeValidation", &c.SkipReleaseScopeValidation)
			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 CustomRolloutPropertiesStatus.
func (c CustomRolloutPropertiesStatus) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "completedRegions", c.CompletedRegions)
	populate(objectMap, "failedOrSkippedRegions", c.FailedOrSkippedRegions)
	populate(objectMap, "manifestCheckinStatus", c.ManifestCheckinStatus)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type CustomRolloutPropertiesStatus.
func (c *CustomRolloutPropertiesStatus) UnmarshalJSON(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 "completedRegions":
			err = unpopulate(val, "CompletedRegions", &c.CompletedRegions)
			delete(rawMsg, key)
		case "failedOrSkippedRegions":
			err = unpopulate(val, "FailedOrSkippedRegions", &c.FailedOrSkippedRegions)
			delete(rawMsg, key)
		case "manifestCheckinStatus":
			err = unpopulate(val, "ManifestCheckinStatus", &c.ManifestCheckinStatus)
			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 CustomRolloutSpecification.
func (c CustomRolloutSpecification) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "autoProvisionConfig", c.AutoProvisionConfig)
	populate(objectMap, "canary", c.Canary)
	populate(objectMap, "providerRegistration", c.ProviderRegistration)
	populate(objectMap, "refreshSubscriptionRegistration", c.RefreshSubscriptionRegistration)
	populate(objectMap, "releaseScopes", c.ReleaseScopes)
	populate(objectMap, "resourceTypeRegistrations", c.ResourceTypeRegistrations)
	populate(objectMap, "skipReleaseScopeValidation", c.SkipReleaseScopeValidation)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type CustomRolloutSpecification.
func (c *CustomRolloutSpecification) UnmarshalJSON(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 "autoProvisionConfig":
			err = unpopulate(val, "AutoProvisionConfig", &c.AutoProvisionConfig)
			delete(rawMsg, key)
		case "canary":
			err = unpopulate(val, "Canary", &c.Canary)
			delete(rawMsg, key)
		case "providerRegistration":
			err = unpopulate(val, "ProviderRegistration", &c.ProviderRegistration)
			delete(rawMsg, key)
		case "refreshSubscriptionRegistration":
			err = unpopulate(val, "RefreshSubscriptionRegistration", &c.RefreshSubscriptionRegistration)
			delete(rawMsg, key)
		case "releaseScopes":
			err = unpopulate(val, "ReleaseScopes", &c.ReleaseScopes)
			delete(rawMsg, key)
		case "resourceTypeRegistrations":
			err = unpopulate(val, "ResourceTypeRegistrations", &c.ResourceTypeRegistrations)
			delete(rawMsg, key)
		case "skipReleaseScopeValidation":
			err = unpopulate(val, "SkipReleaseScopeValidation", &c.SkipReleaseScopeValidation)
			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 CustomRolloutSpecificationAutoProvisionConfig.
func (c CustomRolloutSpecificationAutoProvisionConfig) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "resourceGraph", c.ResourceGraph)
	populate(objectMap, "storage", c.Storage)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type CustomRolloutSpecificationAutoProvisionConfig.
func (c *CustomRolloutSpecificationAutoProvisionConfig) UnmarshalJSON(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 "resourceGraph":
			err = unpopulate(val, "ResourceGraph", &c.ResourceGraph)
			delete(rawMsg, key)
		case "storage":
			err = unpopulate(val, "Storage", &c.Storage)
			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 CustomRolloutSpecificationCanary.
func (c CustomRolloutSpecificationCanary) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "regions", c.Regions)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type CustomRolloutSpecificationCanary.
func (c *CustomRolloutSpecificationCanary) UnmarshalJSON(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 "regions":
			err = unpopulate(val, "Regions", &c.Regions)
			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 CustomRolloutSpecificationProviderRegistration.
func (c CustomRolloutSpecificationProviderRegistration) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "id", c.ID)
	populate(objectMap, "kind", c.Kind)
	populate(objectMap, "name", c.Name)
	populate(objectMap, "properties", c.Properties)
	populate(objectMap, "systemData", c.SystemData)
	populate(objectMap, "type", c.Type)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type CustomRolloutSpecificationProviderRegistration.
func (c *CustomRolloutSpecificationProviderRegistration) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", c, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "id":
			err = unpopulate(val, "ID", &c.ID)
			delete(rawMsg, key)
		case "kind":
			err = unpopulate(val, "Kind", &c.Kind)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &c.Name)
			delete(rawMsg, key)
		case "properties":
			err = unpopulate(val, "Properties", &c.Properties)
			delete(rawMsg, key)
		case "systemData":
			err = unpopulate(val, "SystemData", &c.SystemData)
			delete(rawMsg, key)
		case "type":
			err = unpopulate(val, "Type", &c.Type)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", c, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type CustomRolloutStatus.
func (c CustomRolloutStatus) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "completedRegions", c.CompletedRegions)
	populate(objectMap, "failedOrSkippedRegions", c.FailedOrSkippedRegions)
	populate(objectMap, "manifestCheckinStatus", c.ManifestCheckinStatus)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type CustomRolloutStatus.
func (c *CustomRolloutStatus) UnmarshalJSON(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 "completedRegions":
			err = unpopulate(val, "CompletedRegions", &c.CompletedRegions)
			delete(rawMsg, key)
		case "failedOrSkippedRegions":
			err = unpopulate(val, "FailedOrSkippedRegions", &c.FailedOrSkippedRegions)
			delete(rawMsg, key)
		case "manifestCheckinStatus":
			err = unpopulate(val, "ManifestCheckinStatus", &c.ManifestCheckinStatus)
			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 CustomRolloutStatusManifestCheckinStatus.
func (c CustomRolloutStatusManifestCheckinStatus) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "commitId", c.CommitID)
	populate(objectMap, "isCheckedIn", c.IsCheckedIn)
	populate(objectMap, "pullRequest", c.PullRequest)
	populate(objectMap, "statusMessage", c.StatusMessage)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type CustomRolloutStatusManifestCheckinStatus.
func (c *CustomRolloutStatusManifestCheckinStatus) UnmarshalJSON(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 "commitId":
			err = unpopulate(val, "CommitID", &c.CommitID)
			delete(rawMsg, key)
		case "isCheckedIn":
			err = unpopulate(val, "IsCheckedIn", &c.IsCheckedIn)
			delete(rawMsg, key)
		case "pullRequest":
			err = unpopulate(val, "PullRequest", &c.PullRequest)
			delete(rawMsg, key)
		case "statusMessage":
			err = unpopulate(val, "StatusMessage", &c.StatusMessage)
			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 DefaultRollout.
func (d DefaultRollout) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "id", d.ID)
	populate(objectMap, "name", d.Name)
	populate(objectMap, "properties", d.Properties)
	populate(objectMap, "systemData", d.SystemData)
	populate(objectMap, "type", d.Type)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultRollout.
func (d *DefaultRollout) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", d, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "id":
			err = unpopulate(val, "ID", &d.ID)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &d.Name)
			delete(rawMsg, key)
		case "properties":
			err = unpopulate(val, "Properties", &d.Properties)
			delete(rawMsg, key)
		case "systemData":
			err = unpopulate(val, "SystemData", &d.SystemData)
			delete(rawMsg, key)
		case "type":
			err = unpopulate(val, "Type", &d.Type)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", d, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type DefaultRolloutArrayResponseWithContinuation.
func (d DefaultRolloutArrayResponseWithContinuation) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "nextLink", d.NextLink)
	populate(objectMap, "value", d.Value)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultRolloutArrayResponseWithContinuation.
func (d *DefaultRolloutArrayResponseWithContinuation) UnmarshalJSON(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 DefaultRolloutProperties.
func (d DefaultRolloutProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "provisioningState", d.ProvisioningState)
	populate(objectMap, "specification", d.Specification)
	populate(objectMap, "status", d.Status)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultRolloutProperties.
func (d *DefaultRolloutProperties) UnmarshalJSON(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 "provisioningState":
			err = unpopulate(val, "ProvisioningState", &d.ProvisioningState)
			delete(rawMsg, key)
		case "specification":
			err = unpopulate(val, "Specification", &d.Specification)
			delete(rawMsg, key)
		case "status":
			err = unpopulate(val, "Status", &d.Status)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", d, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type DefaultRolloutPropertiesSpecification.
func (d DefaultRolloutPropertiesSpecification) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "autoProvisionConfig", d.AutoProvisionConfig)
	populate(objectMap, "canary", d.Canary)
	populate(objectMap, "expeditedRollout", d.ExpeditedRollout)
	populate(objectMap, "highTraffic", d.HighTraffic)
	populate(objectMap, "lowTraffic", d.LowTraffic)
	populate(objectMap, "mediumTraffic", d.MediumTraffic)
	populate(objectMap, "providerRegistration", d.ProviderRegistration)
	populate(objectMap, "resourceTypeRegistrations", d.ResourceTypeRegistrations)
	populate(objectMap, "restOfTheWorldGroupOne", d.RestOfTheWorldGroupOne)
	populate(objectMap, "restOfTheWorldGroupTwo", d.RestOfTheWorldGroupTwo)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultRolloutPropertiesSpecification.
func (d *DefaultRolloutPropertiesSpecification) UnmarshalJSON(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 "autoProvisionConfig":
			err = unpopulate(val, "AutoProvisionConfig", &d.AutoProvisionConfig)
			delete(rawMsg, key)
		case "canary":
			err = unpopulate(val, "Canary", &d.Canary)
			delete(rawMsg, key)
		case "expeditedRollout":
			err = unpopulate(val, "ExpeditedRollout", &d.ExpeditedRollout)
			delete(rawMsg, key)
		case "highTraffic":
			err = unpopulate(val, "HighTraffic", &d.HighTraffic)
			delete(rawMsg, key)
		case "lowTraffic":
			err = unpopulate(val, "LowTraffic", &d.LowTraffic)
			delete(rawMsg, key)
		case "mediumTraffic":
			err = unpopulate(val, "MediumTraffic", &d.MediumTraffic)
			delete(rawMsg, key)
		case "providerRegistration":
			err = unpopulate(val, "ProviderRegistration", &d.ProviderRegistration)
			delete(rawMsg, key)
		case "resourceTypeRegistrations":
			err = unpopulate(val, "ResourceTypeRegistrations", &d.ResourceTypeRegistrations)
			delete(rawMsg, key)
		case "restOfTheWorldGroupOne":
			err = unpopulate(val, "RestOfTheWorldGroupOne", &d.RestOfTheWorldGroupOne)
			delete(rawMsg, key)
		case "restOfTheWorldGroupTwo":
			err = unpopulate(val, "RestOfTheWorldGroupTwo", &d.RestOfTheWorldGroupTwo)
			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 DefaultRolloutPropertiesStatus.
func (d DefaultRolloutPropertiesStatus) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "completedRegions", d.CompletedRegions)
	populate(objectMap, "failedOrSkippedRegions", d.FailedOrSkippedRegions)
	populate(objectMap, "manifestCheckinStatus", d.ManifestCheckinStatus)
	populate(objectMap, "nextTrafficRegion", d.NextTrafficRegion)
	populateDateTimeRFC3339(objectMap, "nextTrafficRegionScheduledTime", d.NextTrafficRegionScheduledTime)
	populate(objectMap, "subscriptionReregistrationResult", d.SubscriptionReregistrationResult)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultRolloutPropertiesStatus.
func (d *DefaultRolloutPropertiesStatus) UnmarshalJSON(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 "completedRegions":
			err = unpopulate(val, "CompletedRegions", &d.CompletedRegions)
			delete(rawMsg, key)
		case "failedOrSkippedRegions":
			err = unpopulate(val, "FailedOrSkippedRegions", &d.FailedOrSkippedRegions)
			delete(rawMsg, key)
		case "manifestCheckinStatus":
			err = unpopulate(val, "ManifestCheckinStatus", &d.ManifestCheckinStatus)
			delete(rawMsg, key)
		case "nextTrafficRegion":
			err = unpopulate(val, "NextTrafficRegion", &d.NextTrafficRegion)
			delete(rawMsg, key)
		case "nextTrafficRegionScheduledTime":
			err = unpopulateDateTimeRFC3339(val, "NextTrafficRegionScheduledTime", &d.NextTrafficRegionScheduledTime)
			delete(rawMsg, key)
		case "subscriptionReregistrationResult":
			err = unpopulate(val, "SubscriptionReregistrationResult", &d.SubscriptionReregistrationResult)
			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 DefaultRolloutSpecification.
func (d DefaultRolloutSpecification) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "autoProvisionConfig", d.AutoProvisionConfig)
	populate(objectMap, "canary", d.Canary)
	populate(objectMap, "expeditedRollout", d.ExpeditedRollout)
	populate(objectMap, "highTraffic", d.HighTraffic)
	populate(objectMap, "lowTraffic", d.LowTraffic)
	populate(objectMap, "mediumTraffic", d.MediumTraffic)
	populate(objectMap, "providerRegistration", d.ProviderRegistration)
	populate(objectMap, "resourceTypeRegistrations", d.ResourceTypeRegistrations)
	populate(objectMap, "restOfTheWorldGroupOne", d.RestOfTheWorldGroupOne)
	populate(objectMap, "restOfTheWorldGroupTwo", d.RestOfTheWorldGroupTwo)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultRolloutSpecification.
func (d *DefaultRolloutSpecification) UnmarshalJSON(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 "autoProvisionConfig":
			err = unpopulate(val, "AutoProvisionConfig", &d.AutoProvisionConfig)
			delete(rawMsg, key)
		case "canary":
			err = unpopulate(val, "Canary", &d.Canary)
			delete(rawMsg, key)
		case "expeditedRollout":
			err = unpopulate(val, "ExpeditedRollout", &d.ExpeditedRollout)
			delete(rawMsg, key)
		case "highTraffic":
			err = unpopulate(val, "HighTraffic", &d.HighTraffic)
			delete(rawMsg, key)
		case "lowTraffic":
			err = unpopulate(val, "LowTraffic", &d.LowTraffic)
			delete(rawMsg, key)
		case "mediumTraffic":
			err = unpopulate(val, "MediumTraffic", &d.MediumTraffic)
			delete(rawMsg, key)
		case "providerRegistration":
			err = unpopulate(val, "ProviderRegistration", &d.ProviderRegistration)
			delete(rawMsg, key)
		case "resourceTypeRegistrations":
			err = unpopulate(val, "ResourceTypeRegistrations", &d.ResourceTypeRegistrations)
			delete(rawMsg, key)
		case "restOfTheWorldGroupOne":
			err = unpopulate(val, "RestOfTheWorldGroupOne", &d.RestOfTheWorldGroupOne)
			delete(rawMsg, key)
		case "restOfTheWorldGroupTwo":
			err = unpopulate(val, "RestOfTheWorldGroupTwo", &d.RestOfTheWorldGroupTwo)
			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 DefaultRolloutSpecificationAutoProvisionConfig.
func (d DefaultRolloutSpecificationAutoProvisionConfig) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "resourceGraph", d.ResourceGraph)
	populate(objectMap, "storage", d.Storage)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultRolloutSpecificationAutoProvisionConfig.
func (d *DefaultRolloutSpecificationAutoProvisionConfig) UnmarshalJSON(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 "resourceGraph":
			err = unpopulate(val, "ResourceGraph", &d.ResourceGraph)
			delete(rawMsg, key)
		case "storage":
			err = unpopulate(val, "Storage", &d.Storage)
			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 DefaultRolloutSpecificationCanary.
func (d DefaultRolloutSpecificationCanary) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "regions", d.Regions)
	populate(objectMap, "skipRegions", d.SkipRegions)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultRolloutSpecificationCanary.
func (d *DefaultRolloutSpecificationCanary) UnmarshalJSON(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 "regions":
			err = unpopulate(val, "Regions", &d.Regions)
			delete(rawMsg, key)
		case "skipRegions":
			err = unpopulate(val, "SkipRegions", &d.SkipRegions)
			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 DefaultRolloutSpecificationExpeditedRollout.
func (d DefaultRolloutSpecificationExpeditedRollout) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "enabled", d.Enabled)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultRolloutSpecificationExpeditedRollout.
func (d *DefaultRolloutSpecificationExpeditedRollout) UnmarshalJSON(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 "enabled":
			err = unpopulate(val, "Enabled", &d.Enabled)
			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 DefaultRolloutSpecificationHighTraffic.
func (d DefaultRolloutSpecificationHighTraffic) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "regions", d.Regions)
	populate(objectMap, "waitDuration", d.WaitDuration)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultRolloutSpecificationHighTraffic.
func (d *DefaultRolloutSpecificationHighTraffic) UnmarshalJSON(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 "regions":
			err = unpopulate(val, "Regions", &d.Regions)
			delete(rawMsg, key)
		case "waitDuration":
			err = unpopulate(val, "WaitDuration", &d.WaitDuration)
			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 DefaultRolloutSpecificationLowTraffic.
func (d DefaultRolloutSpecificationLowTraffic) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "regions", d.Regions)
	populate(objectMap, "waitDuration", d.WaitDuration)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultRolloutSpecificationLowTraffic.
func (d *DefaultRolloutSpecificationLowTraffic) UnmarshalJSON(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 "regions":
			err = unpopulate(val, "Regions", &d.Regions)
			delete(rawMsg, key)
		case "waitDuration":
			err = unpopulate(val, "WaitDuration", &d.WaitDuration)
			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 DefaultRolloutSpecificationMediumTraffic.
func (d DefaultRolloutSpecificationMediumTraffic) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "regions", d.Regions)
	populate(objectMap, "waitDuration", d.WaitDuration)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultRolloutSpecificationMediumTraffic.
func (d *DefaultRolloutSpecificationMediumTraffic) UnmarshalJSON(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 "regions":
			err = unpopulate(val, "Regions", &d.Regions)
			delete(rawMsg, key)
		case "waitDuration":
			err = unpopulate(val, "WaitDuration", &d.WaitDuration)
			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 DefaultRolloutSpecificationProviderRegistration.
func (d DefaultRolloutSpecificationProviderRegistration) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "id", d.ID)
	populate(objectMap, "kind", d.Kind)
	populate(objectMap, "name", d.Name)
	populate(objectMap, "properties", d.Properties)
	populate(objectMap, "systemData", d.SystemData)
	populate(objectMap, "type", d.Type)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultRolloutSpecificationProviderRegistration.
func (d *DefaultRolloutSpecificationProviderRegistration) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", d, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "id":
			err = unpopulate(val, "ID", &d.ID)
			delete(rawMsg, key)
		case "kind":
			err = unpopulate(val, "Kind", &d.Kind)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &d.Name)
			delete(rawMsg, key)
		case "properties":
			err = unpopulate(val, "Properties", &d.Properties)
			delete(rawMsg, key)
		case "systemData":
			err = unpopulate(val, "SystemData", &d.SystemData)
			delete(rawMsg, key)
		case "type":
			err = unpopulate(val, "Type", &d.Type)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", d, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type DefaultRolloutSpecificationRestOfTheWorldGroupOne.
func (d DefaultRolloutSpecificationRestOfTheWorldGroupOne) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "regions", d.Regions)
	populate(objectMap, "waitDuration", d.WaitDuration)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultRolloutSpecificationRestOfTheWorldGroupOne.
func (d *DefaultRolloutSpecificationRestOfTheWorldGroupOne) UnmarshalJSON(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 "regions":
			err = unpopulate(val, "Regions", &d.Regions)
			delete(rawMsg, key)
		case "waitDuration":
			err = unpopulate(val, "WaitDuration", &d.WaitDuration)
			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 DefaultRolloutSpecificationRestOfTheWorldGroupTwo.
func (d DefaultRolloutSpecificationRestOfTheWorldGroupTwo) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "regions", d.Regions)
	populate(objectMap, "waitDuration", d.WaitDuration)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultRolloutSpecificationRestOfTheWorldGroupTwo.
func (d *DefaultRolloutSpecificationRestOfTheWorldGroupTwo) UnmarshalJSON(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 "regions":
			err = unpopulate(val, "Regions", &d.Regions)
			delete(rawMsg, key)
		case "waitDuration":
			err = unpopulate(val, "WaitDuration", &d.WaitDuration)
			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 DefaultRolloutStatus.
func (d DefaultRolloutStatus) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "completedRegions", d.CompletedRegions)
	populate(objectMap, "failedOrSkippedRegions", d.FailedOrSkippedRegions)
	populate(objectMap, "manifestCheckinStatus", d.ManifestCheckinStatus)
	populate(objectMap, "nextTrafficRegion", d.NextTrafficRegion)
	populateDateTimeRFC3339(objectMap, "nextTrafficRegionScheduledTime", d.NextTrafficRegionScheduledTime)
	populate(objectMap, "subscriptionReregistrationResult", d.SubscriptionReregistrationResult)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultRolloutStatus.
func (d *DefaultRolloutStatus) UnmarshalJSON(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 "completedRegions":
			err = unpopulate(val, "CompletedRegions", &d.CompletedRegions)
			delete(rawMsg, key)
		case "failedOrSkippedRegions":
			err = unpopulate(val, "FailedOrSkippedRegions", &d.FailedOrSkippedRegions)
			delete(rawMsg, key)
		case "manifestCheckinStatus":
			err = unpopulate(val, "ManifestCheckinStatus", &d.ManifestCheckinStatus)
			delete(rawMsg, key)
		case "nextTrafficRegion":
			err = unpopulate(val, "NextTrafficRegion", &d.NextTrafficRegion)
			delete(rawMsg, key)
		case "nextTrafficRegionScheduledTime":
			err = unpopulateDateTimeRFC3339(val, "NextTrafficRegionScheduledTime", &d.NextTrafficRegionScheduledTime)
			delete(rawMsg, key)
		case "subscriptionReregistrationResult":
			err = unpopulate(val, "SubscriptionReregistrationResult", &d.SubscriptionReregistrationResult)
			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 DefaultRolloutStatusManifestCheckinStatus.
func (d DefaultRolloutStatusManifestCheckinStatus) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "commitId", d.CommitID)
	populate(objectMap, "isCheckedIn", d.IsCheckedIn)
	populate(objectMap, "pullRequest", d.PullRequest)
	populate(objectMap, "statusMessage", d.StatusMessage)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultRolloutStatusManifestCheckinStatus.
func (d *DefaultRolloutStatusManifestCheckinStatus) UnmarshalJSON(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 "commitId":
			err = unpopulate(val, "CommitID", &d.CommitID)
			delete(rawMsg, key)
		case "isCheckedIn":
			err = unpopulate(val, "IsCheckedIn", &d.IsCheckedIn)
			delete(rawMsg, key)
		case "pullRequest":
			err = unpopulate(val, "PullRequest", &d.PullRequest)
			delete(rawMsg, key)
		case "statusMessage":
			err = unpopulate(val, "StatusMessage", &d.StatusMessage)
			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 DeleteDependency.
func (d DeleteDependency) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "linkedProperty", d.LinkedProperty)
	populate(objectMap, "linkedType", d.LinkedType)
	populate(objectMap, "requiredFeatures", d.RequiredFeatures)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DeleteDependency.
func (d *DeleteDependency) UnmarshalJSON(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 "linkedProperty":
			err = unpopulate(val, "LinkedProperty", &d.LinkedProperty)
			delete(rawMsg, key)
		case "linkedType":
			err = unpopulate(val, "LinkedType", &d.LinkedType)
			delete(rawMsg, key)
		case "requiredFeatures":
			err = unpopulate(val, "RequiredFeatures", &d.RequiredFeatures)
			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 DstsConfiguration.
func (d DstsConfiguration) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "serviceDnsName", d.ServiceDNSName)
	populate(objectMap, "serviceName", d.ServiceName)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DstsConfiguration.
func (d *DstsConfiguration) UnmarshalJSON(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 "serviceDnsName":
			err = unpopulate(val, "ServiceDNSName", &d.ServiceDNSName)
			delete(rawMsg, key)
		case "serviceName":
			err = unpopulate(val, "ServiceName", &d.ServiceName)
			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 EndpointInformation.
func (e EndpointInformation) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "endpoint", e.Endpoint)
	populate(objectMap, "endpointType", e.EndpointType)
	populate(objectMap, "schemaVersion", e.SchemaVersion)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointInformation.
func (e *EndpointInformation) UnmarshalJSON(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 "endpoint":
			err = unpopulate(val, "Endpoint", &e.Endpoint)
			delete(rawMsg, key)
		case "endpointType":
			err = unpopulate(val, "EndpointType", &e.EndpointType)
			delete(rawMsg, key)
		case "schemaVersion":
			err = unpopulate(val, "SchemaVersion", &e.SchemaVersion)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", e, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.
func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateAny(objectMap, "info", e.Info)
	populate(objectMap, "type", e.Type)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.
func (e *ErrorAdditionalInfo) UnmarshalJSON(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 "info":
			err = unpopulate(val, "Info", &e.Info)
			delete(rawMsg, key)
		case "type":
			err = unpopulate(val, "Type", &e.Type)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", e, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ErrorDetail.
func (e ErrorDetail) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "additionalInfo", e.AdditionalInfo)
	populate(objectMap, "code", e.Code)
	populate(objectMap, "details", e.Details)
	populate(objectMap, "message", e.Message)
	populate(objectMap, "target", e.Target)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.
func (e *ErrorDetail) UnmarshalJSON(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 "additionalInfo":
			err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo)
			delete(rawMsg, key)
		case "code":
			err = unpopulate(val, "Code", &e.Code)
			delete(rawMsg, key)
		case "details":
			err = unpopulate(val, "Details", &e.Details)
			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 ErrorResponse.
func (e ErrorResponse) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "error", e.Error)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.
func (e *ErrorResponse) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", e, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "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 ExpeditedRolloutDefinition.
func (e ExpeditedRolloutDefinition) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "enabled", e.Enabled)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ExpeditedRolloutDefinition.
func (e *ExpeditedRolloutDefinition) UnmarshalJSON(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 "enabled":
			err = unpopulate(val, "Enabled", &e.Enabled)
			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 ExtendedErrorInfo.
func (e ExtendedErrorInfo) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "additionalInfo", e.AdditionalInfo)
	populate(objectMap, "code", e.Code)
	populate(objectMap, "details", e.Details)
	populate(objectMap, "message", e.Message)
	populate(objectMap, "target", e.Target)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedErrorInfo.
func (e *ExtendedErrorInfo) UnmarshalJSON(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 "additionalInfo":
			err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo)
			delete(rawMsg, key)
		case "code":
			err = unpopulate(val, "Code", &e.Code)
			delete(rawMsg, key)
		case "details":
			err = unpopulate(val, "Details", &e.Details)
			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 ExtendedLocationOptions.
func (e ExtendedLocationOptions) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "supportedPolicy", e.SupportedPolicy)
	populate(objectMap, "type", e.Type)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedLocationOptions.
func (e *ExtendedLocationOptions) UnmarshalJSON(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 "supportedPolicy":
			err = unpopulate(val, "SupportedPolicy", &e.SupportedPolicy)
			delete(rawMsg, key)
		case "type":
			err = unpopulate(val, "Type", &e.Type)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", e, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ExtensionOptions.
func (e ExtensionOptions) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "request", e.Request)
	populate(objectMap, "response", e.Response)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ExtensionOptions.
func (e *ExtensionOptions) UnmarshalJSON(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 "request":
			err = unpopulate(val, "Request", &e.Request)
			delete(rawMsg, key)
		case "response":
			err = unpopulate(val, "Response", &e.Response)
			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 FanoutLinkedNotificationRule.
func (f FanoutLinkedNotificationRule) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "actions", f.Actions)
	populate(objectMap, "dstsConfiguration", f.DstsConfiguration)
	populate(objectMap, "endpoints", f.Endpoints)
	populate(objectMap, "tokenAuthConfiguration", f.TokenAuthConfiguration)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type FanoutLinkedNotificationRule.
func (f *FanoutLinkedNotificationRule) UnmarshalJSON(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 "actions":
			err = unpopulate(val, "Actions", &f.Actions)
			delete(rawMsg, key)
		case "dstsConfiguration":
			err = unpopulate(val, "DstsConfiguration", &f.DstsConfiguration)
			delete(rawMsg, key)
		case "endpoints":
			err = unpopulate(val, "Endpoints", &f.Endpoints)
			delete(rawMsg, key)
		case "tokenAuthConfiguration":
			err = unpopulate(val, "TokenAuthConfiguration", &f.TokenAuthConfiguration)
			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 FanoutLinkedNotificationRuleDstsConfiguration.
func (f FanoutLinkedNotificationRuleDstsConfiguration) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "serviceDnsName", f.ServiceDNSName)
	populate(objectMap, "serviceName", f.ServiceName)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type FanoutLinkedNotificationRuleDstsConfiguration.
func (f *FanoutLinkedNotificationRuleDstsConfiguration) UnmarshalJSON(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 "serviceDnsName":
			err = unpopulate(val, "ServiceDNSName", &f.ServiceDNSName)
			delete(rawMsg, key)
		case "serviceName":
			err = unpopulate(val, "ServiceName", &f.ServiceName)
			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 FeaturesRule.
func (f FeaturesRule) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "requiredFeaturesPolicy", f.RequiredFeaturesPolicy)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturesRule.
func (f *FeaturesRule) UnmarshalJSON(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 "requiredFeaturesPolicy":
			err = unpopulate(val, "RequiredFeaturesPolicy", &f.RequiredFeaturesPolicy)
			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 FilterRule.
func (f FilterRule) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "endpointInformation", f.EndpointInformation)
	populate(objectMap, "filterQuery", f.FilterQuery)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type FilterRule.
func (f *FilterRule) UnmarshalJSON(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 "endpointInformation":
			err = unpopulate(val, "EndpointInformation", &f.EndpointInformation)
			delete(rawMsg, key)
		case "filterQuery":
			err = unpopulate(val, "FilterQuery", &f.FilterQuery)
			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 FrontloadPayload.
func (f FrontloadPayload) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "properties", f.Properties)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type FrontloadPayload.
func (f *FrontloadPayload) UnmarshalJSON(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 "properties":
			err = unpopulate(val, "Properties", &f.Properties)
			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 FrontloadPayloadProperties.
func (f FrontloadPayloadProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "copyFromLocation", f.CopyFromLocation)
	populate(objectMap, "environmentType", f.EnvironmentType)
	populate(objectMap, "excludeResourceTypes", f.ExcludeResourceTypes)
	populate(objectMap, "frontloadLocation", f.FrontloadLocation)
	populate(objectMap, "ignoreFields", f.IgnoreFields)
	populate(objectMap, "includeResourceTypes", f.IncludeResourceTypes)
	populate(objectMap, "operationType", f.OperationType)
	populate(objectMap, "overrideEndpointLevelFields", f.OverrideEndpointLevelFields)
	populate(objectMap, "overrideManifestLevelFields", f.OverrideManifestLevelFields)
	populate(objectMap, "providerNamespace", f.ProviderNamespace)
	populate(objectMap, "serviceFeatureFlag", f.ServiceFeatureFlag)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type FrontloadPayloadProperties.
func (f *FrontloadPayloadProperties) UnmarshalJSON(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 "copyFromLocation":
			err = unpopulate(val, "CopyFromLocation", &f.CopyFromLocation)
			delete(rawMsg, key)
		case "environmentType":
			err = unpopulate(val, "EnvironmentType", &f.EnvironmentType)
			delete(rawMsg, key)
		case "excludeResourceTypes":
			err = unpopulate(val, "ExcludeResourceTypes", &f.ExcludeResourceTypes)
			delete(rawMsg, key)
		case "frontloadLocation":
			err = unpopulate(val, "FrontloadLocation", &f.FrontloadLocation)
			delete(rawMsg, key)
		case "ignoreFields":
			err = unpopulate(val, "IgnoreFields", &f.IgnoreFields)
			delete(rawMsg, key)
		case "includeResourceTypes":
			err = unpopulate(val, "IncludeResourceTypes", &f.IncludeResourceTypes)
			delete(rawMsg, key)
		case "operationType":
			err = unpopulate(val, "OperationType", &f.OperationType)
			delete(rawMsg, key)
		case "overrideEndpointLevelFields":
			err = unpopulate(val, "OverrideEndpointLevelFields", &f.OverrideEndpointLevelFields)
			delete(rawMsg, key)
		case "overrideManifestLevelFields":
			err = unpopulate(val, "OverrideManifestLevelFields", &f.OverrideManifestLevelFields)
			delete(rawMsg, key)
		case "providerNamespace":
			err = unpopulate(val, "ProviderNamespace", &f.ProviderNamespace)
			delete(rawMsg, key)
		case "serviceFeatureFlag":
			err = unpopulate(val, "ServiceFeatureFlag", &f.ServiceFeatureFlag)
			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 FrontloadPayloadPropertiesOverrideEndpointLevelFields.
func (f FrontloadPayloadPropertiesOverrideEndpointLevelFields) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "apiVersion", f.APIVersion)
	populate(objectMap, "apiVersions", f.APIVersions)
	populate(objectMap, "dstsConfiguration", f.DstsConfiguration)
	populate(objectMap, "enabled", f.Enabled)
	populate(objectMap, "endpointType", f.EndpointType)
	populate(objectMap, "endpointUri", f.EndpointURI)
	populate(objectMap, "featuresRule", f.FeaturesRule)
	populate(objectMap, "locations", f.Locations)
	populate(objectMap, "requiredFeatures", f.RequiredFeatures)
	populate(objectMap, "skuLink", f.SKULink)
	populate(objectMap, "timeout", f.Timeout)
	populate(objectMap, "zones", f.Zones)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type FrontloadPayloadPropertiesOverrideEndpointLevelFields.
func (f *FrontloadPayloadPropertiesOverrideEndpointLevelFields) UnmarshalJSON(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 "apiVersion":
			err = unpopulate(val, "APIVersion", &f.APIVersion)
			delete(rawMsg, key)
		case "apiVersions":
			err = unpopulate(val, "APIVersions", &f.APIVersions)
			delete(rawMsg, key)
		case "dstsConfiguration":
			err = unpopulate(val, "DstsConfiguration", &f.DstsConfiguration)
			delete(rawMsg, key)
		case "enabled":
			err = unpopulate(val, "Enabled", &f.Enabled)
			delete(rawMsg, key)
		case "endpointType":
			err = unpopulate(val, "EndpointType", &f.EndpointType)
			delete(rawMsg, key)
		case "endpointUri":
			err = unpopulate(val, "EndpointURI", &f.EndpointURI)
			delete(rawMsg, key)
		case "featuresRule":
			err = unpopulate(val, "FeaturesRule", &f.FeaturesRule)
			delete(rawMsg, key)
		case "locations":
			err = unpopulate(val, "Locations", &f.Locations)
			delete(rawMsg, key)
		case "requiredFeatures":
			err = unpopulate(val, "RequiredFeatures", &f.RequiredFeatures)
			delete(rawMsg, key)
		case "skuLink":
			err = unpopulate(val, "SKULink", &f.SKULink)
			delete(rawMsg, key)
		case "timeout":
			err = unpopulate(val, "Timeout", &f.Timeout)
			delete(rawMsg, key)
		case "zones":
			err = unpopulate(val, "Zones", &f.Zones)
			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 FrontloadPayloadPropertiesOverrideManifestLevelFields.
func (f FrontloadPayloadPropertiesOverrideManifestLevelFields) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "resourceHydrationAccounts", f.ResourceHydrationAccounts)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type FrontloadPayloadPropertiesOverrideManifestLevelFields.
func (f *FrontloadPayloadPropertiesOverrideManifestLevelFields) UnmarshalJSON(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 "resourceHydrationAccounts":
			err = unpopulate(val, "ResourceHydrationAccounts", &f.ResourceHydrationAccounts)
			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 GroupConnectivityInformation.
func (g GroupConnectivityInformation) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "groupId", g.GroupID)
	populate(objectMap, "redirectMapId", g.RedirectMapID)
	populate(objectMap, "requiredMembers", g.RequiredMembers)
	populate(objectMap, "requiredZoneNames", g.RequiredZoneNames)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type GroupConnectivityInformation.
func (g *GroupConnectivityInformation) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", g, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "groupId":
			err = unpopulate(val, "GroupID", &g.GroupID)
			delete(rawMsg, key)
		case "redirectMapId":
			err = unpopulate(val, "RedirectMapID", &g.RedirectMapID)
			delete(rawMsg, key)
		case "requiredMembers":
			err = unpopulate(val, "RequiredMembers", &g.RequiredMembers)
			delete(rawMsg, key)
		case "requiredZoneNames":
			err = unpopulate(val, "RequiredZoneNames", &g.RequiredZoneNames)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", g, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type IdentityManagement.
func (i IdentityManagement) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "type", i.Type)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityManagement.
func (i *IdentityManagement) UnmarshalJSON(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 "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 IdentityManagementProperties.
func (i IdentityManagementProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "applicationId", i.ApplicationID)
	populate(objectMap, "applicationIds", i.ApplicationIDs)
	populate(objectMap, "delegationAppIds", i.DelegationAppIDs)
	populate(objectMap, "type", i.Type)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityManagementProperties.
func (i *IdentityManagementProperties) UnmarshalJSON(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 "applicationId":
			err = unpopulate(val, "ApplicationID", &i.ApplicationID)
			delete(rawMsg, key)
		case "applicationIds":
			err = unpopulate(val, "ApplicationIDs", &i.ApplicationIDs)
			delete(rawMsg, key)
		case "delegationAppIds":
			err = unpopulate(val, "DelegationAppIDs", &i.DelegationAppIDs)
			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 LegacyDisallowedCondition.
func (l LegacyDisallowedCondition) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "disallowedLegacyOperations", l.DisallowedLegacyOperations)
	populate(objectMap, "feature", l.Feature)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LegacyDisallowedCondition.
func (l *LegacyDisallowedCondition) UnmarshalJSON(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 "disallowedLegacyOperations":
			err = unpopulate(val, "DisallowedLegacyOperations", &l.DisallowedLegacyOperations)
			delete(rawMsg, key)
		case "feature":
			err = unpopulate(val, "Feature", &l.Feature)
			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 LightHouseAuthorization.
func (l LightHouseAuthorization) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "principalId", l.PrincipalID)
	populate(objectMap, "roleDefinitionId", l.RoleDefinitionID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LightHouseAuthorization.
func (l *LightHouseAuthorization) UnmarshalJSON(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 "principalId":
			err = unpopulate(val, "PrincipalID", &l.PrincipalID)
			delete(rawMsg, key)
		case "roleDefinitionId":
			err = unpopulate(val, "RoleDefinitionID", &l.RoleDefinitionID)
			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 LinkedAccessCheck.
func (l LinkedAccessCheck) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "actionName", l.ActionName)
	populate(objectMap, "linkedAction", l.LinkedAction)
	populate(objectMap, "linkedActionVerb", l.LinkedActionVerb)
	populate(objectMap, "linkedProperty", l.LinkedProperty)
	populate(objectMap, "linkedType", l.LinkedType)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LinkedAccessCheck.
func (l *LinkedAccessCheck) UnmarshalJSON(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 "actionName":
			err = unpopulate(val, "ActionName", &l.ActionName)
			delete(rawMsg, key)
		case "linkedAction":
			err = unpopulate(val, "LinkedAction", &l.LinkedAction)
			delete(rawMsg, key)
		case "linkedActionVerb":
			err = unpopulate(val, "LinkedActionVerb", &l.LinkedActionVerb)
			delete(rawMsg, key)
		case "linkedProperty":
			err = unpopulate(val, "LinkedProperty", &l.LinkedProperty)
			delete(rawMsg, key)
		case "linkedType":
			err = unpopulate(val, "LinkedType", &l.LinkedType)
			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 LinkedNotificationRule.
func (l LinkedNotificationRule) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "actions", l.Actions)
	populate(objectMap, "actionsOnFailedOperation", l.ActionsOnFailedOperation)
	populate(objectMap, "fastPathActions", l.FastPathActions)
	populate(objectMap, "fastPathActionsOnFailedOperation", l.FastPathActionsOnFailedOperation)
	populate(objectMap, "linkedNotificationTimeout", l.LinkedNotificationTimeout)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LinkedNotificationRule.
func (l *LinkedNotificationRule) UnmarshalJSON(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 "actions":
			err = unpopulate(val, "Actions", &l.Actions)
			delete(rawMsg, key)
		case "actionsOnFailedOperation":
			err = unpopulate(val, "ActionsOnFailedOperation", &l.ActionsOnFailedOperation)
			delete(rawMsg, key)
		case "fastPathActions":
			err = unpopulate(val, "FastPathActions", &l.FastPathActions)
			delete(rawMsg, key)
		case "fastPathActionsOnFailedOperation":
			err = unpopulate(val, "FastPathActionsOnFailedOperation", &l.FastPathActionsOnFailedOperation)
			delete(rawMsg, key)
		case "linkedNotificationTimeout":
			err = unpopulate(val, "LinkedNotificationTimeout", &l.LinkedNotificationTimeout)
			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 LinkedOperationRule.
func (l LinkedOperationRule) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "dependsOnTypes", l.DependsOnTypes)
	populate(objectMap, "linkedAction", l.LinkedAction)
	populate(objectMap, "linkedOperation", l.LinkedOperation)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LinkedOperationRule.
func (l *LinkedOperationRule) UnmarshalJSON(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 "dependsOnTypes":
			err = unpopulate(val, "DependsOnTypes", &l.DependsOnTypes)
			delete(rawMsg, key)
		case "linkedAction":
			err = unpopulate(val, "LinkedAction", &l.LinkedAction)
			delete(rawMsg, key)
		case "linkedOperation":
			err = unpopulate(val, "LinkedOperation", &l.LinkedOperation)
			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 LocalizedOperationDefinition.
func (l LocalizedOperationDefinition) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "actionType", l.ActionType)
	populate(objectMap, "display", l.Display)
	populate(objectMap, "isDataAction", l.IsDataAction)
	populate(objectMap, "name", l.Name)
	populate(objectMap, "origin", l.Origin)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LocalizedOperationDefinition.
func (l *LocalizedOperationDefinition) UnmarshalJSON(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 "actionType":
			err = unpopulate(val, "ActionType", &l.ActionType)
			delete(rawMsg, key)
		case "display":
			err = unpopulate(val, "Display", &l.Display)
			delete(rawMsg, key)
		case "isDataAction":
			err = unpopulate(val, "IsDataAction", &l.IsDataAction)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &l.Name)
			delete(rawMsg, key)
		case "origin":
			err = unpopulate(val, "Origin", &l.Origin)
			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 LocalizedOperationDefinitionDisplay.
func (l LocalizedOperationDefinitionDisplay) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "cs", l.Cs)
	populate(objectMap, "de", l.De)
	populate(objectMap, "default", l.Default)
	populate(objectMap, "en", l.En)
	populate(objectMap, "es", l.Es)
	populate(objectMap, "fr", l.Fr)
	populate(objectMap, "hu", l.Hu)
	populate(objectMap, "it", l.It)
	populate(objectMap, "ja", l.Ja)
	populate(objectMap, "ko", l.Ko)
	populate(objectMap, "nl", l.Nl)
	populate(objectMap, "pl", l.Pl)
	populate(objectMap, "ptPT", l.Pt)
	populate(objectMap, "ptBR", l.PtBR)
	populate(objectMap, "ru", l.Ru)
	populate(objectMap, "sv", l.Sv)
	populate(objectMap, "zhHans", l.ZhHans)
	populate(objectMap, "zhHant", l.ZhHant)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LocalizedOperationDefinitionDisplay.
func (l *LocalizedOperationDefinitionDisplay) UnmarshalJSON(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 "cs":
			err = unpopulate(val, "Cs", &l.Cs)
			delete(rawMsg, key)
		case "de":
			err = unpopulate(val, "De", &l.De)
			delete(rawMsg, key)
		case "default":
			err = unpopulate(val, "Default", &l.Default)
			delete(rawMsg, key)
		case "en":
			err = unpopulate(val, "En", &l.En)
			delete(rawMsg, key)
		case "es":
			err = unpopulate(val, "Es", &l.Es)
			delete(rawMsg, key)
		case "fr":
			err = unpopulate(val, "Fr", &l.Fr)
			delete(rawMsg, key)
		case "hu":
			err = unpopulate(val, "Hu", &l.Hu)
			delete(rawMsg, key)
		case "it":
			err = unpopulate(val, "It", &l.It)
			delete(rawMsg, key)
		case "ja":
			err = unpopulate(val, "Ja", &l.Ja)
			delete(rawMsg, key)
		case "ko":
			err = unpopulate(val, "Ko", &l.Ko)
			delete(rawMsg, key)
		case "nl":
			err = unpopulate(val, "Nl", &l.Nl)
			delete(rawMsg, key)
		case "pl":
			err = unpopulate(val, "Pl", &l.Pl)
			delete(rawMsg, key)
		case "ptPT":
			err = unpopulate(val, "Pt", &l.Pt)
			delete(rawMsg, key)
		case "ptBR":
			err = unpopulate(val, "PtBR", &l.PtBR)
			delete(rawMsg, key)
		case "ru":
			err = unpopulate(val, "Ru", &l.Ru)
			delete(rawMsg, key)
		case "sv":
			err = unpopulate(val, "Sv", &l.Sv)
			delete(rawMsg, key)
		case "zhHans":
			err = unpopulate(val, "ZhHans", &l.ZhHans)
			delete(rawMsg, key)
		case "zhHant":
			err = unpopulate(val, "ZhHant", &l.ZhHant)
			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 LocalizedOperationDisplayDefinition.
func (l LocalizedOperationDisplayDefinition) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "cs", l.Cs)
	populate(objectMap, "de", l.De)
	populate(objectMap, "default", l.Default)
	populate(objectMap, "en", l.En)
	populate(objectMap, "es", l.Es)
	populate(objectMap, "fr", l.Fr)
	populate(objectMap, "hu", l.Hu)
	populate(objectMap, "it", l.It)
	populate(objectMap, "ja", l.Ja)
	populate(objectMap, "ko", l.Ko)
	populate(objectMap, "nl", l.Nl)
	populate(objectMap, "pl", l.Pl)
	populate(objectMap, "ptPT", l.Pt)
	populate(objectMap, "ptBR", l.PtBR)
	populate(objectMap, "ru", l.Ru)
	populate(objectMap, "sv", l.Sv)
	populate(objectMap, "zhHans", l.ZhHans)
	populate(objectMap, "zhHant", l.ZhHant)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LocalizedOperationDisplayDefinition.
func (l *LocalizedOperationDisplayDefinition) UnmarshalJSON(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 "cs":
			err = unpopulate(val, "Cs", &l.Cs)
			delete(rawMsg, key)
		case "de":
			err = unpopulate(val, "De", &l.De)
			delete(rawMsg, key)
		case "default":
			err = unpopulate(val, "Default", &l.Default)
			delete(rawMsg, key)
		case "en":
			err = unpopulate(val, "En", &l.En)
			delete(rawMsg, key)
		case "es":
			err = unpopulate(val, "Es", &l.Es)
			delete(rawMsg, key)
		case "fr":
			err = unpopulate(val, "Fr", &l.Fr)
			delete(rawMsg, key)
		case "hu":
			err = unpopulate(val, "Hu", &l.Hu)
			delete(rawMsg, key)
		case "it":
			err = unpopulate(val, "It", &l.It)
			delete(rawMsg, key)
		case "ja":
			err = unpopulate(val, "Ja", &l.Ja)
			delete(rawMsg, key)
		case "ko":
			err = unpopulate(val, "Ko", &l.Ko)
			delete(rawMsg, key)
		case "nl":
			err = unpopulate(val, "Nl", &l.Nl)
			delete(rawMsg, key)
		case "pl":
			err = unpopulate(val, "Pl", &l.Pl)
			delete(rawMsg, key)
		case "ptPT":
			err = unpopulate(val, "Pt", &l.Pt)
			delete(rawMsg, key)
		case "ptBR":
			err = unpopulate(val, "PtBR", &l.PtBR)
			delete(rawMsg, key)
		case "ru":
			err = unpopulate(val, "Ru", &l.Ru)
			delete(rawMsg, key)
		case "sv":
			err = unpopulate(val, "Sv", &l.Sv)
			delete(rawMsg, key)
		case "zhHans":
			err = unpopulate(val, "ZhHans", &l.ZhHans)
			delete(rawMsg, key)
		case "zhHant":
			err = unpopulate(val, "ZhHant", &l.ZhHant)
			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 LocalizedOperationDisplayDefinitionCs.
func (l LocalizedOperationDisplayDefinitionCs) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "description", l.Description)
	populate(objectMap, "operation", l.Operation)
	populate(objectMap, "provider", l.Provider)
	populate(objectMap, "resource", l.Resource)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LocalizedOperationDisplayDefinitionCs.
func (l *LocalizedOperationDisplayDefinitionCs) UnmarshalJSON(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 "description":
			err = unpopulate(val, "Description", &l.Description)
			delete(rawMsg, key)
		case "operation":
			err = unpopulate(val, "Operation", &l.Operation)
			delete(rawMsg, key)
		case "provider":
			err = unpopulate(val, "Provider", &l.Provider)
			delete(rawMsg, key)
		case "resource":
			err = unpopulate(val, "Resource", &l.Resource)
			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 LocalizedOperationDisplayDefinitionDe.
func (l LocalizedOperationDisplayDefinitionDe) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "description", l.Description)
	populate(objectMap, "operation", l.Operation)
	populate(objectMap, "provider", l.Provider)
	populate(objectMap, "resource", l.Resource)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LocalizedOperationDisplayDefinitionDe.
func (l *LocalizedOperationDisplayDefinitionDe) UnmarshalJSON(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 "description":
			err = unpopulate(val, "Description", &l.Description)
			delete(rawMsg, key)
		case "operation":
			err = unpopulate(val, "Operation", &l.Operation)
			delete(rawMsg, key)
		case "provider":
			err = unpopulate(val, "Provider", &l.Provider)
			delete(rawMsg, key)
		case "resource":
			err = unpopulate(val, "Resource", &l.Resource)
			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 LocalizedOperationDisplayDefinitionDefault.
func (l LocalizedOperationDisplayDefinitionDefault) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "description", l.Description)
	populate(objectMap, "operation", l.Operation)
	populate(objectMap, "provider", l.Provider)
	populate(objectMap, "resource", l.Resource)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LocalizedOperationDisplayDefinitionDefault.
func (l *LocalizedOperationDisplayDefinitionDefault) UnmarshalJSON(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 "description":
			err = unpopulate(val, "Description", &l.Description)
			delete(rawMsg, key)
		case "operation":
			err = unpopulate(val, "Operation", &l.Operation)
			delete(rawMsg, key)
		case "provider":
			err = unpopulate(val, "Provider", &l.Provider)
			delete(rawMsg, key)
		case "resource":
			err = unpopulate(val, "Resource", &l.Resource)
			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 LocalizedOperationDisplayDefinitionEn.
func (l LocalizedOperationDisplayDefinitionEn) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "description", l.Description)
	populate(objectMap, "operation", l.Operation)
	populate(objectMap, "provider", l.Provider)
	populate(objectMap, "resource", l.Resource)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LocalizedOperationDisplayDefinitionEn.
func (l *LocalizedOperationDisplayDefinitionEn) UnmarshalJSON(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 "description":
			err = unpopulate(val, "Description", &l.Description)
			delete(rawMsg, key)
		case "operation":
			err = unpopulate(val, "Operation", &l.Operation)
			delete(rawMsg, key)
		case "provider":
			err = unpopulate(val, "Provider", &l.Provider)
			delete(rawMsg, key)
		case "resource":
			err = unpopulate(val, "Resource", &l.Resource)
			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 LocalizedOperationDisplayDefinitionEs.
func (l LocalizedOperationDisplayDefinitionEs) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "description", l.Description)
	populate(objectMap, "operation", l.Operation)
	populate(objectMap, "provider", l.Provider)
	populate(objectMap, "resource", l.Resource)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LocalizedOperationDisplayDefinitionEs.
func (l *LocalizedOperationDisplayDefinitionEs) UnmarshalJSON(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 "description":
			err = unpopulate(val, "Description", &l.Description)
			delete(rawMsg, key)
		case "operation":
			err = unpopulate(val, "Operation", &l.Operation)
			delete(rawMsg, key)
		case "provider":
			err = unpopulate(val, "Provider", &l.Provider)
			delete(rawMsg, key)
		case "resource":
			err = unpopulate(val, "Resource", &l.Resource)
			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 LocalizedOperationDisplayDefinitionFr.
func (l LocalizedOperationDisplayDefinitionFr) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "description", l.Description)
	populate(objectMap, "operation", l.Operation)
	populate(objectMap, "provider", l.Provider)
	populate(objectMap, "resource", l.Resource)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LocalizedOperationDisplayDefinitionFr.
func (l *LocalizedOperationDisplayDefinitionFr) UnmarshalJSON(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 "description":
			err = unpopulate(val, "Description", &l.Description)
			delete(rawMsg, key)
		case "operation":
			err = unpopulate(val, "Operation", &l.Operation)
			delete(rawMsg, key)
		case "provider":
			err = unpopulate(val, "Provider", &l.Provider)
			delete(rawMsg, key)
		case "resource":
			err = unpopulate(val, "Resource", &l.Resource)
			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 LocalizedOperationDisplayDefinitionHu.
func (l LocalizedOperationDisplayDefinitionHu) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "description", l.Description)
	populate(objectMap, "operation", l.Operation)
	populate(objectMap, "provider", l.Provider)
	populate(objectMap, "resource", l.Resource)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LocalizedOperationDisplayDefinitionHu.
func (l *LocalizedOperationDisplayDefinitionHu) UnmarshalJSON(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 "description":
			err = unpopulate(val, "Description", &l.Description)
			delete(rawMsg, key)
		case "operation":
			err = unpopulate(val, "Operation", &l.Operation)
			delete(rawMsg, key)
		case "provider":
			err = unpopulate(val, "Provider", &l.Provider)
			delete(rawMsg, key)
		case "resource":
			err = unpopulate(val, "Resource", &l.Resource)
			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 LocalizedOperationDisplayDefinitionIt.
func (l LocalizedOperationDisplayDefinitionIt) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "description", l.Description)
	populate(objectMap, "operation", l.Operation)
	populate(objectMap, "provider", l.Provider)
	populate(objectMap, "resource", l.Resource)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LocalizedOperationDisplayDefinitionIt.
func (l *LocalizedOperationDisplayDefinitionIt) UnmarshalJSON(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 "description":
			err = unpopulate(val, "Description", &l.Description)
			delete(rawMsg, key)
		case "operation":
			err = unpopulate(val, "Operation", &l.Operation)
			delete(rawMsg, key)
		case "provider":
			err = unpopulate(val, "Provider", &l.Provider)
			delete(rawMsg, key)
		case "resource":
			err = unpopulate(val, "Resource", &l.Resource)
			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 LocalizedOperationDisplayDefinitionJa.
func (l LocalizedOperationDisplayDefinitionJa) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "description", l.Description)
	populate(objectMap, "operation", l.Operation)
	populate(objectMap, "provider", l.Provider)
	populate(objectMap, "resource", l.Resource)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LocalizedOperationDisplayDefinitionJa.
func (l *LocalizedOperationDisplayDefinitionJa) UnmarshalJSON(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 "description":
			err = unpopulate(val, "Description", &l.Description)
			delete(rawMsg, key)
		case "operation":
			err = unpopulate(val, "Operation", &l.Operation)
			delete(rawMsg, key)
		case "provider":
			err = unpopulate(val, "Provider", &l.Provider)
			delete(rawMsg, key)
		case "resource":
			err = unpopulate(val, "Resource", &l.Resource)
			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 LocalizedOperationDisplayDefinitionKo.
func (l LocalizedOperationDisplayDefinitionKo) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "description", l.Description)
	populate(objectMap, "operation", l.Operation)
	populate(objectMap, "provider", l.Provider)
	populate(objectMap, "resource", l.Resource)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LocalizedOperationDisplayDefinitionKo.
func (l *LocalizedOperationDisplayDefinitionKo) UnmarshalJSON(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 "description":
			err = unpopulate(val, "Description", &l.Description)
			delete(rawMsg, key)
		case "operation":
			err = unpopulate(val, "Operation", &l.Operation)
			delete(rawMsg, key)
		case "provider":
			err = unpopulate(val, "Provider", &l.Provider)
			delete(rawMsg, key)
		case "resource":
			err = unpopulate(val, "Resource", &l.Resource)
			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 LocalizedOperationDisplayDefinitionNl.
func (l LocalizedOperationDisplayDefinitionNl) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "description", l.Description)
	populate(objectMap, "operation", l.Operation)
	populate(objectMap, "provider", l.Provider)
	populate(objectMap, "resource", l.Resource)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LocalizedOperationDisplayDefinitionNl.
func (l *LocalizedOperationDisplayDefinitionNl) UnmarshalJSON(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 "description":
			err = unpopulate(val, "Description", &l.Description)
			delete(rawMsg, key)
		case "operation":
			err = unpopulate(val, "Operation", &l.Operation)
			delete(rawMsg, key)
		case "provider":
			err = unpopulate(val, "Provider", &l.Provider)
			delete(rawMsg, key)
		case "resource":
			err = unpopulate(val, "Resource", &l.Resource)
			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 LocalizedOperationDisplayDefinitionPl.
func (l LocalizedOperationDisplayDefinitionPl) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "description", l.Description)
	populate(objectMap, "operation", l.Operation)
	populate(objectMap, "provider", l.Provider)
	populate(objectMap, "resource", l.Resource)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LocalizedOperationDisplayDefinitionPl.
func (l *LocalizedOperationDisplayDefinitionPl) UnmarshalJSON(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 "description":
			err = unpopulate(val, "Description", &l.Description)
			delete(rawMsg, key)
		case "operation":
			err = unpopulate(val, "Operation", &l.Operation)
			delete(rawMsg, key)
		case "provider":
			err = unpopulate(val, "Provider", &l.Provider)
			delete(rawMsg, key)
		case "resource":
			err = unpopulate(val, "Resource", &l.Resource)
			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 LocalizedOperationDisplayDefinitionPt.
func (l LocalizedOperationDisplayDefinitionPt) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "description", l.Description)
	populate(objectMap, "operation", l.Operation)
	populate(objectMap, "provider", l.Provider)
	populate(objectMap, "resource", l.Resource)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LocalizedOperationDisplayDefinitionPt.
func (l *LocalizedOperationDisplayDefinitionPt) UnmarshalJSON(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 "description":
			err = unpopulate(val, "Description", &l.Description)
			delete(rawMsg, key)
		case "operation":
			err = unpopulate(val, "Operation", &l.Operation)
			delete(rawMsg, key)
		case "provider":
			err = unpopulate(val, "Provider", &l.Provider)
			delete(rawMsg, key)
		case "resource":
			err = unpopulate(val, "Resource", &l.Resource)
			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 LocalizedOperationDisplayDefinitionPtBR.
func (l LocalizedOperationDisplayDefinitionPtBR) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "description", l.Description)
	populate(objectMap, "operation", l.Operation)
	populate(objectMap, "provider", l.Provider)
	populate(objectMap, "resource", l.Resource)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LocalizedOperationDisplayDefinitionPtBR.
func (l *LocalizedOperationDisplayDefinitionPtBR) UnmarshalJSON(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 "description":
			err = unpopulate(val, "Description", &l.Description)
			delete(rawMsg, key)
		case "operation":
			err = unpopulate(val, "Operation", &l.Operation)
			delete(rawMsg, key)
		case "provider":
			err = unpopulate(val, "Provider", &l.Provider)
			delete(rawMsg, key)
		case "resource":
			err = unpopulate(val, "Resource", &l.Resource)
			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 LocalizedOperationDisplayDefinitionRu.
func (l LocalizedOperationDisplayDefinitionRu) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "description", l.Description)
	populate(objectMap, "operation", l.Operation)
	populate(objectMap, "provider", l.Provider)
	populate(objectMap, "resource", l.Resource)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LocalizedOperationDisplayDefinitionRu.
func (l *LocalizedOperationDisplayDefinitionRu) UnmarshalJSON(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 "description":
			err = unpopulate(val, "Description", &l.Description)
			delete(rawMsg, key)
		case "operation":
			err = unpopulate(val, "Operation", &l.Operation)
			delete(rawMsg, key)
		case "provider":
			err = unpopulate(val, "Provider", &l.Provider)
			delete(rawMsg, key)
		case "resource":
			err = unpopulate(val, "Resource", &l.Resource)
			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 LocalizedOperationDisplayDefinitionSv.
func (l LocalizedOperationDisplayDefinitionSv) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "description", l.Description)
	populate(objectMap, "operation", l.Operation)
	populate(objectMap, "provider", l.Provider)
	populate(objectMap, "resource", l.Resource)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LocalizedOperationDisplayDefinitionSv.
func (l *LocalizedOperationDisplayDefinitionSv) UnmarshalJSON(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 "description":
			err = unpopulate(val, "Description", &l.Description)
			delete(rawMsg, key)
		case "operation":
			err = unpopulate(val, "Operation", &l.Operation)
			delete(rawMsg, key)
		case "provider":
			err = unpopulate(val, "Provider", &l.Provider)
			delete(rawMsg, key)
		case "resource":
			err = unpopulate(val, "Resource", &l.Resource)
			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 LocalizedOperationDisplayDefinitionZhHans.
func (l LocalizedOperationDisplayDefinitionZhHans) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "description", l.Description)
	populate(objectMap, "operation", l.Operation)
	populate(objectMap, "provider", l.Provider)
	populate(objectMap, "resource", l.Resource)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LocalizedOperationDisplayDefinitionZhHans.
func (l *LocalizedOperationDisplayDefinitionZhHans) UnmarshalJSON(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 "description":
			err = unpopulate(val, "Description", &l.Description)
			delete(rawMsg, key)
		case "operation":
			err = unpopulate(val, "Operation", &l.Operation)
			delete(rawMsg, key)
		case "provider":
			err = unpopulate(val, "Provider", &l.Provider)
			delete(rawMsg, key)
		case "resource":
			err = unpopulate(val, "Resource", &l.Resource)
			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 LocalizedOperationDisplayDefinitionZhHant.
func (l LocalizedOperationDisplayDefinitionZhHant) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "description", l.Description)
	populate(objectMap, "operation", l.Operation)
	populate(objectMap, "provider", l.Provider)
	populate(objectMap, "resource", l.Resource)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LocalizedOperationDisplayDefinitionZhHant.
func (l *LocalizedOperationDisplayDefinitionZhHant) UnmarshalJSON(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 "description":
			err = unpopulate(val, "Description", &l.Description)
			delete(rawMsg, key)
		case "operation":
			err = unpopulate(val, "Operation", &l.Operation)
			delete(rawMsg, key)
		case "provider":
			err = unpopulate(val, "Provider", &l.Provider)
			delete(rawMsg, key)
		case "resource":
			err = unpopulate(val, "Resource", &l.Resource)
			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 LocationQuotaRule.
func (l LocationQuotaRule) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "location", l.Location)
	populate(objectMap, "policy", l.Policy)
	populate(objectMap, "quotaId", l.QuotaID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LocationQuotaRule.
func (l *LocationQuotaRule) UnmarshalJSON(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 "location":
			err = unpopulate(val, "Location", &l.Location)
			delete(rawMsg, key)
		case "policy":
			err = unpopulate(val, "Policy", &l.Policy)
			delete(rawMsg, key)
		case "quotaId":
			err = unpopulate(val, "QuotaID", &l.QuotaID)
			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 LoggingHiddenPropertyPath.
func (l LoggingHiddenPropertyPath) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "hiddenPathsOnRequest", l.HiddenPathsOnRequest)
	populate(objectMap, "hiddenPathsOnResponse", l.HiddenPathsOnResponse)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LoggingHiddenPropertyPath.
func (l *LoggingHiddenPropertyPath) UnmarshalJSON(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 "hiddenPathsOnRequest":
			err = unpopulate(val, "HiddenPathsOnRequest", &l.HiddenPathsOnRequest)
			delete(rawMsg, key)
		case "hiddenPathsOnResponse":
			err = unpopulate(val, "HiddenPathsOnResponse", &l.HiddenPathsOnResponse)
			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 LoggingRule.
func (l LoggingRule) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "action", l.Action)
	populate(objectMap, "detailLevel", l.DetailLevel)
	populate(objectMap, "direction", l.Direction)
	populate(objectMap, "hiddenPropertyPaths", l.HiddenPropertyPaths)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LoggingRule.
func (l *LoggingRule) UnmarshalJSON(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 "action":
			err = unpopulate(val, "Action", &l.Action)
			delete(rawMsg, key)
		case "detailLevel":
			err = unpopulate(val, "DetailLevel", &l.DetailLevel)
			delete(rawMsg, key)
		case "direction":
			err = unpopulate(val, "Direction", &l.Direction)
			delete(rawMsg, key)
		case "hiddenPropertyPaths":
			err = unpopulate(val, "HiddenPropertyPaths", &l.HiddenPropertyPaths)
			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 LoggingRuleHiddenPropertyPaths.
func (l LoggingRuleHiddenPropertyPaths) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "hiddenPathsOnRequest", l.HiddenPathsOnRequest)
	populate(objectMap, "hiddenPathsOnResponse", l.HiddenPathsOnResponse)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LoggingRuleHiddenPropertyPaths.
func (l *LoggingRuleHiddenPropertyPaths) UnmarshalJSON(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 "hiddenPathsOnRequest":
			err = unpopulate(val, "HiddenPathsOnRequest", &l.HiddenPathsOnRequest)
			delete(rawMsg, key)
		case "hiddenPathsOnResponse":
			err = unpopulate(val, "HiddenPathsOnResponse", &l.HiddenPathsOnResponse)
			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 ManifestLevelPropertyBag.
func (m ManifestLevelPropertyBag) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "resourceHydrationAccounts", m.ResourceHydrationAccounts)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ManifestLevelPropertyBag.
func (m *ManifestLevelPropertyBag) UnmarshalJSON(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 "resourceHydrationAccounts":
			err = unpopulate(val, "ResourceHydrationAccounts", &m.ResourceHydrationAccounts)
			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 Metadata.
func (m Metadata) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "directRpRoleDefinitionId", m.DirectRpRoleDefinitionID)
	populate(objectMap, "globalAsyncOperationResourceTypeName", m.GlobalAsyncOperationResourceTypeName)
	populate(objectMap, "providerAuthentication", m.ProviderAuthentication)
	populate(objectMap, "providerAuthorizations", m.ProviderAuthorizations)
	populate(objectMap, "regionalAsyncOperationResourceTypeName", m.RegionalAsyncOperationResourceTypeName)
	populate(objectMap, "thirdPartyProviderAuthorization", m.ThirdPartyProviderAuthorization)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type Metadata.
func (m *Metadata) UnmarshalJSON(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 "directRpRoleDefinitionId":
			err = unpopulate(val, "DirectRpRoleDefinitionID", &m.DirectRpRoleDefinitionID)
			delete(rawMsg, key)
		case "globalAsyncOperationResourceTypeName":
			err = unpopulate(val, "GlobalAsyncOperationResourceTypeName", &m.GlobalAsyncOperationResourceTypeName)
			delete(rawMsg, key)
		case "providerAuthentication":
			err = unpopulate(val, "ProviderAuthentication", &m.ProviderAuthentication)
			delete(rawMsg, key)
		case "providerAuthorizations":
			err = unpopulate(val, "ProviderAuthorizations", &m.ProviderAuthorizations)
			delete(rawMsg, key)
		case "regionalAsyncOperationResourceTypeName":
			err = unpopulate(val, "RegionalAsyncOperationResourceTypeName", &m.RegionalAsyncOperationResourceTypeName)
			delete(rawMsg, key)
		case "thirdPartyProviderAuthorization":
			err = unpopulate(val, "ThirdPartyProviderAuthorization", &m.ThirdPartyProviderAuthorization)
			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 MetadataProviderAuthentication.
func (m MetadataProviderAuthentication) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "allowedAudiences", m.AllowedAudiences)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type MetadataProviderAuthentication.
func (m *MetadataProviderAuthentication) UnmarshalJSON(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 "allowedAudiences":
			err = unpopulate(val, "AllowedAudiences", &m.AllowedAudiences)
			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 MetadataThirdPartyProviderAuthorization.
func (m MetadataThirdPartyProviderAuthorization) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "authorizations", m.Authorizations)
	populate(objectMap, "managedByTenantId", m.ManagedByTenantID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type MetadataThirdPartyProviderAuthorization.
func (m *MetadataThirdPartyProviderAuthorization) UnmarshalJSON(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 "authorizations":
			err = unpopulate(val, "Authorizations", &m.Authorizations)
			delete(rawMsg, key)
		case "managedByTenantId":
			err = unpopulate(val, "ManagedByTenantID", &m.ManagedByTenantID)
			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 Notification.
func (n Notification) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "notificationType", n.NotificationType)
	populate(objectMap, "skipNotifications", n.SkipNotifications)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type Notification.
func (n *Notification) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", n, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "notificationType":
			err = unpopulate(val, "NotificationType", &n.NotificationType)
			delete(rawMsg, key)
		case "skipNotifications":
			err = unpopulate(val, "SkipNotifications", &n.SkipNotifications)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", n, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type NotificationEndpoint.
func (n NotificationEndpoint) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "locations", n.Locations)
	populate(objectMap, "notificationDestination", n.NotificationDestination)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type NotificationEndpoint.
func (n *NotificationEndpoint) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", n, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "locations":
			err = unpopulate(val, "Locations", &n.Locations)
			delete(rawMsg, key)
		case "notificationDestination":
			err = unpopulate(val, "NotificationDestination", &n.NotificationDestination)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", n, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type NotificationRegistration.
func (n NotificationRegistration) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "id", n.ID)
	populate(objectMap, "name", n.Name)
	populate(objectMap, "properties", n.Properties)
	populate(objectMap, "systemData", n.SystemData)
	populate(objectMap, "type", n.Type)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type NotificationRegistration.
func (n *NotificationRegistration) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", n, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "id":
			err = unpopulate(val, "ID", &n.ID)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &n.Name)
			delete(rawMsg, key)
		case "properties":
			err = unpopulate(val, "Properties", &n.Properties)
			delete(rawMsg, key)
		case "systemData":
			err = unpopulate(val, "SystemData", &n.SystemData)
			delete(rawMsg, key)
		case "type":
			err = unpopulate(val, "Type", &n.Type)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", n, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type NotificationRegistrationArrayResponseWithContinuation.
func (n NotificationRegistrationArrayResponseWithContinuation) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "nextLink", n.NextLink)
	populate(objectMap, "value", n.Value)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type NotificationRegistrationArrayResponseWithContinuation.
func (n *NotificationRegistrationArrayResponseWithContinuation) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", n, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "nextLink":
			err = unpopulate(val, "NextLink", &n.NextLink)
			delete(rawMsg, key)
		case "value":
			err = unpopulate(val, "Value", &n.Value)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", n, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type NotificationRegistrationProperties.
func (n NotificationRegistrationProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "includedEvents", n.IncludedEvents)
	populate(objectMap, "messageScope", n.MessageScope)
	populate(objectMap, "notificationEndpoints", n.NotificationEndpoints)
	populate(objectMap, "notificationMode", n.NotificationMode)
	populate(objectMap, "provisioningState", n.ProvisioningState)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type NotificationRegistrationProperties.
func (n *NotificationRegistrationProperties) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", n, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "includedEvents":
			err = unpopulate(val, "IncludedEvents", &n.IncludedEvents)
			delete(rawMsg, key)
		case "messageScope":
			err = unpopulate(val, "MessageScope", &n.MessageScope)
			delete(rawMsg, key)
		case "notificationEndpoints":
			err = unpopulate(val, "NotificationEndpoints", &n.NotificationEndpoints)
			delete(rawMsg, key)
		case "notificationMode":
			err = unpopulate(val, "NotificationMode", &n.NotificationMode)
			delete(rawMsg, key)
		case "provisioningState":
			err = unpopulate(val, "ProvisioningState", &n.ProvisioningState)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", n, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type OpenAPIConfiguration.
func (o OpenAPIConfiguration) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "validation", o.Validation)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type OpenAPIConfiguration.
func (o *OpenAPIConfiguration) UnmarshalJSON(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 "validation":
			err = unpopulate(val, "Validation", &o.Validation)
			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 OpenAPIValidation.
func (o OpenAPIValidation) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "allowNoncompliantCollectionResponse", o.AllowNoncompliantCollectionResponse)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type OpenAPIValidation.
func (o *OpenAPIValidation) UnmarshalJSON(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 "allowNoncompliantCollectionResponse":
			err = unpopulate(val, "AllowNoncompliantCollectionResponse", &o.AllowNoncompliantCollectionResponse)
			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 OperationsContent.
func (o OperationsContent) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "id", o.ID)
	populate(objectMap, "name", o.Name)
	populate(objectMap, "properties", o.Properties)
	populate(objectMap, "systemData", o.SystemData)
	populate(objectMap, "type", o.Type)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type OperationsContent.
func (o *OperationsContent) UnmarshalJSON(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 "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 "systemData":
			err = unpopulate(val, "SystemData", &o.SystemData)
			delete(rawMsg, key)
		case "type":
			err = unpopulate(val, "Type", &o.Type)
			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 OperationsContentProperties.
func (o OperationsContentProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "contents", o.Contents)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type OperationsContentProperties.
func (o *OperationsContentProperties) UnmarshalJSON(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 "contents":
			err = unpopulate(val, "Contents", &o.Contents)
			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 OperationsDefinition.
func (o OperationsDefinition) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	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)
	populateAny(objectMap, "properties", o.Properties)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type OperationsDefinition.
func (o *OperationsDefinition) UnmarshalJSON(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 OperationsDefinitionArrayResponseWithContinuation.
func (o OperationsDefinitionArrayResponseWithContinuation) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "nextLink", o.NextLink)
	populate(objectMap, "value", o.Value)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type OperationsDefinitionArrayResponseWithContinuation.
func (o *OperationsDefinitionArrayResponseWithContinuation) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", o, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "nextLink":
			err = unpopulate(val, "NextLink", &o.NextLink)
			delete(rawMsg, key)
		case "value":
			err = unpopulate(val, "Value", &o.Value)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", o, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type OperationsDefinitionDisplay.
func (o OperationsDefinitionDisplay) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "description", o.Description)
	populate(objectMap, "operation", o.Operation)
	populate(objectMap, "provider", o.Provider)
	populate(objectMap, "resource", o.Resource)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type OperationsDefinitionDisplay.
func (o *OperationsDefinitionDisplay) UnmarshalJSON(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 OperationsDisplayDefinition.
func (o OperationsDisplayDefinition) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "description", o.Description)
	populate(objectMap, "operation", o.Operation)
	populate(objectMap, "provider", o.Provider)
	populate(objectMap, "resource", o.Resource)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type OperationsDisplayDefinition.
func (o *OperationsDisplayDefinition) UnmarshalJSON(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 OperationsPutContent.
func (o OperationsPutContent) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "id", o.ID)
	populate(objectMap, "name", o.Name)
	populate(objectMap, "properties", o.Properties)
	populate(objectMap, "systemData", o.SystemData)
	populate(objectMap, "type", o.Type)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type OperationsPutContent.
func (o *OperationsPutContent) UnmarshalJSON(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 "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 "systemData":
			err = unpopulate(val, "SystemData", &o.SystemData)
			delete(rawMsg, key)
		case "type":
			err = unpopulate(val, "Type", &o.Type)
			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 OperationsPutContentProperties.
func (o OperationsPutContentProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "contents", o.Contents)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type OperationsPutContentProperties.
func (o *OperationsPutContentProperties) UnmarshalJSON(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 "contents":
			err = unpopulate(val, "Contents", &o.Contents)
			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 PrivateResourceProviderConfiguration.
func (p PrivateResourceProviderConfiguration) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "allowedSubscriptions", p.AllowedSubscriptions)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateResourceProviderConfiguration.
func (p *PrivateResourceProviderConfiguration) UnmarshalJSON(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 "allowedSubscriptions":
			err = unpopulate(val, "AllowedSubscriptions", &p.AllowedSubscriptions)
			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 ProviderMonitorSetting.
func (p ProviderMonitorSetting) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "id", p.ID)
	populate(objectMap, "location", p.Location)
	populate(objectMap, "name", p.Name)
	populate(objectMap, "properties", p.Properties)
	populate(objectMap, "systemData", p.SystemData)
	populate(objectMap, "tags", p.Tags)
	populate(objectMap, "type", p.Type)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ProviderMonitorSetting.
func (p *ProviderMonitorSetting) UnmarshalJSON(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 "location":
			err = unpopulate(val, "Location", &p.Location)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &p.Name)
			delete(rawMsg, key)
		case "properties":
			err = unpopulate(val, "Properties", &p.Properties)
			delete(rawMsg, key)
		case "systemData":
			err = unpopulate(val, "SystemData", &p.SystemData)
			delete(rawMsg, key)
		case "tags":
			err = unpopulate(val, "Tags", &p.Tags)
			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 ProviderMonitorSettingArrayResponseWithContinuation.
func (p ProviderMonitorSettingArrayResponseWithContinuation) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "nextLink", p.NextLink)
	populate(objectMap, "value", p.Value)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ProviderMonitorSettingArrayResponseWithContinuation.
func (p *ProviderMonitorSettingArrayResponseWithContinuation) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", p, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "nextLink":
			err = unpopulate(val, "NextLink", &p.NextLink)
			delete(rawMsg, key)
		case "value":
			err = unpopulate(val, "Value", &p.Value)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", p, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ProviderMonitorSettingProperties.
func (p ProviderMonitorSettingProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "provisioningState", p.ProvisioningState)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ProviderMonitorSettingProperties.
func (p *ProviderMonitorSettingProperties) UnmarshalJSON(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 "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 ProviderRegistration.
func (p ProviderRegistration) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "id", p.ID)
	populate(objectMap, "kind", p.Kind)
	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 ProviderRegistration.
func (p *ProviderRegistration) UnmarshalJSON(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 "kind":
			err = unpopulate(val, "Kind", &p.Kind)
			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 ProviderRegistrationArrayResponseWithContinuation.
func (p ProviderRegistrationArrayResponseWithContinuation) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "nextLink", p.NextLink)
	populate(objectMap, "value", p.Value)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ProviderRegistrationArrayResponseWithContinuation.
func (p *ProviderRegistrationArrayResponseWithContinuation) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", p, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "nextLink":
			err = unpopulate(val, "NextLink", &p.NextLink)
			delete(rawMsg, key)
		case "value":
			err = unpopulate(val, "Value", &p.Value)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", p, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ProviderRegistrationProperties.
func (p ProviderRegistrationProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "capabilities", p.Capabilities)
	populate(objectMap, "crossTenantTokenValidation", p.CrossTenantTokenValidation)
	populate(objectMap, "customManifestVersion", p.CustomManifestVersion)
	populate(objectMap, "dstsConfiguration", p.DstsConfiguration)
	populate(objectMap, "enableTenantLinkedNotification", p.EnableTenantLinkedNotification)
	populate(objectMap, "featuresRule", p.FeaturesRule)
	populate(objectMap, "globalNotificationEndpoints", p.GlobalNotificationEndpoints)
	populate(objectMap, "legacyNamespace", p.LegacyNamespace)
	populate(objectMap, "legacyRegistrations", p.LegacyRegistrations)
	populate(objectMap, "linkedNotificationRules", p.LinkedNotificationRules)
	populate(objectMap, "management", p.Management)
	populate(objectMap, "managementGroupGlobalNotificationEndpoints", p.ManagementGroupGlobalNotificationEndpoints)
	populateAny(objectMap, "metadata", p.Metadata)
	populate(objectMap, "namespace", p.Namespace)
	populate(objectMap, "notificationOptions", p.NotificationOptions)
	populate(objectMap, "notificationSettings", p.NotificationSettings)
	populate(objectMap, "notifications", p.Notifications)
	populate(objectMap, "optionalFeatures", p.OptionalFeatures)
	populate(objectMap, "privateResourceProviderConfiguration", p.PrivateResourceProviderConfiguration)
	populate(objectMap, "providerAuthentication", p.ProviderAuthentication)
	populate(objectMap, "providerAuthorizations", p.ProviderAuthorizations)
	populate(objectMap, "providerHubMetadata", p.ProviderHubMetadata)
	populate(objectMap, "providerType", p.ProviderType)
	populate(objectMap, "providerVersion", p.ProviderVersion)
	populate(objectMap, "provisioningState", p.ProvisioningState)
	populate(objectMap, "requestHeaderOptions", p.RequestHeaderOptions)
	populate(objectMap, "requiredFeatures", p.RequiredFeatures)
	populate(objectMap, "resourceGroupLockOptionDuringMove", p.ResourceGroupLockOptionDuringMove)
	populate(objectMap, "resourceHydrationAccounts", p.ResourceHydrationAccounts)
	populate(objectMap, "resourceProviderAuthorizationRules", p.ResourceProviderAuthorizationRules)
	populate(objectMap, "responseOptions", p.ResponseOptions)
	populate(objectMap, "serviceName", p.ServiceName)
	populate(objectMap, "services", p.Services)
	populate(objectMap, "subscriptionLifecycleNotificationSpecifications", p.SubscriptionLifecycleNotificationSpecifications)
	populate(objectMap, "templateDeploymentOptions", p.TemplateDeploymentOptions)
	populate(objectMap, "tokenAuthConfiguration", p.TokenAuthConfiguration)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ProviderRegistrationProperties.
func (p *ProviderRegistrationProperties) UnmarshalJSON(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 "capabilities":
			err = unpopulate(val, "Capabilities", &p.Capabilities)
			delete(rawMsg, key)
		case "crossTenantTokenValidation":
			err = unpopulate(val, "CrossTenantTokenValidation", &p.CrossTenantTokenValidation)
			delete(rawMsg, key)
		case "customManifestVersion":
			err = unpopulate(val, "CustomManifestVersion", &p.CustomManifestVersion)
			delete(rawMsg, key)
		case "dstsConfiguration":
			err = unpopulate(val, "DstsConfiguration", &p.DstsConfiguration)
			delete(rawMsg, key)
		case "enableTenantLinkedNotification":
			err = unpopulate(val, "EnableTenantLinkedNotification", &p.EnableTenantLinkedNotification)
			delete(rawMsg, key)
		case "featuresRule":
			err = unpopulate(val, "FeaturesRule", &p.FeaturesRule)
			delete(rawMsg, key)
		case "globalNotificationEndpoints":
			err = unpopulate(val, "GlobalNotificationEndpoints", &p.GlobalNotificationEndpoints)
			delete(rawMsg, key)
		case "legacyNamespace":
			err = unpopulate(val, "LegacyNamespace", &p.LegacyNamespace)
			delete(rawMsg, key)
		case "legacyRegistrations":
			err = unpopulate(val, "LegacyRegistrations", &p.LegacyRegistrations)
			delete(rawMsg, key)
		case "linkedNotificationRules":
			err = unpopulate(val, "LinkedNotificationRules", &p.LinkedNotificationRules)
			delete(rawMsg, key)
		case "management":
			err = unpopulate(val, "Management", &p.Management)
			delete(rawMsg, key)
		case "managementGroupGlobalNotificationEndpoints":
			err = unpopulate(val, "ManagementGroupGlobalNotificationEndpoints", &p.ManagementGroupGlobalNotificationEndpoints)
			delete(rawMsg, key)
		case "metadata":
			err = unpopulate(val, "Metadata", &p.Metadata)
			delete(rawMsg, key)
		case "namespace":
			err = unpopulate(val, "Namespace", &p.Namespace)
			delete(rawMsg, key)
		case "notificationOptions":
			err = unpopulate(val, "NotificationOptions", &p.NotificationOptions)
			delete(rawMsg, key)
		case "notificationSettings":
			err = unpopulate(val, "NotificationSettings", &p.NotificationSettings)
			delete(rawMsg, key)
		case "notifications":
			err = unpopulate(val, "Notifications", &p.Notifications)
			delete(rawMsg, key)
		case "optionalFeatures":
			err = unpopulate(val, "OptionalFeatures", &p.OptionalFeatures)
			delete(rawMsg, key)
		case "privateResourceProviderConfiguration":
			err = unpopulate(val, "PrivateResourceProviderConfiguration", &p.PrivateResourceProviderConfiguration)
			delete(rawMsg, key)
		case "providerAuthentication":
			err = unpopulate(val, "ProviderAuthentication", &p.ProviderAuthentication)
			delete(rawMsg, key)
		case "providerAuthorizations":
			err = unpopulate(val, "ProviderAuthorizations", &p.ProviderAuthorizations)
			delete(rawMsg, key)
		case "providerHubMetadata":
			err = unpopulate(val, "ProviderHubMetadata", &p.ProviderHubMetadata)
			delete(rawMsg, key)
		case "providerType":
			err = unpopulate(val, "ProviderType", &p.ProviderType)
			delete(rawMsg, key)
		case "providerVersion":
			err = unpopulate(val, "ProviderVersion", &p.ProviderVersion)
			delete(rawMsg, key)
		case "provisioningState":
			err = unpopulate(val, "ProvisioningState", &p.ProvisioningState)
			delete(rawMsg, key)
		case "requestHeaderOptions":
			err = unpopulate(val, "RequestHeaderOptions", &p.RequestHeaderOptions)
			delete(rawMsg, key)
		case "requiredFeatures":
			err = unpopulate(val, "RequiredFeatures", &p.RequiredFeatures)
			delete(rawMsg, key)
		case "resourceGroupLockOptionDuringMove":
			err = unpopulate(val, "ResourceGroupLockOptionDuringMove", &p.ResourceGroupLockOptionDuringMove)
			delete(rawMsg, key)
		case "resourceHydrationAccounts":
			err = unpopulate(val, "ResourceHydrationAccounts", &p.ResourceHydrationAccounts)
			delete(rawMsg, key)
		case "resourceProviderAuthorizationRules":
			err = unpopulate(val, "ResourceProviderAuthorizationRules", &p.ResourceProviderAuthorizationRules)
			delete(rawMsg, key)
		case "responseOptions":
			err = unpopulate(val, "ResponseOptions", &p.ResponseOptions)
			delete(rawMsg, key)
		case "serviceName":
			err = unpopulate(val, "ServiceName", &p.ServiceName)
			delete(rawMsg, key)
		case "services":
			err = unpopulate(val, "Services", &p.Services)
			delete(rawMsg, key)
		case "subscriptionLifecycleNotificationSpecifications":
			err = unpopulate(val, "SubscriptionLifecycleNotificationSpecifications", &p.SubscriptionLifecycleNotificationSpecifications)
			delete(rawMsg, key)
		case "templateDeploymentOptions":
			err = unpopulate(val, "TemplateDeploymentOptions", &p.TemplateDeploymentOptions)
			delete(rawMsg, key)
		case "tokenAuthConfiguration":
			err = unpopulate(val, "TokenAuthConfiguration", &p.TokenAuthConfiguration)
			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 ProviderRegistrationPropertiesPrivateResourceProviderConfiguration.
func (p ProviderRegistrationPropertiesPrivateResourceProviderConfiguration) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "allowedSubscriptions", p.AllowedSubscriptions)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ProviderRegistrationPropertiesPrivateResourceProviderConfiguration.
func (p *ProviderRegistrationPropertiesPrivateResourceProviderConfiguration) UnmarshalJSON(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 "allowedSubscriptions":
			err = unpopulate(val, "AllowedSubscriptions", &p.AllowedSubscriptions)
			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 ProviderRegistrationPropertiesProviderHubMetadata.
func (p ProviderRegistrationPropertiesProviderHubMetadata) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "directRpRoleDefinitionId", p.DirectRpRoleDefinitionID)
	populate(objectMap, "globalAsyncOperationResourceTypeName", p.GlobalAsyncOperationResourceTypeName)
	populate(objectMap, "providerAuthentication", p.ProviderAuthentication)
	populate(objectMap, "providerAuthorizations", p.ProviderAuthorizations)
	populate(objectMap, "regionalAsyncOperationResourceTypeName", p.RegionalAsyncOperationResourceTypeName)
	populate(objectMap, "thirdPartyProviderAuthorization", p.ThirdPartyProviderAuthorization)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ProviderRegistrationPropertiesProviderHubMetadata.
func (p *ProviderRegistrationPropertiesProviderHubMetadata) UnmarshalJSON(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 "directRpRoleDefinitionId":
			err = unpopulate(val, "DirectRpRoleDefinitionID", &p.DirectRpRoleDefinitionID)
			delete(rawMsg, key)
		case "globalAsyncOperationResourceTypeName":
			err = unpopulate(val, "GlobalAsyncOperationResourceTypeName", &p.GlobalAsyncOperationResourceTypeName)
			delete(rawMsg, key)
		case "providerAuthentication":
			err = unpopulate(val, "ProviderAuthentication", &p.ProviderAuthentication)
			delete(rawMsg, key)
		case "providerAuthorizations":
			err = unpopulate(val, "ProviderAuthorizations", &p.ProviderAuthorizations)
			delete(rawMsg, key)
		case "regionalAsyncOperationResourceTypeName":
			err = unpopulate(val, "RegionalAsyncOperationResourceTypeName", &p.RegionalAsyncOperationResourceTypeName)
			delete(rawMsg, key)
		case "thirdPartyProviderAuthorization":
			err = unpopulate(val, "ThirdPartyProviderAuthorization", &p.ThirdPartyProviderAuthorization)
			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 ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications.
func (p ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "softDeleteTTL", p.SoftDeleteTTL)
	populate(objectMap, "subscriptionStateOverrideActions", p.SubscriptionStateOverrideActions)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications.
func (p *ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications) UnmarshalJSON(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 "softDeleteTTL":
			err = unpopulate(val, "SoftDeleteTTL", &p.SoftDeleteTTL)
			delete(rawMsg, key)
		case "subscriptionStateOverrideActions":
			err = unpopulate(val, "SubscriptionStateOverrideActions", &p.SubscriptionStateOverrideActions)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", p, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ProxyResource.
func (p ProxyResource) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "id", p.ID)
	populate(objectMap, "name", p.Name)
	populate(objectMap, "systemData", p.SystemData)
	populate(objectMap, "type", p.Type)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.
func (p *ProxyResource) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", p, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "id":
			err = unpopulate(val, "ID", &p.ID)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &p.Name)
			delete(rawMsg, key)
		case "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 QuotaRule.
func (q QuotaRule) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "locationRules", q.LocationRules)
	populate(objectMap, "quotaPolicy", q.QuotaPolicy)
	populate(objectMap, "requiredFeatures", q.RequiredFeatures)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaRule.
func (q *QuotaRule) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", q, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "locationRules":
			err = unpopulate(val, "LocationRules", &q.LocationRules)
			delete(rawMsg, key)
		case "quotaPolicy":
			err = unpopulate(val, "QuotaPolicy", &q.QuotaPolicy)
			delete(rawMsg, key)
		case "requiredFeatures":
			err = unpopulate(val, "RequiredFeatures", &q.RequiredFeatures)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", q, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ReRegisterSubscriptionMetadata.
func (r ReRegisterSubscriptionMetadata) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "concurrencyLimit", r.ConcurrencyLimit)
	populate(objectMap, "enabled", r.Enabled)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ReRegisterSubscriptionMetadata.
func (r *ReRegisterSubscriptionMetadata) UnmarshalJSON(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 "concurrencyLimit":
			err = unpopulate(val, "ConcurrencyLimit", &r.ConcurrencyLimit)
			delete(rawMsg, key)
		case "enabled":
			err = unpopulate(val, "Enabled", &r.Enabled)
			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 RequestHeaderOptions.
func (r RequestHeaderOptions) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "optInHeaders", r.OptInHeaders)
	populate(objectMap, "optOutHeaders", r.OptOutHeaders)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type RequestHeaderOptions.
func (r *RequestHeaderOptions) UnmarshalJSON(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 "optInHeaders":
			err = unpopulate(val, "OptInHeaders", &r.OptInHeaders)
			delete(rawMsg, key)
		case "optOutHeaders":
			err = unpopulate(val, "OptOutHeaders", &r.OptOutHeaders)
			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 Resource.
func (r Resource) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "id", r.ID)
	populate(objectMap, "name", r.Name)
	populate(objectMap, "systemData", r.SystemData)
	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 "systemData":
			err = unpopulate(val, "SystemData", &r.SystemData)
			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 ResourceAccessRole.
func (r ResourceAccessRole) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "actions", r.Actions)
	populate(objectMap, "allowedGroupClaims", r.AllowedGroupClaims)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceAccessRole.
func (r *ResourceAccessRole) UnmarshalJSON(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 "actions":
			err = unpopulate(val, "Actions", &r.Actions)
			delete(rawMsg, key)
		case "allowedGroupClaims":
			err = unpopulate(val, "AllowedGroupClaims", &r.AllowedGroupClaims)
			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 ResourceConcurrencyControlOption.
func (r ResourceConcurrencyControlOption) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "policy", r.Policy)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceConcurrencyControlOption.
func (r *ResourceConcurrencyControlOption) UnmarshalJSON(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 "policy":
			err = unpopulate(val, "Policy", &r.Policy)
			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 ResourceGraphConfiguration.
func (r ResourceGraphConfiguration) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "apiVersion", r.APIVersion)
	populate(objectMap, "enabled", r.Enabled)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceGraphConfiguration.
func (r *ResourceGraphConfiguration) UnmarshalJSON(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 "apiVersion":
			err = unpopulate(val, "APIVersion", &r.APIVersion)
			delete(rawMsg, key)
		case "enabled":
			err = unpopulate(val, "Enabled", &r.Enabled)
			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 ResourceHydrationAccount.
func (r ResourceHydrationAccount) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "accountName", r.AccountName)
	populate(objectMap, "encryptedKey", r.EncryptedKey)
	populate(objectMap, "maxChildResourceConsistencyJobLimit", r.MaxChildResourceConsistencyJobLimit)
	populate(objectMap, "subscriptionId", r.SubscriptionID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceHydrationAccount.
func (r *ResourceHydrationAccount) UnmarshalJSON(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 "accountName":
			err = unpopulate(val, "AccountName", &r.AccountName)
			delete(rawMsg, key)
		case "encryptedKey":
			err = unpopulate(val, "EncryptedKey", &r.EncryptedKey)
			delete(rawMsg, key)
		case "maxChildResourceConsistencyJobLimit":
			err = unpopulate(val, "MaxChildResourceConsistencyJobLimit", &r.MaxChildResourceConsistencyJobLimit)
			delete(rawMsg, key)
		case "subscriptionId":
			err = unpopulate(val, "SubscriptionID", &r.SubscriptionID)
			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 ResourceManagementAction.
func (r ResourceManagementAction) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "resources", r.Resources)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceManagementAction.
func (r *ResourceManagementAction) UnmarshalJSON(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 "resources":
			err = unpopulate(val, "Resources", &r.Resources)
			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 ResourceManagementEntity.
func (r ResourceManagementEntity) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "homeTenantId", r.HomeTenantID)
	populate(objectMap, "location", r.Location)
	populate(objectMap, "resourceId", r.ResourceID)
	populate(objectMap, "status", r.Status)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceManagementEntity.
func (r *ResourceManagementEntity) UnmarshalJSON(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 "homeTenantId":
			err = unpopulate(val, "HomeTenantID", &r.HomeTenantID)
			delete(rawMsg, key)
		case "location":
			err = unpopulate(val, "Location", &r.Location)
			delete(rawMsg, key)
		case "resourceId":
			err = unpopulate(val, "ResourceID", &r.ResourceID)
			delete(rawMsg, key)
		case "status":
			err = unpopulate(val, "Status", &r.Status)
			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 ResourceMovePolicy.
func (r ResourceMovePolicy) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "crossResourceGroupMoveEnabled", r.CrossResourceGroupMoveEnabled)
	populate(objectMap, "crossSubscriptionMoveEnabled", r.CrossSubscriptionMoveEnabled)
	populate(objectMap, "validationRequired", r.ValidationRequired)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceMovePolicy.
func (r *ResourceMovePolicy) UnmarshalJSON(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 "crossResourceGroupMoveEnabled":
			err = unpopulate(val, "CrossResourceGroupMoveEnabled", &r.CrossResourceGroupMoveEnabled)
			delete(rawMsg, key)
		case "crossSubscriptionMoveEnabled":
			err = unpopulate(val, "CrossSubscriptionMoveEnabled", &r.CrossSubscriptionMoveEnabled)
			delete(rawMsg, key)
		case "validationRequired":
			err = unpopulate(val, "ValidationRequired", &r.ValidationRequired)
			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 ResourceProviderAuthentication.
func (r ResourceProviderAuthentication) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "allowedAudiences", r.AllowedAudiences)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderAuthentication.
func (r *ResourceProviderAuthentication) UnmarshalJSON(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 "allowedAudiences":
			err = unpopulate(val, "AllowedAudiences", &r.AllowedAudiences)
			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 ResourceProviderAuthorization.
func (r ResourceProviderAuthorization) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "allowedThirdPartyExtensions", r.AllowedThirdPartyExtensions)
	populate(objectMap, "applicationId", r.ApplicationID)
	populate(objectMap, "groupingTag", r.GroupingTag)
	populate(objectMap, "managedByAuthorization", r.ManagedByAuthorization)
	populate(objectMap, "managedByRoleDefinitionId", r.ManagedByRoleDefinitionID)
	populate(objectMap, "roleDefinitionId", r.RoleDefinitionID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderAuthorization.
func (r *ResourceProviderAuthorization) UnmarshalJSON(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 "allowedThirdPartyExtensions":
			err = unpopulate(val, "AllowedThirdPartyExtensions", &r.AllowedThirdPartyExtensions)
			delete(rawMsg, key)
		case "applicationId":
			err = unpopulate(val, "ApplicationID", &r.ApplicationID)
			delete(rawMsg, key)
		case "groupingTag":
			err = unpopulate(val, "GroupingTag", &r.GroupingTag)
			delete(rawMsg, key)
		case "managedByAuthorization":
			err = unpopulate(val, "ManagedByAuthorization", &r.ManagedByAuthorization)
			delete(rawMsg, key)
		case "managedByRoleDefinitionId":
			err = unpopulate(val, "ManagedByRoleDefinitionID", &r.ManagedByRoleDefinitionID)
			delete(rawMsg, key)
		case "roleDefinitionId":
			err = unpopulate(val, "RoleDefinitionID", &r.RoleDefinitionID)
			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 ResourceProviderAuthorizationManagedByAuthorization.
func (r ResourceProviderAuthorizationManagedByAuthorization) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "additionalAuthorizations", r.AdditionalAuthorizations)
	populate(objectMap, "allowManagedByInheritance", r.AllowManagedByInheritance)
	populate(objectMap, "managedByResourceRoleDefinitionId", r.ManagedByResourceRoleDefinitionID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderAuthorizationManagedByAuthorization.
func (r *ResourceProviderAuthorizationManagedByAuthorization) UnmarshalJSON(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 "additionalAuthorizations":
			err = unpopulate(val, "AdditionalAuthorizations", &r.AdditionalAuthorizations)
			delete(rawMsg, key)
		case "allowManagedByInheritance":
			err = unpopulate(val, "AllowManagedByInheritance", &r.AllowManagedByInheritance)
			delete(rawMsg, key)
		case "managedByResourceRoleDefinitionId":
			err = unpopulate(val, "ManagedByResourceRoleDefinitionID", &r.ManagedByResourceRoleDefinitionID)
			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 ResourceProviderAuthorizationRules.
func (r ResourceProviderAuthorizationRules) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "asyncOperationPollingRules", r.AsyncOperationPollingRules)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderAuthorizationRules.
func (r *ResourceProviderAuthorizationRules) UnmarshalJSON(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 "asyncOperationPollingRules":
			err = unpopulate(val, "AsyncOperationPollingRules", &r.AsyncOperationPollingRules)
			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 ResourceProviderCapabilities.
func (r ResourceProviderCapabilities) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "effect", r.Effect)
	populate(objectMap, "quotaId", r.QuotaID)
	populate(objectMap, "requiredFeatures", r.RequiredFeatures)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderCapabilities.
func (r *ResourceProviderCapabilities) UnmarshalJSON(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 "effect":
			err = unpopulate(val, "Effect", &r.Effect)
			delete(rawMsg, key)
		case "quotaId":
			err = unpopulate(val, "QuotaID", &r.QuotaID)
			delete(rawMsg, key)
		case "requiredFeatures":
			err = unpopulate(val, "RequiredFeatures", &r.RequiredFeatures)
			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 ResourceProviderEndpoint.
func (r ResourceProviderEndpoint) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "apiVersions", r.APIVersions)
	populate(objectMap, "enabled", r.Enabled)
	populate(objectMap, "endpointType", r.EndpointType)
	populate(objectMap, "endpointUri", r.EndpointURI)
	populate(objectMap, "featuresRule", r.FeaturesRule)
	populate(objectMap, "locations", r.Locations)
	populate(objectMap, "requiredFeatures", r.RequiredFeatures)
	populate(objectMap, "skuLink", r.SKULink)
	populate(objectMap, "timeout", r.Timeout)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderEndpoint.
func (r *ResourceProviderEndpoint) UnmarshalJSON(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 "apiVersions":
			err = unpopulate(val, "APIVersions", &r.APIVersions)
			delete(rawMsg, key)
		case "enabled":
			err = unpopulate(val, "Enabled", &r.Enabled)
			delete(rawMsg, key)
		case "endpointType":
			err = unpopulate(val, "EndpointType", &r.EndpointType)
			delete(rawMsg, key)
		case "endpointUri":
			err = unpopulate(val, "EndpointURI", &r.EndpointURI)
			delete(rawMsg, key)
		case "featuresRule":
			err = unpopulate(val, "FeaturesRule", &r.FeaturesRule)
			delete(rawMsg, key)
		case "locations":
			err = unpopulate(val, "Locations", &r.Locations)
			delete(rawMsg, key)
		case "requiredFeatures":
			err = unpopulate(val, "RequiredFeatures", &r.RequiredFeatures)
			delete(rawMsg, key)
		case "skuLink":
			err = unpopulate(val, "SKULink", &r.SKULink)
			delete(rawMsg, key)
		case "timeout":
			err = unpopulate(val, "Timeout", &r.Timeout)
			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 ResourceProviderEndpointFeaturesRule.
func (r ResourceProviderEndpointFeaturesRule) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "requiredFeaturesPolicy", r.RequiredFeaturesPolicy)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderEndpointFeaturesRule.
func (r *ResourceProviderEndpointFeaturesRule) UnmarshalJSON(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 "requiredFeaturesPolicy":
			err = unpopulate(val, "RequiredFeaturesPolicy", &r.RequiredFeaturesPolicy)
			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 ResourceProviderManagement.
func (r ResourceProviderManagement) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "authorizationOwners", r.AuthorizationOwners)
	populate(objectMap, "canaryManifestOwners", r.CanaryManifestOwners)
	populate(objectMap, "errorResponseMessageOptions", r.ErrorResponseMessageOptions)
	populate(objectMap, "expeditedRolloutMetadata", r.ExpeditedRolloutMetadata)
	populate(objectMap, "expeditedRolloutSubmitters", r.ExpeditedRolloutSubmitters)
	populate(objectMap, "incidentContactEmail", r.IncidentContactEmail)
	populate(objectMap, "incidentRoutingService", r.IncidentRoutingService)
	populate(objectMap, "incidentRoutingTeam", r.IncidentRoutingTeam)
	populate(objectMap, "manifestOwners", r.ManifestOwners)
	populate(objectMap, "pcCode", r.PcCode)
	populate(objectMap, "profitCenterProgramId", r.ProfitCenterProgramID)
	populate(objectMap, "resourceAccessPolicy", r.ResourceAccessPolicy)
	populate(objectMap, "resourceAccessRoles", r.ResourceAccessRoles)
	populate(objectMap, "schemaOwners", r.SchemaOwners)
	populate(objectMap, "serviceTreeInfos", r.ServiceTreeInfos)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderManagement.
func (r *ResourceProviderManagement) UnmarshalJSON(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 "authorizationOwners":
			err = unpopulate(val, "AuthorizationOwners", &r.AuthorizationOwners)
			delete(rawMsg, key)
		case "canaryManifestOwners":
			err = unpopulate(val, "CanaryManifestOwners", &r.CanaryManifestOwners)
			delete(rawMsg, key)
		case "errorResponseMessageOptions":
			err = unpopulate(val, "ErrorResponseMessageOptions", &r.ErrorResponseMessageOptions)
			delete(rawMsg, key)
		case "expeditedRolloutMetadata":
			err = unpopulate(val, "ExpeditedRolloutMetadata", &r.ExpeditedRolloutMetadata)
			delete(rawMsg, key)
		case "expeditedRolloutSubmitters":
			err = unpopulate(val, "ExpeditedRolloutSubmitters", &r.ExpeditedRolloutSubmitters)
			delete(rawMsg, key)
		case "incidentContactEmail":
			err = unpopulate(val, "IncidentContactEmail", &r.IncidentContactEmail)
			delete(rawMsg, key)
		case "incidentRoutingService":
			err = unpopulate(val, "IncidentRoutingService", &r.IncidentRoutingService)
			delete(rawMsg, key)
		case "incidentRoutingTeam":
			err = unpopulate(val, "IncidentRoutingTeam", &r.IncidentRoutingTeam)
			delete(rawMsg, key)
		case "manifestOwners":
			err = unpopulate(val, "ManifestOwners", &r.ManifestOwners)
			delete(rawMsg, key)
		case "pcCode":
			err = unpopulate(val, "PcCode", &r.PcCode)
			delete(rawMsg, key)
		case "profitCenterProgramId":
			err = unpopulate(val, "ProfitCenterProgramID", &r.ProfitCenterProgramID)
			delete(rawMsg, key)
		case "resourceAccessPolicy":
			err = unpopulate(val, "ResourceAccessPolicy", &r.ResourceAccessPolicy)
			delete(rawMsg, key)
		case "resourceAccessRoles":
			err = unpopulate(val, "ResourceAccessRoles", &r.ResourceAccessRoles)
			delete(rawMsg, key)
		case "schemaOwners":
			err = unpopulate(val, "SchemaOwners", &r.SchemaOwners)
			delete(rawMsg, key)
		case "serviceTreeInfos":
			err = unpopulate(val, "ServiceTreeInfos", &r.ServiceTreeInfos)
			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 ResourceProviderManagementErrorResponseMessageOptions.
func (r ResourceProviderManagementErrorResponseMessageOptions) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "serverFailureResponseMessageType", r.ServerFailureResponseMessageType)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderManagementErrorResponseMessageOptions.
func (r *ResourceProviderManagementErrorResponseMessageOptions) UnmarshalJSON(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 "serverFailureResponseMessageType":
			err = unpopulate(val, "ServerFailureResponseMessageType", &r.ServerFailureResponseMessageType)
			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 ResourceProviderManagementExpeditedRolloutMetadata.
func (r ResourceProviderManagementExpeditedRolloutMetadata) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "enabled", r.Enabled)
	populate(objectMap, "expeditedRolloutIntent", r.ExpeditedRolloutIntent)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderManagementExpeditedRolloutMetadata.
func (r *ResourceProviderManagementExpeditedRolloutMetadata) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", r, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "enabled":
			err = unpopulate(val, "Enabled", &r.Enabled)
			delete(rawMsg, key)
		case "expeditedRolloutIntent":
			err = unpopulate(val, "ExpeditedRolloutIntent", &r.ExpeditedRolloutIntent)
			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 ResourceProviderManifest.
func (r ResourceProviderManifest) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "capabilities", r.Capabilities)
	populate(objectMap, "crossTenantTokenValidation", r.CrossTenantTokenValidation)
	populate(objectMap, "enableTenantLinkedNotification", r.EnableTenantLinkedNotification)
	populate(objectMap, "featuresRule", r.FeaturesRule)
	populate(objectMap, "globalNotificationEndpoints", r.GlobalNotificationEndpoints)
	populate(objectMap, "linkedNotificationRules", r.LinkedNotificationRules)
	populate(objectMap, "management", r.Management)
	populateAny(objectMap, "metadata", r.Metadata)
	populate(objectMap, "namespace", r.Namespace)
	populate(objectMap, "notifications", r.Notifications)
	populate(objectMap, "providerAuthentication", r.ProviderAuthentication)
	populate(objectMap, "providerAuthorizations", r.ProviderAuthorizations)
	populate(objectMap, "providerType", r.ProviderType)
	populate(objectMap, "providerVersion", r.ProviderVersion)
	populate(objectMap, "reRegisterSubscriptionMetadata", r.ReRegisterSubscriptionMetadata)
	populate(objectMap, "requestHeaderOptions", r.RequestHeaderOptions)
	populate(objectMap, "requiredFeatures", r.RequiredFeatures)
	populate(objectMap, "resourceProviderAuthorizationRules", r.ResourceProviderAuthorizationRules)
	populate(objectMap, "resourceTypes", r.ResourceTypes)
	populate(objectMap, "serviceName", r.ServiceName)
	populate(objectMap, "services", r.Services)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderManifest.
func (r *ResourceProviderManifest) UnmarshalJSON(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 "capabilities":
			err = unpopulate(val, "Capabilities", &r.Capabilities)
			delete(rawMsg, key)
		case "crossTenantTokenValidation":
			err = unpopulate(val, "CrossTenantTokenValidation", &r.CrossTenantTokenValidation)
			delete(rawMsg, key)
		case "enableTenantLinkedNotification":
			err = unpopulate(val, "EnableTenantLinkedNotification", &r.EnableTenantLinkedNotification)
			delete(rawMsg, key)
		case "featuresRule":
			err = unpopulate(val, "FeaturesRule", &r.FeaturesRule)
			delete(rawMsg, key)
		case "globalNotificationEndpoints":
			err = unpopulate(val, "GlobalNotificationEndpoints", &r.GlobalNotificationEndpoints)
			delete(rawMsg, key)
		case "linkedNotificationRules":
			err = unpopulate(val, "LinkedNotificationRules", &r.LinkedNotificationRules)
			delete(rawMsg, key)
		case "management":
			err = unpopulate(val, "Management", &r.Management)
			delete(rawMsg, key)
		case "metadata":
			err = unpopulate(val, "Metadata", &r.Metadata)
			delete(rawMsg, key)
		case "namespace":
			err = unpopulate(val, "Namespace", &r.Namespace)
			delete(rawMsg, key)
		case "notifications":
			err = unpopulate(val, "Notifications", &r.Notifications)
			delete(rawMsg, key)
		case "providerAuthentication":
			err = unpopulate(val, "ProviderAuthentication", &r.ProviderAuthentication)
			delete(rawMsg, key)
		case "providerAuthorizations":
			err = unpopulate(val, "ProviderAuthorizations", &r.ProviderAuthorizations)
			delete(rawMsg, key)
		case "providerType":
			err = unpopulate(val, "ProviderType", &r.ProviderType)
			delete(rawMsg, key)
		case "providerVersion":
			err = unpopulate(val, "ProviderVersion", &r.ProviderVersion)
			delete(rawMsg, key)
		case "reRegisterSubscriptionMetadata":
			err = unpopulate(val, "ReRegisterSubscriptionMetadata", &r.ReRegisterSubscriptionMetadata)
			delete(rawMsg, key)
		case "requestHeaderOptions":
			err = unpopulate(val, "RequestHeaderOptions", &r.RequestHeaderOptions)
			delete(rawMsg, key)
		case "requiredFeatures":
			err = unpopulate(val, "RequiredFeatures", &r.RequiredFeatures)
			delete(rawMsg, key)
		case "resourceProviderAuthorizationRules":
			err = unpopulate(val, "ResourceProviderAuthorizationRules", &r.ResourceProviderAuthorizationRules)
			delete(rawMsg, key)
		case "resourceTypes":
			err = unpopulate(val, "ResourceTypes", &r.ResourceTypes)
			delete(rawMsg, key)
		case "serviceName":
			err = unpopulate(val, "ServiceName", &r.ServiceName)
			delete(rawMsg, key)
		case "services":
			err = unpopulate(val, "Services", &r.Services)
			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 ResourceProviderManifestFeaturesRule.
func (r ResourceProviderManifestFeaturesRule) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "requiredFeaturesPolicy", r.RequiredFeaturesPolicy)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderManifestFeaturesRule.
func (r *ResourceProviderManifestFeaturesRule) UnmarshalJSON(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 "requiredFeaturesPolicy":
			err = unpopulate(val, "RequiredFeaturesPolicy", &r.RequiredFeaturesPolicy)
			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 ResourceProviderManifestManagement.
func (r ResourceProviderManifestManagement) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "authorizationOwners", r.AuthorizationOwners)
	populate(objectMap, "canaryManifestOwners", r.CanaryManifestOwners)
	populate(objectMap, "errorResponseMessageOptions", r.ErrorResponseMessageOptions)
	populate(objectMap, "expeditedRolloutMetadata", r.ExpeditedRolloutMetadata)
	populate(objectMap, "expeditedRolloutSubmitters", r.ExpeditedRolloutSubmitters)
	populate(objectMap, "incidentContactEmail", r.IncidentContactEmail)
	populate(objectMap, "incidentRoutingService", r.IncidentRoutingService)
	populate(objectMap, "incidentRoutingTeam", r.IncidentRoutingTeam)
	populate(objectMap, "manifestOwners", r.ManifestOwners)
	populate(objectMap, "pcCode", r.PcCode)
	populate(objectMap, "profitCenterProgramId", r.ProfitCenterProgramID)
	populate(objectMap, "resourceAccessPolicy", r.ResourceAccessPolicy)
	populate(objectMap, "resourceAccessRoles", r.ResourceAccessRoles)
	populate(objectMap, "schemaOwners", r.SchemaOwners)
	populate(objectMap, "serviceTreeInfos", r.ServiceTreeInfos)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderManifestManagement.
func (r *ResourceProviderManifestManagement) UnmarshalJSON(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 "authorizationOwners":
			err = unpopulate(val, "AuthorizationOwners", &r.AuthorizationOwners)
			delete(rawMsg, key)
		case "canaryManifestOwners":
			err = unpopulate(val, "CanaryManifestOwners", &r.CanaryManifestOwners)
			delete(rawMsg, key)
		case "errorResponseMessageOptions":
			err = unpopulate(val, "ErrorResponseMessageOptions", &r.ErrorResponseMessageOptions)
			delete(rawMsg, key)
		case "expeditedRolloutMetadata":
			err = unpopulate(val, "ExpeditedRolloutMetadata", &r.ExpeditedRolloutMetadata)
			delete(rawMsg, key)
		case "expeditedRolloutSubmitters":
			err = unpopulate(val, "ExpeditedRolloutSubmitters", &r.ExpeditedRolloutSubmitters)
			delete(rawMsg, key)
		case "incidentContactEmail":
			err = unpopulate(val, "IncidentContactEmail", &r.IncidentContactEmail)
			delete(rawMsg, key)
		case "incidentRoutingService":
			err = unpopulate(val, "IncidentRoutingService", &r.IncidentRoutingService)
			delete(rawMsg, key)
		case "incidentRoutingTeam":
			err = unpopulate(val, "IncidentRoutingTeam", &r.IncidentRoutingTeam)
			delete(rawMsg, key)
		case "manifestOwners":
			err = unpopulate(val, "ManifestOwners", &r.ManifestOwners)
			delete(rawMsg, key)
		case "pcCode":
			err = unpopulate(val, "PcCode", &r.PcCode)
			delete(rawMsg, key)
		case "profitCenterProgramId":
			err = unpopulate(val, "ProfitCenterProgramID", &r.ProfitCenterProgramID)
			delete(rawMsg, key)
		case "resourceAccessPolicy":
			err = unpopulate(val, "ResourceAccessPolicy", &r.ResourceAccessPolicy)
			delete(rawMsg, key)
		case "resourceAccessRoles":
			err = unpopulate(val, "ResourceAccessRoles", &r.ResourceAccessRoles)
			delete(rawMsg, key)
		case "schemaOwners":
			err = unpopulate(val, "SchemaOwners", &r.SchemaOwners)
			delete(rawMsg, key)
		case "serviceTreeInfos":
			err = unpopulate(val, "ServiceTreeInfos", &r.ServiceTreeInfos)
			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 ResourceProviderManifestProperties.
func (r ResourceProviderManifestProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "capabilities", r.Capabilities)
	populate(objectMap, "crossTenantTokenValidation", r.CrossTenantTokenValidation)
	populate(objectMap, "customManifestVersion", r.CustomManifestVersion)
	populate(objectMap, "dstsConfiguration", r.DstsConfiguration)
	populate(objectMap, "enableTenantLinkedNotification", r.EnableTenantLinkedNotification)
	populate(objectMap, "featuresRule", r.FeaturesRule)
	populate(objectMap, "globalNotificationEndpoints", r.GlobalNotificationEndpoints)
	populate(objectMap, "legacyNamespace", r.LegacyNamespace)
	populate(objectMap, "legacyRegistrations", r.LegacyRegistrations)
	populate(objectMap, "linkedNotificationRules", r.LinkedNotificationRules)
	populate(objectMap, "management", r.Management)
	populate(objectMap, "managementGroupGlobalNotificationEndpoints", r.ManagementGroupGlobalNotificationEndpoints)
	populateAny(objectMap, "metadata", r.Metadata)
	populate(objectMap, "namespace", r.Namespace)
	populate(objectMap, "notificationOptions", r.NotificationOptions)
	populate(objectMap, "notificationSettings", r.NotificationSettings)
	populate(objectMap, "notifications", r.Notifications)
	populate(objectMap, "optionalFeatures", r.OptionalFeatures)
	populate(objectMap, "providerAuthentication", r.ProviderAuthentication)
	populate(objectMap, "providerAuthorizations", r.ProviderAuthorizations)
	populate(objectMap, "providerType", r.ProviderType)
	populate(objectMap, "providerVersion", r.ProviderVersion)
	populate(objectMap, "requestHeaderOptions", r.RequestHeaderOptions)
	populate(objectMap, "requiredFeatures", r.RequiredFeatures)
	populate(objectMap, "resourceGroupLockOptionDuringMove", r.ResourceGroupLockOptionDuringMove)
	populate(objectMap, "resourceHydrationAccounts", r.ResourceHydrationAccounts)
	populate(objectMap, "resourceProviderAuthorizationRules", r.ResourceProviderAuthorizationRules)
	populate(objectMap, "responseOptions", r.ResponseOptions)
	populate(objectMap, "serviceName", r.ServiceName)
	populate(objectMap, "services", r.Services)
	populate(objectMap, "templateDeploymentOptions", r.TemplateDeploymentOptions)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderManifestProperties.
func (r *ResourceProviderManifestProperties) UnmarshalJSON(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 "capabilities":
			err = unpopulate(val, "Capabilities", &r.Capabilities)
			delete(rawMsg, key)
		case "crossTenantTokenValidation":
			err = unpopulate(val, "CrossTenantTokenValidation", &r.CrossTenantTokenValidation)
			delete(rawMsg, key)
		case "customManifestVersion":
			err = unpopulate(val, "CustomManifestVersion", &r.CustomManifestVersion)
			delete(rawMsg, key)
		case "dstsConfiguration":
			err = unpopulate(val, "DstsConfiguration", &r.DstsConfiguration)
			delete(rawMsg, key)
		case "enableTenantLinkedNotification":
			err = unpopulate(val, "EnableTenantLinkedNotification", &r.EnableTenantLinkedNotification)
			delete(rawMsg, key)
		case "featuresRule":
			err = unpopulate(val, "FeaturesRule", &r.FeaturesRule)
			delete(rawMsg, key)
		case "globalNotificationEndpoints":
			err = unpopulate(val, "GlobalNotificationEndpoints", &r.GlobalNotificationEndpoints)
			delete(rawMsg, key)
		case "legacyNamespace":
			err = unpopulate(val, "LegacyNamespace", &r.LegacyNamespace)
			delete(rawMsg, key)
		case "legacyRegistrations":
			err = unpopulate(val, "LegacyRegistrations", &r.LegacyRegistrations)
			delete(rawMsg, key)
		case "linkedNotificationRules":
			err = unpopulate(val, "LinkedNotificationRules", &r.LinkedNotificationRules)
			delete(rawMsg, key)
		case "management":
			err = unpopulate(val, "Management", &r.Management)
			delete(rawMsg, key)
		case "managementGroupGlobalNotificationEndpoints":
			err = unpopulate(val, "ManagementGroupGlobalNotificationEndpoints", &r.ManagementGroupGlobalNotificationEndpoints)
			delete(rawMsg, key)
		case "metadata":
			err = unpopulate(val, "Metadata", &r.Metadata)
			delete(rawMsg, key)
		case "namespace":
			err = unpopulate(val, "Namespace", &r.Namespace)
			delete(rawMsg, key)
		case "notificationOptions":
			err = unpopulate(val, "NotificationOptions", &r.NotificationOptions)
			delete(rawMsg, key)
		case "notificationSettings":
			err = unpopulate(val, "NotificationSettings", &r.NotificationSettings)
			delete(rawMsg, key)
		case "notifications":
			err = unpopulate(val, "Notifications", &r.Notifications)
			delete(rawMsg, key)
		case "optionalFeatures":
			err = unpopulate(val, "OptionalFeatures", &r.OptionalFeatures)
			delete(rawMsg, key)
		case "providerAuthentication":
			err = unpopulate(val, "ProviderAuthentication", &r.ProviderAuthentication)
			delete(rawMsg, key)
		case "providerAuthorizations":
			err = unpopulate(val, "ProviderAuthorizations", &r.ProviderAuthorizations)
			delete(rawMsg, key)
		case "providerType":
			err = unpopulate(val, "ProviderType", &r.ProviderType)
			delete(rawMsg, key)
		case "providerVersion":
			err = unpopulate(val, "ProviderVersion", &r.ProviderVersion)
			delete(rawMsg, key)
		case "requestHeaderOptions":
			err = unpopulate(val, "RequestHeaderOptions", &r.RequestHeaderOptions)
			delete(rawMsg, key)
		case "requiredFeatures":
			err = unpopulate(val, "RequiredFeatures", &r.RequiredFeatures)
			delete(rawMsg, key)
		case "resourceGroupLockOptionDuringMove":
			err = unpopulate(val, "ResourceGroupLockOptionDuringMove", &r.ResourceGroupLockOptionDuringMove)
			delete(rawMsg, key)
		case "resourceHydrationAccounts":
			err = unpopulate(val, "ResourceHydrationAccounts", &r.ResourceHydrationAccounts)
			delete(rawMsg, key)
		case "resourceProviderAuthorizationRules":
			err = unpopulate(val, "ResourceProviderAuthorizationRules", &r.ResourceProviderAuthorizationRules)
			delete(rawMsg, key)
		case "responseOptions":
			err = unpopulate(val, "ResponseOptions", &r.ResponseOptions)
			delete(rawMsg, key)
		case "serviceName":
			err = unpopulate(val, "ServiceName", &r.ServiceName)
			delete(rawMsg, key)
		case "services":
			err = unpopulate(val, "Services", &r.Services)
			delete(rawMsg, key)
		case "templateDeploymentOptions":
			err = unpopulate(val, "TemplateDeploymentOptions", &r.TemplateDeploymentOptions)
			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 ResourceProviderManifestPropertiesDstsConfiguration.
func (r ResourceProviderManifestPropertiesDstsConfiguration) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "serviceDnsName", r.ServiceDNSName)
	populate(objectMap, "serviceName", r.ServiceName)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderManifestPropertiesDstsConfiguration.
func (r *ResourceProviderManifestPropertiesDstsConfiguration) UnmarshalJSON(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 "serviceDnsName":
			err = unpopulate(val, "ServiceDNSName", &r.ServiceDNSName)
			delete(rawMsg, key)
		case "serviceName":
			err = unpopulate(val, "ServiceName", &r.ServiceName)
			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 ResourceProviderManifestPropertiesFeaturesRule.
func (r ResourceProviderManifestPropertiesFeaturesRule) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "requiredFeaturesPolicy", r.RequiredFeaturesPolicy)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderManifestPropertiesFeaturesRule.
func (r *ResourceProviderManifestPropertiesFeaturesRule) UnmarshalJSON(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 "requiredFeaturesPolicy":
			err = unpopulate(val, "RequiredFeaturesPolicy", &r.RequiredFeaturesPolicy)
			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 ResourceProviderManifestPropertiesManagement.
func (r ResourceProviderManifestPropertiesManagement) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "authorizationOwners", r.AuthorizationOwners)
	populate(objectMap, "canaryManifestOwners", r.CanaryManifestOwners)
	populate(objectMap, "errorResponseMessageOptions", r.ErrorResponseMessageOptions)
	populate(objectMap, "expeditedRolloutMetadata", r.ExpeditedRolloutMetadata)
	populate(objectMap, "expeditedRolloutSubmitters", r.ExpeditedRolloutSubmitters)
	populate(objectMap, "incidentContactEmail", r.IncidentContactEmail)
	populate(objectMap, "incidentRoutingService", r.IncidentRoutingService)
	populate(objectMap, "incidentRoutingTeam", r.IncidentRoutingTeam)
	populate(objectMap, "manifestOwners", r.ManifestOwners)
	populate(objectMap, "pcCode", r.PcCode)
	populate(objectMap, "profitCenterProgramId", r.ProfitCenterProgramID)
	populate(objectMap, "resourceAccessPolicy", r.ResourceAccessPolicy)
	populate(objectMap, "resourceAccessRoles", r.ResourceAccessRoles)
	populate(objectMap, "schemaOwners", r.SchemaOwners)
	populate(objectMap, "serviceTreeInfos", r.ServiceTreeInfos)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderManifestPropertiesManagement.
func (r *ResourceProviderManifestPropertiesManagement) UnmarshalJSON(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 "authorizationOwners":
			err = unpopulate(val, "AuthorizationOwners", &r.AuthorizationOwners)
			delete(rawMsg, key)
		case "canaryManifestOwners":
			err = unpopulate(val, "CanaryManifestOwners", &r.CanaryManifestOwners)
			delete(rawMsg, key)
		case "errorResponseMessageOptions":
			err = unpopulate(val, "ErrorResponseMessageOptions", &r.ErrorResponseMessageOptions)
			delete(rawMsg, key)
		case "expeditedRolloutMetadata":
			err = unpopulate(val, "ExpeditedRolloutMetadata", &r.ExpeditedRolloutMetadata)
			delete(rawMsg, key)
		case "expeditedRolloutSubmitters":
			err = unpopulate(val, "ExpeditedRolloutSubmitters", &r.ExpeditedRolloutSubmitters)
			delete(rawMsg, key)
		case "incidentContactEmail":
			err = unpopulate(val, "IncidentContactEmail", &r.IncidentContactEmail)
			delete(rawMsg, key)
		case "incidentRoutingService":
			err = unpopulate(val, "IncidentRoutingService", &r.IncidentRoutingService)
			delete(rawMsg, key)
		case "incidentRoutingTeam":
			err = unpopulate(val, "IncidentRoutingTeam", &r.IncidentRoutingTeam)
			delete(rawMsg, key)
		case "manifestOwners":
			err = unpopulate(val, "ManifestOwners", &r.ManifestOwners)
			delete(rawMsg, key)
		case "pcCode":
			err = unpopulate(val, "PcCode", &r.PcCode)
			delete(rawMsg, key)
		case "profitCenterProgramId":
			err = unpopulate(val, "ProfitCenterProgramID", &r.ProfitCenterProgramID)
			delete(rawMsg, key)
		case "resourceAccessPolicy":
			err = unpopulate(val, "ResourceAccessPolicy", &r.ResourceAccessPolicy)
			delete(rawMsg, key)
		case "resourceAccessRoles":
			err = unpopulate(val, "ResourceAccessRoles", &r.ResourceAccessRoles)
			delete(rawMsg, key)
		case "schemaOwners":
			err = unpopulate(val, "SchemaOwners", &r.SchemaOwners)
			delete(rawMsg, key)
		case "serviceTreeInfos":
			err = unpopulate(val, "ServiceTreeInfos", &r.ServiceTreeInfos)
			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 ResourceProviderManifestPropertiesNotificationSettings.
func (r ResourceProviderManifestPropertiesNotificationSettings) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "subscriberSettings", r.SubscriberSettings)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderManifestPropertiesNotificationSettings.
func (r *ResourceProviderManifestPropertiesNotificationSettings) UnmarshalJSON(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 "subscriberSettings":
			err = unpopulate(val, "SubscriberSettings", &r.SubscriberSettings)
			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 ResourceProviderManifestPropertiesProviderAuthentication.
func (r ResourceProviderManifestPropertiesProviderAuthentication) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "allowedAudiences", r.AllowedAudiences)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderManifestPropertiesProviderAuthentication.
func (r *ResourceProviderManifestPropertiesProviderAuthentication) UnmarshalJSON(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 "allowedAudiences":
			err = unpopulate(val, "AllowedAudiences", &r.AllowedAudiences)
			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 ResourceProviderManifestPropertiesRequestHeaderOptions.
func (r ResourceProviderManifestPropertiesRequestHeaderOptions) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "optInHeaders", r.OptInHeaders)
	populate(objectMap, "optOutHeaders", r.OptOutHeaders)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderManifestPropertiesRequestHeaderOptions.
func (r *ResourceProviderManifestPropertiesRequestHeaderOptions) UnmarshalJSON(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 "optInHeaders":
			err = unpopulate(val, "OptInHeaders", &r.OptInHeaders)
			delete(rawMsg, key)
		case "optOutHeaders":
			err = unpopulate(val, "OptOutHeaders", &r.OptOutHeaders)
			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 ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove.
func (r ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "blockActionVerb", r.BlockActionVerb)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove.
func (r *ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove) UnmarshalJSON(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 "blockActionVerb":
			err = unpopulate(val, "BlockActionVerb", &r.BlockActionVerb)
			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 ResourceProviderManifestPropertiesResponseOptions.
func (r ResourceProviderManifestPropertiesResponseOptions) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "serviceClientOptionsType", r.ServiceClientOptionsType)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderManifestPropertiesResponseOptions.
func (r *ResourceProviderManifestPropertiesResponseOptions) UnmarshalJSON(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 "serviceClientOptionsType":
			err = unpopulate(val, "ServiceClientOptionsType", &r.ServiceClientOptionsType)
			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 ResourceProviderManifestPropertiesTemplateDeploymentOptions.
func (r ResourceProviderManifestPropertiesTemplateDeploymentOptions) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "preflightOptions", r.PreflightOptions)
	populate(objectMap, "preflightSupported", r.PreflightSupported)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderManifestPropertiesTemplateDeploymentOptions.
func (r *ResourceProviderManifestPropertiesTemplateDeploymentOptions) UnmarshalJSON(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 "preflightOptions":
			err = unpopulate(val, "PreflightOptions", &r.PreflightOptions)
			delete(rawMsg, key)
		case "preflightSupported":
			err = unpopulate(val, "PreflightSupported", &r.PreflightSupported)
			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 ResourceProviderManifestProviderAuthentication.
func (r ResourceProviderManifestProviderAuthentication) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "allowedAudiences", r.AllowedAudiences)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderManifestProviderAuthentication.
func (r *ResourceProviderManifestProviderAuthentication) UnmarshalJSON(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 "allowedAudiences":
			err = unpopulate(val, "AllowedAudiences", &r.AllowedAudiences)
			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 ResourceProviderManifestReRegisterSubscriptionMetadata.
func (r ResourceProviderManifestReRegisterSubscriptionMetadata) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "concurrencyLimit", r.ConcurrencyLimit)
	populate(objectMap, "enabled", r.Enabled)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderManifestReRegisterSubscriptionMetadata.
func (r *ResourceProviderManifestReRegisterSubscriptionMetadata) UnmarshalJSON(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 "concurrencyLimit":
			err = unpopulate(val, "ConcurrencyLimit", &r.ConcurrencyLimit)
			delete(rawMsg, key)
		case "enabled":
			err = unpopulate(val, "Enabled", &r.Enabled)
			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 ResourceProviderManifestRequestHeaderOptions.
func (r ResourceProviderManifestRequestHeaderOptions) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "optInHeaders", r.OptInHeaders)
	populate(objectMap, "optOutHeaders", r.OptOutHeaders)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderManifestRequestHeaderOptions.
func (r *ResourceProviderManifestRequestHeaderOptions) UnmarshalJSON(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 "optInHeaders":
			err = unpopulate(val, "OptInHeaders", &r.OptInHeaders)
			delete(rawMsg, key)
		case "optOutHeaders":
			err = unpopulate(val, "OptOutHeaders", &r.OptOutHeaders)
			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 ResourceProviderService.
func (r ResourceProviderService) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "serviceName", r.ServiceName)
	populate(objectMap, "status", r.Status)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderService.
func (r *ResourceProviderService) UnmarshalJSON(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 "serviceName":
			err = unpopulate(val, "ServiceName", &r.ServiceName)
			delete(rawMsg, key)
		case "status":
			err = unpopulate(val, "Status", &r.Status)
			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 ResourceType.
func (r ResourceType) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "additionalOptions", r.AdditionalOptions)
	populate(objectMap, "allowedUnauthorizedActions", r.AllowedUnauthorizedActions)
	populate(objectMap, "allowedUnauthorizedActionsExtensions", r.AllowedUnauthorizedActionsExtensions)
	populate(objectMap, "authorizationActionMappings", r.AuthorizationActionMappings)
	populate(objectMap, "crossTenantTokenValidation", r.CrossTenantTokenValidation)
	populate(objectMap, "defaultApiVersion", r.DefaultAPIVersion)
	populate(objectMap, "disallowedActionVerbs", r.DisallowedActionVerbs)
	populate(objectMap, "endpoints", r.Endpoints)
	populate(objectMap, "extendedLocations", r.ExtendedLocations)
	populate(objectMap, "featuresRule", r.FeaturesRule)
	populate(objectMap, "identityManagement", r.IdentityManagement)
	populate(objectMap, "linkedAccessChecks", r.LinkedAccessChecks)
	populate(objectMap, "linkedNotificationRules", r.LinkedNotificationRules)
	populate(objectMap, "linkedOperationRules", r.LinkedOperationRules)
	populate(objectMap, "loggingRules", r.LoggingRules)
	populate(objectMap, "marketplaceType", r.MarketplaceType)
	populateAny(objectMap, "metadata", r.Metadata)
	populate(objectMap, "name", r.Name)
	populate(objectMap, "notifications", r.Notifications)
	populate(objectMap, "quotaRule", r.QuotaRule)
	populate(objectMap, "requestHeaderOptions", r.RequestHeaderOptions)
	populate(objectMap, "requiredFeatures", r.RequiredFeatures)
	populate(objectMap, "resourceDeletionPolicy", r.ResourceDeletionPolicy)
	populate(objectMap, "resourceProviderAuthorizationRules", r.ResourceProviderAuthorizationRules)
	populate(objectMap, "resourceValidation", r.ResourceValidation)
	populate(objectMap, "routingType", r.RoutingType)
	populate(objectMap, "skuLink", r.SKULink)
	populate(objectMap, "serviceTreeInfos", r.ServiceTreeInfos)
	populate(objectMap, "subscriptionStateRules", r.SubscriptionStateRules)
	populate(objectMap, "templateDeploymentPolicy", r.TemplateDeploymentPolicy)
	populate(objectMap, "throttlingRules", r.ThrottlingRules)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceType.
func (r *ResourceType) UnmarshalJSON(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 "additionalOptions":
			err = unpopulate(val, "AdditionalOptions", &r.AdditionalOptions)
			delete(rawMsg, key)
		case "allowedUnauthorizedActions":
			err = unpopulate(val, "AllowedUnauthorizedActions", &r.AllowedUnauthorizedActions)
			delete(rawMsg, key)
		case "allowedUnauthorizedActionsExtensions":
			err = unpopulate(val, "AllowedUnauthorizedActionsExtensions", &r.AllowedUnauthorizedActionsExtensions)
			delete(rawMsg, key)
		case "authorizationActionMappings":
			err = unpopulate(val, "AuthorizationActionMappings", &r.AuthorizationActionMappings)
			delete(rawMsg, key)
		case "crossTenantTokenValidation":
			err = unpopulate(val, "CrossTenantTokenValidation", &r.CrossTenantTokenValidation)
			delete(rawMsg, key)
		case "defaultApiVersion":
			err = unpopulate(val, "DefaultAPIVersion", &r.DefaultAPIVersion)
			delete(rawMsg, key)
		case "disallowedActionVerbs":
			err = unpopulate(val, "DisallowedActionVerbs", &r.DisallowedActionVerbs)
			delete(rawMsg, key)
		case "endpoints":
			err = unpopulate(val, "Endpoints", &r.Endpoints)
			delete(rawMsg, key)
		case "extendedLocations":
			err = unpopulate(val, "ExtendedLocations", &r.ExtendedLocations)
			delete(rawMsg, key)
		case "featuresRule":
			err = unpopulate(val, "FeaturesRule", &r.FeaturesRule)
			delete(rawMsg, key)
		case "identityManagement":
			err = unpopulate(val, "IdentityManagement", &r.IdentityManagement)
			delete(rawMsg, key)
		case "linkedAccessChecks":
			err = unpopulate(val, "LinkedAccessChecks", &r.LinkedAccessChecks)
			delete(rawMsg, key)
		case "linkedNotificationRules":
			err = unpopulate(val, "LinkedNotificationRules", &r.LinkedNotificationRules)
			delete(rawMsg, key)
		case "linkedOperationRules":
			err = unpopulate(val, "LinkedOperationRules", &r.LinkedOperationRules)
			delete(rawMsg, key)
		case "loggingRules":
			err = unpopulate(val, "LoggingRules", &r.LoggingRules)
			delete(rawMsg, key)
		case "marketplaceType":
			err = unpopulate(val, "MarketplaceType", &r.MarketplaceType)
			delete(rawMsg, key)
		case "metadata":
			err = unpopulate(val, "Metadata", &r.Metadata)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &r.Name)
			delete(rawMsg, key)
		case "notifications":
			err = unpopulate(val, "Notifications", &r.Notifications)
			delete(rawMsg, key)
		case "quotaRule":
			err = unpopulate(val, "QuotaRule", &r.QuotaRule)
			delete(rawMsg, key)
		case "requestHeaderOptions":
			err = unpopulate(val, "RequestHeaderOptions", &r.RequestHeaderOptions)
			delete(rawMsg, key)
		case "requiredFeatures":
			err = unpopulate(val, "RequiredFeatures", &r.RequiredFeatures)
			delete(rawMsg, key)
		case "resourceDeletionPolicy":
			err = unpopulate(val, "ResourceDeletionPolicy", &r.ResourceDeletionPolicy)
			delete(rawMsg, key)
		case "resourceProviderAuthorizationRules":
			err = unpopulate(val, "ResourceProviderAuthorizationRules", &r.ResourceProviderAuthorizationRules)
			delete(rawMsg, key)
		case "resourceValidation":
			err = unpopulate(val, "ResourceValidation", &r.ResourceValidation)
			delete(rawMsg, key)
		case "routingType":
			err = unpopulate(val, "RoutingType", &r.RoutingType)
			delete(rawMsg, key)
		case "skuLink":
			err = unpopulate(val, "SKULink", &r.SKULink)
			delete(rawMsg, key)
		case "serviceTreeInfos":
			err = unpopulate(val, "ServiceTreeInfos", &r.ServiceTreeInfos)
			delete(rawMsg, key)
		case "subscriptionStateRules":
			err = unpopulate(val, "SubscriptionStateRules", &r.SubscriptionStateRules)
			delete(rawMsg, key)
		case "templateDeploymentPolicy":
			err = unpopulate(val, "TemplateDeploymentPolicy", &r.TemplateDeploymentPolicy)
			delete(rawMsg, key)
		case "throttlingRules":
			err = unpopulate(val, "ThrottlingRules", &r.ThrottlingRules)
			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 ResourceTypeEndpoint.
func (r ResourceTypeEndpoint) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "apiVersion", r.APIVersion)
	populate(objectMap, "apiVersions", r.APIVersions)
	populate(objectMap, "dataBoundary", r.DataBoundary)
	populate(objectMap, "dstsConfiguration", r.DstsConfiguration)
	populate(objectMap, "enabled", r.Enabled)
	populate(objectMap, "endpointType", r.EndpointType)
	populate(objectMap, "endpointUri", r.EndpointURI)
	populate(objectMap, "extensions", r.Extensions)
	populate(objectMap, "featuresRule", r.FeaturesRule)
	populate(objectMap, "kind", r.Kind)
	populate(objectMap, "locations", r.Locations)
	populate(objectMap, "requiredFeatures", r.RequiredFeatures)
	populate(objectMap, "skuLink", r.SKULink)
	populate(objectMap, "timeout", r.Timeout)
	populate(objectMap, "tokenAuthConfiguration", r.TokenAuthConfiguration)
	populate(objectMap, "zones", r.Zones)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeEndpoint.
func (r *ResourceTypeEndpoint) UnmarshalJSON(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 "apiVersion":
			err = unpopulate(val, "APIVersion", &r.APIVersion)
			delete(rawMsg, key)
		case "apiVersions":
			err = unpopulate(val, "APIVersions", &r.APIVersions)
			delete(rawMsg, key)
		case "dataBoundary":
			err = unpopulate(val, "DataBoundary", &r.DataBoundary)
			delete(rawMsg, key)
		case "dstsConfiguration":
			err = unpopulate(val, "DstsConfiguration", &r.DstsConfiguration)
			delete(rawMsg, key)
		case "enabled":
			err = unpopulate(val, "Enabled", &r.Enabled)
			delete(rawMsg, key)
		case "endpointType":
			err = unpopulate(val, "EndpointType", &r.EndpointType)
			delete(rawMsg, key)
		case "endpointUri":
			err = unpopulate(val, "EndpointURI", &r.EndpointURI)
			delete(rawMsg, key)
		case "extensions":
			err = unpopulate(val, "Extensions", &r.Extensions)
			delete(rawMsg, key)
		case "featuresRule":
			err = unpopulate(val, "FeaturesRule", &r.FeaturesRule)
			delete(rawMsg, key)
		case "kind":
			err = unpopulate(val, "Kind", &r.Kind)
			delete(rawMsg, key)
		case "locations":
			err = unpopulate(val, "Locations", &r.Locations)
			delete(rawMsg, key)
		case "requiredFeatures":
			err = unpopulate(val, "RequiredFeatures", &r.RequiredFeatures)
			delete(rawMsg, key)
		case "skuLink":
			err = unpopulate(val, "SKULink", &r.SKULink)
			delete(rawMsg, key)
		case "timeout":
			err = unpopulate(val, "Timeout", &r.Timeout)
			delete(rawMsg, key)
		case "tokenAuthConfiguration":
			err = unpopulate(val, "TokenAuthConfiguration", &r.TokenAuthConfiguration)
			delete(rawMsg, key)
		case "zones":
			err = unpopulate(val, "Zones", &r.Zones)
			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 ResourceTypeEndpointBase.
func (r ResourceTypeEndpointBase) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "apiVersion", r.APIVersion)
	populate(objectMap, "apiVersions", r.APIVersions)
	populate(objectMap, "dstsConfiguration", r.DstsConfiguration)
	populate(objectMap, "enabled", r.Enabled)
	populate(objectMap, "endpointType", r.EndpointType)
	populate(objectMap, "endpointUri", r.EndpointURI)
	populate(objectMap, "featuresRule", r.FeaturesRule)
	populate(objectMap, "locations", r.Locations)
	populate(objectMap, "requiredFeatures", r.RequiredFeatures)
	populate(objectMap, "skuLink", r.SKULink)
	populate(objectMap, "timeout", r.Timeout)
	populate(objectMap, "zones", r.Zones)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeEndpointBase.
func (r *ResourceTypeEndpointBase) UnmarshalJSON(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 "apiVersion":
			err = unpopulate(val, "APIVersion", &r.APIVersion)
			delete(rawMsg, key)
		case "apiVersions":
			err = unpopulate(val, "APIVersions", &r.APIVersions)
			delete(rawMsg, key)
		case "dstsConfiguration":
			err = unpopulate(val, "DstsConfiguration", &r.DstsConfiguration)
			delete(rawMsg, key)
		case "enabled":
			err = unpopulate(val, "Enabled", &r.Enabled)
			delete(rawMsg, key)
		case "endpointType":
			err = unpopulate(val, "EndpointType", &r.EndpointType)
			delete(rawMsg, key)
		case "endpointUri":
			err = unpopulate(val, "EndpointURI", &r.EndpointURI)
			delete(rawMsg, key)
		case "featuresRule":
			err = unpopulate(val, "FeaturesRule", &r.FeaturesRule)
			delete(rawMsg, key)
		case "locations":
			err = unpopulate(val, "Locations", &r.Locations)
			delete(rawMsg, key)
		case "requiredFeatures":
			err = unpopulate(val, "RequiredFeatures", &r.RequiredFeatures)
			delete(rawMsg, key)
		case "skuLink":
			err = unpopulate(val, "SKULink", &r.SKULink)
			delete(rawMsg, key)
		case "timeout":
			err = unpopulate(val, "Timeout", &r.Timeout)
			delete(rawMsg, key)
		case "zones":
			err = unpopulate(val, "Zones", &r.Zones)
			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 ResourceTypeEndpointBaseDstsConfiguration.
func (r ResourceTypeEndpointBaseDstsConfiguration) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "serviceDnsName", r.ServiceDNSName)
	populate(objectMap, "serviceName", r.ServiceName)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeEndpointBaseDstsConfiguration.
func (r *ResourceTypeEndpointBaseDstsConfiguration) UnmarshalJSON(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 "serviceDnsName":
			err = unpopulate(val, "ServiceDNSName", &r.ServiceDNSName)
			delete(rawMsg, key)
		case "serviceName":
			err = unpopulate(val, "ServiceName", &r.ServiceName)
			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 ResourceTypeEndpointBaseFeaturesRule.
func (r ResourceTypeEndpointBaseFeaturesRule) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "requiredFeaturesPolicy", r.RequiredFeaturesPolicy)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeEndpointBaseFeaturesRule.
func (r *ResourceTypeEndpointBaseFeaturesRule) UnmarshalJSON(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 "requiredFeaturesPolicy":
			err = unpopulate(val, "RequiredFeaturesPolicy", &r.RequiredFeaturesPolicy)
			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 ResourceTypeEndpointDstsConfiguration.
func (r ResourceTypeEndpointDstsConfiguration) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "serviceDnsName", r.ServiceDNSName)
	populate(objectMap, "serviceName", r.ServiceName)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeEndpointDstsConfiguration.
func (r *ResourceTypeEndpointDstsConfiguration) UnmarshalJSON(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 "serviceDnsName":
			err = unpopulate(val, "ServiceDNSName", &r.ServiceDNSName)
			delete(rawMsg, key)
		case "serviceName":
			err = unpopulate(val, "ServiceName", &r.ServiceName)
			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 ResourceTypeEndpointFeaturesRule.
func (r ResourceTypeEndpointFeaturesRule) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "requiredFeaturesPolicy", r.RequiredFeaturesPolicy)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeEndpointFeaturesRule.
func (r *ResourceTypeEndpointFeaturesRule) UnmarshalJSON(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 "requiredFeaturesPolicy":
			err = unpopulate(val, "RequiredFeaturesPolicy", &r.RequiredFeaturesPolicy)
			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 ResourceTypeExtension.
func (r ResourceTypeExtension) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "endpointUri", r.EndpointURI)
	populate(objectMap, "extensionCategories", r.ExtensionCategories)
	populate(objectMap, "timeout", r.Timeout)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeExtension.
func (r *ResourceTypeExtension) UnmarshalJSON(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 "endpointUri":
			err = unpopulate(val, "EndpointURI", &r.EndpointURI)
			delete(rawMsg, key)
		case "extensionCategories":
			err = unpopulate(val, "ExtensionCategories", &r.ExtensionCategories)
			delete(rawMsg, key)
		case "timeout":
			err = unpopulate(val, "Timeout", &r.Timeout)
			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 ResourceTypeExtensionOptions.
func (r ResourceTypeExtensionOptions) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "resourceCreationBegin", r.ResourceCreationBegin)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeExtensionOptions.
func (r *ResourceTypeExtensionOptions) UnmarshalJSON(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 "resourceCreationBegin":
			err = unpopulate(val, "ResourceCreationBegin", &r.ResourceCreationBegin)
			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 ResourceTypeExtensionOptionsResourceCreationBegin.
func (r ResourceTypeExtensionOptionsResourceCreationBegin) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "request", r.Request)
	populate(objectMap, "response", r.Response)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeExtensionOptionsResourceCreationBegin.
func (r *ResourceTypeExtensionOptionsResourceCreationBegin) UnmarshalJSON(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 "request":
			err = unpopulate(val, "Request", &r.Request)
			delete(rawMsg, key)
		case "response":
			err = unpopulate(val, "Response", &r.Response)
			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 ResourceTypeFeaturesRule.
func (r ResourceTypeFeaturesRule) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "requiredFeaturesPolicy", r.RequiredFeaturesPolicy)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeFeaturesRule.
func (r *ResourceTypeFeaturesRule) UnmarshalJSON(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 "requiredFeaturesPolicy":
			err = unpopulate(val, "RequiredFeaturesPolicy", &r.RequiredFeaturesPolicy)
			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 ResourceTypeIdentityManagement.
func (r ResourceTypeIdentityManagement) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "type", r.Type)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeIdentityManagement.
func (r *ResourceTypeIdentityManagement) UnmarshalJSON(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 "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 ResourceTypeOnBehalfOfToken.
func (r ResourceTypeOnBehalfOfToken) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "actionName", r.ActionName)
	populate(objectMap, "lifeTime", r.LifeTime)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeOnBehalfOfToken.
func (r *ResourceTypeOnBehalfOfToken) UnmarshalJSON(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 "actionName":
			err = unpopulate(val, "ActionName", &r.ActionName)
			delete(rawMsg, key)
		case "lifeTime":
			err = unpopulate(val, "LifeTime", &r.LifeTime)
			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 ResourceTypeRegistration.
func (r ResourceTypeRegistration) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "id", r.ID)
	populate(objectMap, "kind", r.Kind)
	populate(objectMap, "name", r.Name)
	populate(objectMap, "properties", r.Properties)
	populate(objectMap, "systemData", r.SystemData)
	populate(objectMap, "type", r.Type)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistration.
func (r *ResourceTypeRegistration) UnmarshalJSON(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 "kind":
			err = unpopulate(val, "Kind", &r.Kind)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &r.Name)
			delete(rawMsg, key)
		case "properties":
			err = unpopulate(val, "Properties", &r.Properties)
			delete(rawMsg, key)
		case "systemData":
			err = unpopulate(val, "SystemData", &r.SystemData)
			delete(rawMsg, key)
		case "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 ResourceTypeRegistrationArrayResponseWithContinuation.
func (r ResourceTypeRegistrationArrayResponseWithContinuation) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "nextLink", r.NextLink)
	populate(objectMap, "value", r.Value)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationArrayResponseWithContinuation.
func (r *ResourceTypeRegistrationArrayResponseWithContinuation) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", r, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "nextLink":
			err = unpopulate(val, "NextLink", &r.NextLink)
			delete(rawMsg, key)
		case "value":
			err = unpopulate(val, "Value", &r.Value)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", r, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ResourceTypeRegistrationProperties.
func (r ResourceTypeRegistrationProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "apiProfiles", r.APIProfiles)
	populate(objectMap, "addResourceListTargetLocations", r.AddResourceListTargetLocations)
	populate(objectMap, "additionalOptions", r.AdditionalOptions)
	populate(objectMap, "allowEmptyRoleAssignments", r.AllowEmptyRoleAssignments)
	populate(objectMap, "allowedResourceNames", r.AllowedResourceNames)
	populate(objectMap, "allowedTemplateDeploymentReferenceActions", r.AllowedTemplateDeploymentReferenceActions)
	populate(objectMap, "allowedUnauthorizedActions", r.AllowedUnauthorizedActions)
	populate(objectMap, "allowedUnauthorizedActionsExtensions", r.AllowedUnauthorizedActionsExtensions)
	populate(objectMap, "asyncOperationResourceTypeName", r.AsyncOperationResourceTypeName)
	populate(objectMap, "asyncTimeoutRules", r.AsyncTimeoutRules)
	populate(objectMap, "authorizationActionMappings", r.AuthorizationActionMappings)
	populate(objectMap, "availabilityZoneRule", r.AvailabilityZoneRule)
	populate(objectMap, "capacityRule", r.CapacityRule)
	populate(objectMap, "category", r.Category)
	populate(objectMap, "checkNameAvailabilitySpecifications", r.CheckNameAvailabilitySpecifications)
	populate(objectMap, "commonApiVersions", r.CommonAPIVersions)
	populate(objectMap, "crossTenantTokenValidation", r.CrossTenantTokenValidation)
	populate(objectMap, "defaultApiVersion", r.DefaultAPIVersion)
	populate(objectMap, "disallowedActionVerbs", r.DisallowedActionVerbs)
	populate(objectMap, "disallowedEndUserOperations", r.DisallowedEndUserOperations)
	populate(objectMap, "dstsConfiguration", r.DstsConfiguration)
	populate(objectMap, "enableAsyncOperation", r.EnableAsyncOperation)
	populate(objectMap, "enableThirdPartyS2S", r.EnableThirdPartyS2S)
	populate(objectMap, "endpoints", r.Endpoints)
	populate(objectMap, "extendedLocations", r.ExtendedLocations)
	populate(objectMap, "extensionOptions", r.ExtensionOptions)
	populate(objectMap, "featuresRule", r.FeaturesRule)
	populate(objectMap, "frontdoorRequestMode", r.FrontdoorRequestMode)
	populate(objectMap, "groupingTag", r.GroupingTag)
	populate(objectMap, "identityManagement", r.IdentityManagement)
	populate(objectMap, "isPureProxy", r.IsPureProxy)
	populate(objectMap, "legacyName", r.LegacyName)
	populate(objectMap, "legacyNames", r.LegacyNames)
	populate(objectMap, "legacyPolicy", r.LegacyPolicy)
	populate(objectMap, "linkedAccessChecks", r.LinkedAccessChecks)
	populate(objectMap, "linkedNotificationRules", r.LinkedNotificationRules)
	populate(objectMap, "linkedOperationRules", r.LinkedOperationRules)
	populate(objectMap, "loggingRules", r.LoggingRules)
	populate(objectMap, "management", r.Management)
	populate(objectMap, "manifestLink", r.ManifestLink)
	populate(objectMap, "marketplaceOptions", r.MarketplaceOptions)
	populate(objectMap, "marketplaceType", r.MarketplaceType)
	populate(objectMap, "metadata", r.Metadata)
	populate(objectMap, "notifications", r.Notifications)
	populate(objectMap, "onBehalfOfTokens", r.OnBehalfOfTokens)
	populate(objectMap, "openApiConfiguration", r.OpenAPIConfiguration)
	populate(objectMap, "policyExecutionType", r.PolicyExecutionType)
	populate(objectMap, "provisioningState", r.ProvisioningState)
	populate(objectMap, "quotaRule", r.QuotaRule)
	populate(objectMap, "regionality", r.Regionality)
	populate(objectMap, "requestHeaderOptions", r.RequestHeaderOptions)
	populate(objectMap, "requiredFeatures", r.RequiredFeatures)
	populate(objectMap, "resourceCache", r.ResourceCache)
	populate(objectMap, "resourceConcurrencyControlOptions", r.ResourceConcurrencyControlOptions)
	populate(objectMap, "resourceDeletionPolicy", r.ResourceDeletionPolicy)
	populate(objectMap, "resourceGraphConfiguration", r.ResourceGraphConfiguration)
	populate(objectMap, "resourceManagementOptions", r.ResourceManagementOptions)
	populate(objectMap, "resourceMovePolicy", r.ResourceMovePolicy)
	populate(objectMap, "resourceProviderAuthorizationRules", r.ResourceProviderAuthorizationRules)
	populate(objectMap, "resourceQueryManagement", r.ResourceQueryManagement)
	populate(objectMap, "resourceSubType", r.ResourceSubType)
	populate(objectMap, "resourceTypeCommonAttributeManagement", r.ResourceTypeCommonAttributeManagement)
	populate(objectMap, "resourceValidation", r.ResourceValidation)
	populate(objectMap, "routingRule", r.RoutingRule)
	populate(objectMap, "routingType", r.RoutingType)
	populate(objectMap, "skuLink", r.SKULink)
	populate(objectMap, "serviceTreeInfos", r.ServiceTreeInfos)
	populate(objectMap, "subscriptionLifecycleNotificationSpecifications", r.SubscriptionLifecycleNotificationSpecifications)
	populate(objectMap, "subscriptionStateRules", r.SubscriptionStateRules)
	populate(objectMap, "supportsTags", r.SupportsTags)
	populate(objectMap, "swaggerSpecifications", r.SwaggerSpecifications)
	populate(objectMap, "templateDeploymentOptions", r.TemplateDeploymentOptions)
	populate(objectMap, "templateDeploymentPolicy", r.TemplateDeploymentPolicy)
	populate(objectMap, "throttlingRules", r.ThrottlingRules)
	populate(objectMap, "tokenAuthConfiguration", r.TokenAuthConfiguration)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationProperties.
func (r *ResourceTypeRegistrationProperties) UnmarshalJSON(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 "apiProfiles":
			err = unpopulate(val, "APIProfiles", &r.APIProfiles)
			delete(rawMsg, key)
		case "addResourceListTargetLocations":
			err = unpopulate(val, "AddResourceListTargetLocations", &r.AddResourceListTargetLocations)
			delete(rawMsg, key)
		case "additionalOptions":
			err = unpopulate(val, "AdditionalOptions", &r.AdditionalOptions)
			delete(rawMsg, key)
		case "allowEmptyRoleAssignments":
			err = unpopulate(val, "AllowEmptyRoleAssignments", &r.AllowEmptyRoleAssignments)
			delete(rawMsg, key)
		case "allowedResourceNames":
			err = unpopulate(val, "AllowedResourceNames", &r.AllowedResourceNames)
			delete(rawMsg, key)
		case "allowedTemplateDeploymentReferenceActions":
			err = unpopulate(val, "AllowedTemplateDeploymentReferenceActions", &r.AllowedTemplateDeploymentReferenceActions)
			delete(rawMsg, key)
		case "allowedUnauthorizedActions":
			err = unpopulate(val, "AllowedUnauthorizedActions", &r.AllowedUnauthorizedActions)
			delete(rawMsg, key)
		case "allowedUnauthorizedActionsExtensions":
			err = unpopulate(val, "AllowedUnauthorizedActionsExtensions", &r.AllowedUnauthorizedActionsExtensions)
			delete(rawMsg, key)
		case "asyncOperationResourceTypeName":
			err = unpopulate(val, "AsyncOperationResourceTypeName", &r.AsyncOperationResourceTypeName)
			delete(rawMsg, key)
		case "asyncTimeoutRules":
			err = unpopulate(val, "AsyncTimeoutRules", &r.AsyncTimeoutRules)
			delete(rawMsg, key)
		case "authorizationActionMappings":
			err = unpopulate(val, "AuthorizationActionMappings", &r.AuthorizationActionMappings)
			delete(rawMsg, key)
		case "availabilityZoneRule":
			err = unpopulate(val, "AvailabilityZoneRule", &r.AvailabilityZoneRule)
			delete(rawMsg, key)
		case "capacityRule":
			err = unpopulate(val, "CapacityRule", &r.CapacityRule)
			delete(rawMsg, key)
		case "category":
			err = unpopulate(val, "Category", &r.Category)
			delete(rawMsg, key)
		case "checkNameAvailabilitySpecifications":
			err = unpopulate(val, "CheckNameAvailabilitySpecifications", &r.CheckNameAvailabilitySpecifications)
			delete(rawMsg, key)
		case "commonApiVersions":
			err = unpopulate(val, "CommonAPIVersions", &r.CommonAPIVersions)
			delete(rawMsg, key)
		case "crossTenantTokenValidation":
			err = unpopulate(val, "CrossTenantTokenValidation", &r.CrossTenantTokenValidation)
			delete(rawMsg, key)
		case "defaultApiVersion":
			err = unpopulate(val, "DefaultAPIVersion", &r.DefaultAPIVersion)
			delete(rawMsg, key)
		case "disallowedActionVerbs":
			err = unpopulate(val, "DisallowedActionVerbs", &r.DisallowedActionVerbs)
			delete(rawMsg, key)
		case "disallowedEndUserOperations":
			err = unpopulate(val, "DisallowedEndUserOperations", &r.DisallowedEndUserOperations)
			delete(rawMsg, key)
		case "dstsConfiguration":
			err = unpopulate(val, "DstsConfiguration", &r.DstsConfiguration)
			delete(rawMsg, key)
		case "enableAsyncOperation":
			err = unpopulate(val, "EnableAsyncOperation", &r.EnableAsyncOperation)
			delete(rawMsg, key)
		case "enableThirdPartyS2S":
			err = unpopulate(val, "EnableThirdPartyS2S", &r.EnableThirdPartyS2S)
			delete(rawMsg, key)
		case "endpoints":
			err = unpopulate(val, "Endpoints", &r.Endpoints)
			delete(rawMsg, key)
		case "extendedLocations":
			err = unpopulate(val, "ExtendedLocations", &r.ExtendedLocations)
			delete(rawMsg, key)
		case "extensionOptions":
			err = unpopulate(val, "ExtensionOptions", &r.ExtensionOptions)
			delete(rawMsg, key)
		case "featuresRule":
			err = unpopulate(val, "FeaturesRule", &r.FeaturesRule)
			delete(rawMsg, key)
		case "frontdoorRequestMode":
			err = unpopulate(val, "FrontdoorRequestMode", &r.FrontdoorRequestMode)
			delete(rawMsg, key)
		case "groupingTag":
			err = unpopulate(val, "GroupingTag", &r.GroupingTag)
			delete(rawMsg, key)
		case "identityManagement":
			err = unpopulate(val, "IdentityManagement", &r.IdentityManagement)
			delete(rawMsg, key)
		case "isPureProxy":
			err = unpopulate(val, "IsPureProxy", &r.IsPureProxy)
			delete(rawMsg, key)
		case "legacyName":
			err = unpopulate(val, "LegacyName", &r.LegacyName)
			delete(rawMsg, key)
		case "legacyNames":
			err = unpopulate(val, "LegacyNames", &r.LegacyNames)
			delete(rawMsg, key)
		case "legacyPolicy":
			err = unpopulate(val, "LegacyPolicy", &r.LegacyPolicy)
			delete(rawMsg, key)
		case "linkedAccessChecks":
			err = unpopulate(val, "LinkedAccessChecks", &r.LinkedAccessChecks)
			delete(rawMsg, key)
		case "linkedNotificationRules":
			err = unpopulate(val, "LinkedNotificationRules", &r.LinkedNotificationRules)
			delete(rawMsg, key)
		case "linkedOperationRules":
			err = unpopulate(val, "LinkedOperationRules", &r.LinkedOperationRules)
			delete(rawMsg, key)
		case "loggingRules":
			err = unpopulate(val, "LoggingRules", &r.LoggingRules)
			delete(rawMsg, key)
		case "management":
			err = unpopulate(val, "Management", &r.Management)
			delete(rawMsg, key)
		case "manifestLink":
			err = unpopulate(val, "ManifestLink", &r.ManifestLink)
			delete(rawMsg, key)
		case "marketplaceOptions":
			err = unpopulate(val, "MarketplaceOptions", &r.MarketplaceOptions)
			delete(rawMsg, key)
		case "marketplaceType":
			err = unpopulate(val, "MarketplaceType", &r.MarketplaceType)
			delete(rawMsg, key)
		case "metadata":
			err = unpopulate(val, "Metadata", &r.Metadata)
			delete(rawMsg, key)
		case "notifications":
			err = unpopulate(val, "Notifications", &r.Notifications)
			delete(rawMsg, key)
		case "onBehalfOfTokens":
			err = unpopulate(val, "OnBehalfOfTokens", &r.OnBehalfOfTokens)
			delete(rawMsg, key)
		case "openApiConfiguration":
			err = unpopulate(val, "OpenAPIConfiguration", &r.OpenAPIConfiguration)
			delete(rawMsg, key)
		case "policyExecutionType":
			err = unpopulate(val, "PolicyExecutionType", &r.PolicyExecutionType)
			delete(rawMsg, key)
		case "provisioningState":
			err = unpopulate(val, "ProvisioningState", &r.ProvisioningState)
			delete(rawMsg, key)
		case "quotaRule":
			err = unpopulate(val, "QuotaRule", &r.QuotaRule)
			delete(rawMsg, key)
		case "regionality":
			err = unpopulate(val, "Regionality", &r.Regionality)
			delete(rawMsg, key)
		case "requestHeaderOptions":
			err = unpopulate(val, "RequestHeaderOptions", &r.RequestHeaderOptions)
			delete(rawMsg, key)
		case "requiredFeatures":
			err = unpopulate(val, "RequiredFeatures", &r.RequiredFeatures)
			delete(rawMsg, key)
		case "resourceCache":
			err = unpopulate(val, "ResourceCache", &r.ResourceCache)
			delete(rawMsg, key)
		case "resourceConcurrencyControlOptions":
			err = unpopulate(val, "ResourceConcurrencyControlOptions", &r.ResourceConcurrencyControlOptions)
			delete(rawMsg, key)
		case "resourceDeletionPolicy":
			err = unpopulate(val, "ResourceDeletionPolicy", &r.ResourceDeletionPolicy)
			delete(rawMsg, key)
		case "resourceGraphConfiguration":
			err = unpopulate(val, "ResourceGraphConfiguration", &r.ResourceGraphConfiguration)
			delete(rawMsg, key)
		case "resourceManagementOptions":
			err = unpopulate(val, "ResourceManagementOptions", &r.ResourceManagementOptions)
			delete(rawMsg, key)
		case "resourceMovePolicy":
			err = unpopulate(val, "ResourceMovePolicy", &r.ResourceMovePolicy)
			delete(rawMsg, key)
		case "resourceProviderAuthorizationRules":
			err = unpopulate(val, "ResourceProviderAuthorizationRules", &r.ResourceProviderAuthorizationRules)
			delete(rawMsg, key)
		case "resourceQueryManagement":
			err = unpopulate(val, "ResourceQueryManagement", &r.ResourceQueryManagement)
			delete(rawMsg, key)
		case "resourceSubType":
			err = unpopulate(val, "ResourceSubType", &r.ResourceSubType)
			delete(rawMsg, key)
		case "resourceTypeCommonAttributeManagement":
			err = unpopulate(val, "ResourceTypeCommonAttributeManagement", &r.ResourceTypeCommonAttributeManagement)
			delete(rawMsg, key)
		case "resourceValidation":
			err = unpopulate(val, "ResourceValidation", &r.ResourceValidation)
			delete(rawMsg, key)
		case "routingRule":
			err = unpopulate(val, "RoutingRule", &r.RoutingRule)
			delete(rawMsg, key)
		case "routingType":
			err = unpopulate(val, "RoutingType", &r.RoutingType)
			delete(rawMsg, key)
		case "skuLink":
			err = unpopulate(val, "SKULink", &r.SKULink)
			delete(rawMsg, key)
		case "serviceTreeInfos":
			err = unpopulate(val, "ServiceTreeInfos", &r.ServiceTreeInfos)
			delete(rawMsg, key)
		case "subscriptionLifecycleNotificationSpecifications":
			err = unpopulate(val, "SubscriptionLifecycleNotificationSpecifications", &r.SubscriptionLifecycleNotificationSpecifications)
			delete(rawMsg, key)
		case "subscriptionStateRules":
			err = unpopulate(val, "SubscriptionStateRules", &r.SubscriptionStateRules)
			delete(rawMsg, key)
		case "supportsTags":
			err = unpopulate(val, "SupportsTags", &r.SupportsTags)
			delete(rawMsg, key)
		case "swaggerSpecifications":
			err = unpopulate(val, "SwaggerSpecifications", &r.SwaggerSpecifications)
			delete(rawMsg, key)
		case "templateDeploymentOptions":
			err = unpopulate(val, "TemplateDeploymentOptions", &r.TemplateDeploymentOptions)
			delete(rawMsg, key)
		case "templateDeploymentPolicy":
			err = unpopulate(val, "TemplateDeploymentPolicy", &r.TemplateDeploymentPolicy)
			delete(rawMsg, key)
		case "throttlingRules":
			err = unpopulate(val, "ThrottlingRules", &r.ThrottlingRules)
			delete(rawMsg, key)
		case "tokenAuthConfiguration":
			err = unpopulate(val, "TokenAuthConfiguration", &r.TokenAuthConfiguration)
			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 ResourceTypeRegistrationPropertiesAvailabilityZoneRule.
func (r ResourceTypeRegistrationPropertiesAvailabilityZoneRule) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "availabilityZonePolicy", r.AvailabilityZonePolicy)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationPropertiesAvailabilityZoneRule.
func (r *ResourceTypeRegistrationPropertiesAvailabilityZoneRule) UnmarshalJSON(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 "availabilityZonePolicy":
			err = unpopulate(val, "AvailabilityZonePolicy", &r.AvailabilityZonePolicy)
			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 ResourceTypeRegistrationPropertiesCapacityRule.
func (r ResourceTypeRegistrationPropertiesCapacityRule) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "capacityPolicy", r.CapacityPolicy)
	populate(objectMap, "skuAlias", r.SKUAlias)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationPropertiesCapacityRule.
func (r *ResourceTypeRegistrationPropertiesCapacityRule) UnmarshalJSON(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 "capacityPolicy":
			err = unpopulate(val, "CapacityPolicy", &r.CapacityPolicy)
			delete(rawMsg, key)
		case "skuAlias":
			err = unpopulate(val, "SKUAlias", &r.SKUAlias)
			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 ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications.
func (r ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "enableDefaultValidation", r.EnableDefaultValidation)
	populate(objectMap, "resourceTypesWithCustomValidation", r.ResourceTypesWithCustomValidation)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications.
func (r *ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications) UnmarshalJSON(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 "enableDefaultValidation":
			err = unpopulate(val, "EnableDefaultValidation", &r.EnableDefaultValidation)
			delete(rawMsg, key)
		case "resourceTypesWithCustomValidation":
			err = unpopulate(val, "ResourceTypesWithCustomValidation", &r.ResourceTypesWithCustomValidation)
			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 ResourceTypeRegistrationPropertiesDstsConfiguration.
func (r ResourceTypeRegistrationPropertiesDstsConfiguration) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "serviceDnsName", r.ServiceDNSName)
	populate(objectMap, "serviceName", r.ServiceName)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationPropertiesDstsConfiguration.
func (r *ResourceTypeRegistrationPropertiesDstsConfiguration) UnmarshalJSON(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 "serviceDnsName":
			err = unpopulate(val, "ServiceDNSName", &r.ServiceDNSName)
			delete(rawMsg, key)
		case "serviceName":
			err = unpopulate(val, "ServiceName", &r.ServiceName)
			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 ResourceTypeRegistrationPropertiesExtensionOptions.
func (r ResourceTypeRegistrationPropertiesExtensionOptions) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "resourceCreationBegin", r.ResourceCreationBegin)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationPropertiesExtensionOptions.
func (r *ResourceTypeRegistrationPropertiesExtensionOptions) UnmarshalJSON(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 "resourceCreationBegin":
			err = unpopulate(val, "ResourceCreationBegin", &r.ResourceCreationBegin)
			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 ResourceTypeRegistrationPropertiesFeaturesRule.
func (r ResourceTypeRegistrationPropertiesFeaturesRule) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "requiredFeaturesPolicy", r.RequiredFeaturesPolicy)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationPropertiesFeaturesRule.
func (r *ResourceTypeRegistrationPropertiesFeaturesRule) UnmarshalJSON(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 "requiredFeaturesPolicy":
			err = unpopulate(val, "RequiredFeaturesPolicy", &r.RequiredFeaturesPolicy)
			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 ResourceTypeRegistrationPropertiesIdentityManagement.
func (r ResourceTypeRegistrationPropertiesIdentityManagement) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "applicationId", r.ApplicationID)
	populate(objectMap, "applicationIds", r.ApplicationIDs)
	populate(objectMap, "delegationAppIds", r.DelegationAppIDs)
	populate(objectMap, "type", r.Type)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationPropertiesIdentityManagement.
func (r *ResourceTypeRegistrationPropertiesIdentityManagement) UnmarshalJSON(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 "applicationId":
			err = unpopulate(val, "ApplicationID", &r.ApplicationID)
			delete(rawMsg, key)
		case "applicationIds":
			err = unpopulate(val, "ApplicationIDs", &r.ApplicationIDs)
			delete(rawMsg, key)
		case "delegationAppIds":
			err = unpopulate(val, "DelegationAppIDs", &r.DelegationAppIDs)
			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 ResourceTypeRegistrationPropertiesLegacyPolicy.
func (r ResourceTypeRegistrationPropertiesLegacyPolicy) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "disallowedConditions", r.DisallowedConditions)
	populate(objectMap, "disallowedLegacyOperations", r.DisallowedLegacyOperations)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationPropertiesLegacyPolicy.
func (r *ResourceTypeRegistrationPropertiesLegacyPolicy) UnmarshalJSON(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 "disallowedConditions":
			err = unpopulate(val, "DisallowedConditions", &r.DisallowedConditions)
			delete(rawMsg, key)
		case "disallowedLegacyOperations":
			err = unpopulate(val, "DisallowedLegacyOperations", &r.DisallowedLegacyOperations)
			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 ResourceTypeRegistrationPropertiesManagement.
func (r ResourceTypeRegistrationPropertiesManagement) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "authorizationOwners", r.AuthorizationOwners)
	populate(objectMap, "canaryManifestOwners", r.CanaryManifestOwners)
	populate(objectMap, "errorResponseMessageOptions", r.ErrorResponseMessageOptions)
	populate(objectMap, "expeditedRolloutMetadata", r.ExpeditedRolloutMetadata)
	populate(objectMap, "expeditedRolloutSubmitters", r.ExpeditedRolloutSubmitters)
	populate(objectMap, "incidentContactEmail", r.IncidentContactEmail)
	populate(objectMap, "incidentRoutingService", r.IncidentRoutingService)
	populate(objectMap, "incidentRoutingTeam", r.IncidentRoutingTeam)
	populate(objectMap, "manifestOwners", r.ManifestOwners)
	populate(objectMap, "pcCode", r.PcCode)
	populate(objectMap, "profitCenterProgramId", r.ProfitCenterProgramID)
	populate(objectMap, "resourceAccessPolicy", r.ResourceAccessPolicy)
	populate(objectMap, "resourceAccessRoles", r.ResourceAccessRoles)
	populate(objectMap, "schemaOwners", r.SchemaOwners)
	populate(objectMap, "serviceTreeInfos", r.ServiceTreeInfos)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationPropertiesManagement.
func (r *ResourceTypeRegistrationPropertiesManagement) UnmarshalJSON(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 "authorizationOwners":
			err = unpopulate(val, "AuthorizationOwners", &r.AuthorizationOwners)
			delete(rawMsg, key)
		case "canaryManifestOwners":
			err = unpopulate(val, "CanaryManifestOwners", &r.CanaryManifestOwners)
			delete(rawMsg, key)
		case "errorResponseMessageOptions":
			err = unpopulate(val, "ErrorResponseMessageOptions", &r.ErrorResponseMessageOptions)
			delete(rawMsg, key)
		case "expeditedRolloutMetadata":
			err = unpopulate(val, "ExpeditedRolloutMetadata", &r.ExpeditedRolloutMetadata)
			delete(rawMsg, key)
		case "expeditedRolloutSubmitters":
			err = unpopulate(val, "ExpeditedRolloutSubmitters", &r.ExpeditedRolloutSubmitters)
			delete(rawMsg, key)
		case "incidentContactEmail":
			err = unpopulate(val, "IncidentContactEmail", &r.IncidentContactEmail)
			delete(rawMsg, key)
		case "incidentRoutingService":
			err = unpopulate(val, "IncidentRoutingService", &r.IncidentRoutingService)
			delete(rawMsg, key)
		case "incidentRoutingTeam":
			err = unpopulate(val, "IncidentRoutingTeam", &r.IncidentRoutingTeam)
			delete(rawMsg, key)
		case "manifestOwners":
			err = unpopulate(val, "ManifestOwners", &r.ManifestOwners)
			delete(rawMsg, key)
		case "pcCode":
			err = unpopulate(val, "PcCode", &r.PcCode)
			delete(rawMsg, key)
		case "profitCenterProgramId":
			err = unpopulate(val, "ProfitCenterProgramID", &r.ProfitCenterProgramID)
			delete(rawMsg, key)
		case "resourceAccessPolicy":
			err = unpopulate(val, "ResourceAccessPolicy", &r.ResourceAccessPolicy)
			delete(rawMsg, key)
		case "resourceAccessRoles":
			err = unpopulate(val, "ResourceAccessRoles", &r.ResourceAccessRoles)
			delete(rawMsg, key)
		case "schemaOwners":
			err = unpopulate(val, "SchemaOwners", &r.SchemaOwners)
			delete(rawMsg, key)
		case "serviceTreeInfos":
			err = unpopulate(val, "ServiceTreeInfos", &r.ServiceTreeInfos)
			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 ResourceTypeRegistrationPropertiesMarketplaceOptions.
func (r ResourceTypeRegistrationPropertiesMarketplaceOptions) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "addOnPlanConversionAllowed", r.AddOnPlanConversionAllowed)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationPropertiesMarketplaceOptions.
func (r *ResourceTypeRegistrationPropertiesMarketplaceOptions) UnmarshalJSON(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 "addOnPlanConversionAllowed":
			err = unpopulate(val, "AddOnPlanConversionAllowed", &r.AddOnPlanConversionAllowed)
			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 ResourceTypeRegistrationPropertiesRequestHeaderOptions.
func (r ResourceTypeRegistrationPropertiesRequestHeaderOptions) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "optInHeaders", r.OptInHeaders)
	populate(objectMap, "optOutHeaders", r.OptOutHeaders)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationPropertiesRequestHeaderOptions.
func (r *ResourceTypeRegistrationPropertiesRequestHeaderOptions) UnmarshalJSON(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 "optInHeaders":
			err = unpopulate(val, "OptInHeaders", &r.OptInHeaders)
			delete(rawMsg, key)
		case "optOutHeaders":
			err = unpopulate(val, "OptOutHeaders", &r.OptOutHeaders)
			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 ResourceTypeRegistrationPropertiesResourceCache.
func (r ResourceTypeRegistrationPropertiesResourceCache) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "enableResourceCache", r.EnableResourceCache)
	populate(objectMap, "resourceCacheExpirationTimespan", r.ResourceCacheExpirationTimespan)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationPropertiesResourceCache.
func (r *ResourceTypeRegistrationPropertiesResourceCache) UnmarshalJSON(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 "enableResourceCache":
			err = unpopulate(val, "EnableResourceCache", &r.EnableResourceCache)
			delete(rawMsg, key)
		case "resourceCacheExpirationTimespan":
			err = unpopulate(val, "ResourceCacheExpirationTimespan", &r.ResourceCacheExpirationTimespan)
			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 ResourceTypeRegistrationPropertiesResourceGraphConfiguration.
func (r ResourceTypeRegistrationPropertiesResourceGraphConfiguration) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "apiVersion", r.APIVersion)
	populate(objectMap, "enabled", r.Enabled)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationPropertiesResourceGraphConfiguration.
func (r *ResourceTypeRegistrationPropertiesResourceGraphConfiguration) UnmarshalJSON(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 "apiVersion":
			err = unpopulate(val, "APIVersion", &r.APIVersion)
			delete(rawMsg, key)
		case "enabled":
			err = unpopulate(val, "Enabled", &r.Enabled)
			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 ResourceTypeRegistrationPropertiesResourceManagementOptions.
func (r ResourceTypeRegistrationPropertiesResourceManagementOptions) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "batchProvisioningSupport", r.BatchProvisioningSupport)
	populate(objectMap, "deleteDependencies", r.DeleteDependencies)
	populate(objectMap, "nestedProvisioningSupport", r.NestedProvisioningSupport)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationPropertiesResourceManagementOptions.
func (r *ResourceTypeRegistrationPropertiesResourceManagementOptions) UnmarshalJSON(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 "batchProvisioningSupport":
			err = unpopulate(val, "BatchProvisioningSupport", &r.BatchProvisioningSupport)
			delete(rawMsg, key)
		case "deleteDependencies":
			err = unpopulate(val, "DeleteDependencies", &r.DeleteDependencies)
			delete(rawMsg, key)
		case "nestedProvisioningSupport":
			err = unpopulate(val, "NestedProvisioningSupport", &r.NestedProvisioningSupport)
			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 ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport.
func (r ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "supportedOperations", r.SupportedOperations)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport.
func (r *ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport) UnmarshalJSON(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 "supportedOperations":
			err = unpopulate(val, "SupportedOperations", &r.SupportedOperations)
			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 ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport.
func (r ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "minimumApiVersion", r.MinimumAPIVersion)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport.
func (r *ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport) UnmarshalJSON(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 "minimumApiVersion":
			err = unpopulate(val, "MinimumAPIVersion", &r.MinimumAPIVersion)
			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 ResourceTypeRegistrationPropertiesResourceMovePolicy.
func (r ResourceTypeRegistrationPropertiesResourceMovePolicy) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "crossResourceGroupMoveEnabled", r.CrossResourceGroupMoveEnabled)
	populate(objectMap, "crossSubscriptionMoveEnabled", r.CrossSubscriptionMoveEnabled)
	populate(objectMap, "validationRequired", r.ValidationRequired)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationPropertiesResourceMovePolicy.
func (r *ResourceTypeRegistrationPropertiesResourceMovePolicy) UnmarshalJSON(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 "crossResourceGroupMoveEnabled":
			err = unpopulate(val, "CrossResourceGroupMoveEnabled", &r.CrossResourceGroupMoveEnabled)
			delete(rawMsg, key)
		case "crossSubscriptionMoveEnabled":
			err = unpopulate(val, "CrossSubscriptionMoveEnabled", &r.CrossSubscriptionMoveEnabled)
			delete(rawMsg, key)
		case "validationRequired":
			err = unpopulate(val, "ValidationRequired", &r.ValidationRequired)
			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 ResourceTypeRegistrationPropertiesResourceQueryManagement.
func (r ResourceTypeRegistrationPropertiesResourceQueryManagement) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "filterOption", r.FilterOption)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationPropertiesResourceQueryManagement.
func (r *ResourceTypeRegistrationPropertiesResourceQueryManagement) UnmarshalJSON(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 "filterOption":
			err = unpopulate(val, "FilterOption", &r.FilterOption)
			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 ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement.
func (r ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "commonApiVersionsMergeMode", r.CommonAPIVersionsMergeMode)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement.
func (r *ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement) UnmarshalJSON(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 "commonApiVersionsMergeMode":
			err = unpopulate(val, "CommonAPIVersionsMergeMode", &r.CommonAPIVersionsMergeMode)
			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 ResourceTypeRegistrationPropertiesRoutingRule.
func (r ResourceTypeRegistrationPropertiesRoutingRule) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "hostResourceType", r.HostResourceType)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationPropertiesRoutingRule.
func (r *ResourceTypeRegistrationPropertiesRoutingRule) UnmarshalJSON(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 "hostResourceType":
			err = unpopulate(val, "HostResourceType", &r.HostResourceType)
			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 ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications.
func (r ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "softDeleteTTL", r.SoftDeleteTTL)
	populate(objectMap, "subscriptionStateOverrideActions", r.SubscriptionStateOverrideActions)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications.
func (r *ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications) UnmarshalJSON(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 "softDeleteTTL":
			err = unpopulate(val, "SoftDeleteTTL", &r.SoftDeleteTTL)
			delete(rawMsg, key)
		case "subscriptionStateOverrideActions":
			err = unpopulate(val, "SubscriptionStateOverrideActions", &r.SubscriptionStateOverrideActions)
			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 ResourceTypeRegistrationPropertiesTemplateDeploymentOptions.
func (r ResourceTypeRegistrationPropertiesTemplateDeploymentOptions) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "preflightOptions", r.PreflightOptions)
	populate(objectMap, "preflightSupported", r.PreflightSupported)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationPropertiesTemplateDeploymentOptions.
func (r *ResourceTypeRegistrationPropertiesTemplateDeploymentOptions) UnmarshalJSON(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 "preflightOptions":
			err = unpopulate(val, "PreflightOptions", &r.PreflightOptions)
			delete(rawMsg, key)
		case "preflightSupported":
			err = unpopulate(val, "PreflightSupported", &r.PreflightSupported)
			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 ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy.
func (r ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "capabilities", r.Capabilities)
	populate(objectMap, "preflightNotifications", r.PreflightNotifications)
	populate(objectMap, "preflightOptions", r.PreflightOptions)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy.
func (r *ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy) UnmarshalJSON(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 "capabilities":
			err = unpopulate(val, "Capabilities", &r.Capabilities)
			delete(rawMsg, key)
		case "preflightNotifications":
			err = unpopulate(val, "PreflightNotifications", &r.PreflightNotifications)
			delete(rawMsg, key)
		case "preflightOptions":
			err = unpopulate(val, "PreflightOptions", &r.PreflightOptions)
			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 ResourceTypeRequestHeaderOptions.
func (r ResourceTypeRequestHeaderOptions) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "optInHeaders", r.OptInHeaders)
	populate(objectMap, "optOutHeaders", r.OptOutHeaders)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeRequestHeaderOptions.
func (r *ResourceTypeRequestHeaderOptions) UnmarshalJSON(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 "optInHeaders":
			err = unpopulate(val, "OptInHeaders", &r.OptInHeaders)
			delete(rawMsg, key)
		case "optOutHeaders":
			err = unpopulate(val, "OptOutHeaders", &r.OptOutHeaders)
			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 ResourceTypeSKU.
func (r ResourceTypeSKU) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "provisioningState", r.ProvisioningState)
	populate(objectMap, "skuSettings", r.SKUSettings)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeSKU.
func (r *ResourceTypeSKU) UnmarshalJSON(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 "provisioningState":
			err = unpopulate(val, "ProvisioningState", &r.ProvisioningState)
			delete(rawMsg, key)
		case "skuSettings":
			err = unpopulate(val, "SKUSettings", &r.SKUSettings)
			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 ResourceTypeTemplateDeploymentPolicy.
func (r ResourceTypeTemplateDeploymentPolicy) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "capabilities", r.Capabilities)
	populate(objectMap, "preflightNotifications", r.PreflightNotifications)
	populate(objectMap, "preflightOptions", r.PreflightOptions)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeTemplateDeploymentPolicy.
func (r *ResourceTypeTemplateDeploymentPolicy) UnmarshalJSON(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 "capabilities":
			err = unpopulate(val, "Capabilities", &r.Capabilities)
			delete(rawMsg, key)
		case "preflightNotifications":
			err = unpopulate(val, "PreflightNotifications", &r.PreflightNotifications)
			delete(rawMsg, key)
		case "preflightOptions":
			err = unpopulate(val, "PreflightOptions", &r.PreflightOptions)
			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 RolloutStatusBase.
func (r RolloutStatusBase) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "completedRegions", r.CompletedRegions)
	populate(objectMap, "failedOrSkippedRegions", r.FailedOrSkippedRegions)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type RolloutStatusBase.
func (r *RolloutStatusBase) UnmarshalJSON(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 "completedRegions":
			err = unpopulate(val, "CompletedRegions", &r.CompletedRegions)
			delete(rawMsg, key)
		case "failedOrSkippedRegions":
			err = unpopulate(val, "FailedOrSkippedRegions", &r.FailedOrSkippedRegions)
			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 SKUCapability.
func (s SKUCapability) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "name", s.Name)
	populate(objectMap, "value", s.Value)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapability.
func (s *SKUCapability) UnmarshalJSON(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 "name":
			err = unpopulate(val, "Name", &s.Name)
			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 SKUCapacity.
func (s SKUCapacity) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "default", s.Default)
	populate(objectMap, "maximum", s.Maximum)
	populate(objectMap, "minimum", s.Minimum)
	populate(objectMap, "scaleType", s.ScaleType)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapacity.
func (s *SKUCapacity) UnmarshalJSON(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 "default":
			err = unpopulate(val, "Default", &s.Default)
			delete(rawMsg, key)
		case "maximum":
			err = unpopulate(val, "Maximum", &s.Maximum)
			delete(rawMsg, key)
		case "minimum":
			err = unpopulate(val, "Minimum", &s.Minimum)
			delete(rawMsg, key)
		case "scaleType":
			err = unpopulate(val, "ScaleType", &s.ScaleType)
			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 SKUCost.
func (s SKUCost) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "extendedUnit", s.ExtendedUnit)
	populate(objectMap, "meterId", s.MeterID)
	populate(objectMap, "quantity", s.Quantity)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type SKUCost.
func (s *SKUCost) UnmarshalJSON(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 "extendedUnit":
			err = unpopulate(val, "ExtendedUnit", &s.ExtendedUnit)
			delete(rawMsg, key)
		case "meterId":
			err = unpopulate(val, "MeterID", &s.MeterID)
			delete(rawMsg, key)
		case "quantity":
			err = unpopulate(val, "Quantity", &s.Quantity)
			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 SKULocationInfo.
func (s SKULocationInfo) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "extendedLocations", s.ExtendedLocations)
	populate(objectMap, "location", s.Location)
	populate(objectMap, "type", s.Type)
	populate(objectMap, "zoneDetails", s.ZoneDetails)
	populate(objectMap, "zones", s.Zones)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type SKULocationInfo.
func (s *SKULocationInfo) UnmarshalJSON(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 "extendedLocations":
			err = unpopulate(val, "ExtendedLocations", &s.ExtendedLocations)
			delete(rawMsg, key)
		case "location":
			err = unpopulate(val, "Location", &s.Location)
			delete(rawMsg, key)
		case "type":
			err = unpopulate(val, "Type", &s.Type)
			delete(rawMsg, key)
		case "zoneDetails":
			err = unpopulate(val, "ZoneDetails", &s.ZoneDetails)
			delete(rawMsg, key)
		case "zones":
			err = unpopulate(val, "Zones", &s.Zones)
			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 SKUResource.
func (s SKUResource) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "id", s.ID)
	populate(objectMap, "name", s.Name)
	populate(objectMap, "properties", s.Properties)
	populate(objectMap, "systemData", s.SystemData)
	populate(objectMap, "type", s.Type)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type SKUResource.
func (s *SKUResource) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "id":
			err = unpopulate(val, "ID", &s.ID)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &s.Name)
			delete(rawMsg, key)
		case "properties":
			err = unpopulate(val, "Properties", &s.Properties)
			delete(rawMsg, key)
		case "systemData":
			err = unpopulate(val, "SystemData", &s.SystemData)
			delete(rawMsg, key)
		case "type":
			err = unpopulate(val, "Type", &s.Type)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type SKUResourceArrayResponseWithContinuation.
func (s SKUResourceArrayResponseWithContinuation) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "nextLink", s.NextLink)
	populate(objectMap, "value", s.Value)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type SKUResourceArrayResponseWithContinuation.
func (s *SKUResourceArrayResponseWithContinuation) UnmarshalJSON(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 SKUResourceProperties.
func (s SKUResourceProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "provisioningState", s.ProvisioningState)
	populate(objectMap, "skuSettings", s.SKUSettings)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type SKUResourceProperties.
func (s *SKUResourceProperties) UnmarshalJSON(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 "provisioningState":
			err = unpopulate(val, "ProvisioningState", &s.ProvisioningState)
			delete(rawMsg, key)
		case "skuSettings":
			err = unpopulate(val, "SKUSettings", &s.SKUSettings)
			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 SKUSetting.
func (s SKUSetting) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "capabilities", s.Capabilities)
	populate(objectMap, "capacity", s.Capacity)
	populate(objectMap, "costs", s.Costs)
	populate(objectMap, "family", s.Family)
	populate(objectMap, "kind", s.Kind)
	populate(objectMap, "locationInfo", s.LocationInfo)
	populate(objectMap, "locations", s.Locations)
	populate(objectMap, "name", s.Name)
	populate(objectMap, "requiredFeatures", s.RequiredFeatures)
	populate(objectMap, "requiredQuotaIds", s.RequiredQuotaIDs)
	populate(objectMap, "size", s.Size)
	populate(objectMap, "tier", s.Tier)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type SKUSetting.
func (s *SKUSetting) UnmarshalJSON(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 "capabilities":
			err = unpopulate(val, "Capabilities", &s.Capabilities)
			delete(rawMsg, key)
		case "capacity":
			err = unpopulate(val, "Capacity", &s.Capacity)
			delete(rawMsg, key)
		case "costs":
			err = unpopulate(val, "Costs", &s.Costs)
			delete(rawMsg, key)
		case "family":
			err = unpopulate(val, "Family", &s.Family)
			delete(rawMsg, key)
		case "kind":
			err = unpopulate(val, "Kind", &s.Kind)
			delete(rawMsg, key)
		case "locationInfo":
			err = unpopulate(val, "LocationInfo", &s.LocationInfo)
			delete(rawMsg, key)
		case "locations":
			err = unpopulate(val, "Locations", &s.Locations)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &s.Name)
			delete(rawMsg, key)
		case "requiredFeatures":
			err = unpopulate(val, "RequiredFeatures", &s.RequiredFeatures)
			delete(rawMsg, key)
		case "requiredQuotaIds":
			err = unpopulate(val, "RequiredQuotaIDs", &s.RequiredQuotaIDs)
			delete(rawMsg, key)
		case "size":
			err = unpopulate(val, "Size", &s.Size)
			delete(rawMsg, key)
		case "tier":
			err = unpopulate(val, "Tier", &s.Tier)
			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 SKUSettingCapacity.
func (s SKUSettingCapacity) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "default", s.Default)
	populate(objectMap, "maximum", s.Maximum)
	populate(objectMap, "minimum", s.Minimum)
	populate(objectMap, "scaleType", s.ScaleType)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type SKUSettingCapacity.
func (s *SKUSettingCapacity) UnmarshalJSON(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 "default":
			err = unpopulate(val, "Default", &s.Default)
			delete(rawMsg, key)
		case "maximum":
			err = unpopulate(val, "Maximum", &s.Maximum)
			delete(rawMsg, key)
		case "minimum":
			err = unpopulate(val, "Minimum", &s.Minimum)
			delete(rawMsg, key)
		case "scaleType":
			err = unpopulate(val, "ScaleType", &s.ScaleType)
			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 SKUZoneDetail.
func (s SKUZoneDetail) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "capabilities", s.Capabilities)
	populate(objectMap, "name", s.Name)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type SKUZoneDetail.
func (s *SKUZoneDetail) UnmarshalJSON(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 "capabilities":
			err = unpopulate(val, "Capabilities", &s.Capabilities)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &s.Name)
			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 ServiceTreeInfo.
func (s ServiceTreeInfo) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "componentId", s.ComponentID)
	populate(objectMap, "readiness", s.Readiness)
	populate(objectMap, "serviceId", s.ServiceID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceTreeInfo.
func (s *ServiceTreeInfo) UnmarshalJSON(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 "componentId":
			err = unpopulate(val, "ComponentID", &s.ComponentID)
			delete(rawMsg, key)
		case "readiness":
			err = unpopulate(val, "Readiness", &s.Readiness)
			delete(rawMsg, key)
		case "serviceId":
			err = unpopulate(val, "ServiceID", &s.ServiceID)
			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 SubscriberSetting.
func (s SubscriberSetting) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "filterRules", s.FilterRules)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriberSetting.
func (s *SubscriberSetting) UnmarshalJSON(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 "filterRules":
			err = unpopulate(val, "FilterRules", &s.FilterRules)
			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 SubscriptionLifecycleNotificationSpecifications.
func (s SubscriptionLifecycleNotificationSpecifications) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "softDeleteTTL", s.SoftDeleteTTL)
	populate(objectMap, "subscriptionStateOverrideActions", s.SubscriptionStateOverrideActions)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionLifecycleNotificationSpecifications.
func (s *SubscriptionLifecycleNotificationSpecifications) UnmarshalJSON(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 "softDeleteTTL":
			err = unpopulate(val, "SoftDeleteTTL", &s.SoftDeleteTTL)
			delete(rawMsg, key)
		case "subscriptionStateOverrideActions":
			err = unpopulate(val, "SubscriptionStateOverrideActions", &s.SubscriptionStateOverrideActions)
			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 SubscriptionStateOverrideAction.
func (s SubscriptionStateOverrideAction) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "action", s.Action)
	populate(objectMap, "state", s.State)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionStateOverrideAction.
func (s *SubscriptionStateOverrideAction) UnmarshalJSON(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 "action":
			err = unpopulate(val, "Action", &s.Action)
			delete(rawMsg, key)
		case "state":
			err = unpopulate(val, "State", &s.State)
			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 SubscriptionStateRule.
func (s SubscriptionStateRule) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "allowedActions", s.AllowedActions)
	populate(objectMap, "state", s.State)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionStateRule.
func (s *SubscriptionStateRule) UnmarshalJSON(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 "allowedActions":
			err = unpopulate(val, "AllowedActions", &s.AllowedActions)
			delete(rawMsg, key)
		case "state":
			err = unpopulate(val, "State", &s.State)
			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 SwaggerSpecification.
func (s SwaggerSpecification) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "apiVersions", s.APIVersions)
	populate(objectMap, "swaggerSpecFolderUri", s.SwaggerSpecFolderURI)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type SwaggerSpecification.
func (s *SwaggerSpecification) UnmarshalJSON(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 "apiVersions":
			err = unpopulate(val, "APIVersions", &s.APIVersions)
			delete(rawMsg, key)
		case "swaggerSpecFolderUri":
			err = unpopulate(val, "SwaggerSpecFolderURI", &s.SwaggerSpecFolderURI)
			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]any)
	populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt)
	populate(objectMap, "createdBy", s.CreatedBy)
	populate(objectMap, "createdByType", s.CreatedByType)
	populateDateTimeRFC3339(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 = unpopulateDateTimeRFC3339(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 = unpopulateDateTimeRFC3339(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 TemplateDeploymentOptions.
func (t TemplateDeploymentOptions) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "preflightOptions", t.PreflightOptions)
	populate(objectMap, "preflightSupported", t.PreflightSupported)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type TemplateDeploymentOptions.
func (t *TemplateDeploymentOptions) UnmarshalJSON(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 "preflightOptions":
			err = unpopulate(val, "PreflightOptions", &t.PreflightOptions)
			delete(rawMsg, key)
		case "preflightSupported":
			err = unpopulate(val, "PreflightSupported", &t.PreflightSupported)
			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 TemplateDeploymentPolicy.
func (t TemplateDeploymentPolicy) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "capabilities", t.Capabilities)
	populate(objectMap, "preflightNotifications", t.PreflightNotifications)
	populate(objectMap, "preflightOptions", t.PreflightOptions)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type TemplateDeploymentPolicy.
func (t *TemplateDeploymentPolicy) UnmarshalJSON(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 "capabilities":
			err = unpopulate(val, "Capabilities", &t.Capabilities)
			delete(rawMsg, key)
		case "preflightNotifications":
			err = unpopulate(val, "PreflightNotifications", &t.PreflightNotifications)
			delete(rawMsg, key)
		case "preflightOptions":
			err = unpopulate(val, "PreflightOptions", &t.PreflightOptions)
			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 ThirdPartyExtension.
func (t ThirdPartyExtension) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "name", t.Name)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ThirdPartyExtension.
func (t *ThirdPartyExtension) UnmarshalJSON(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 "name":
			err = unpopulate(val, "Name", &t.Name)
			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 ThirdPartyProviderAuthorization.
func (t ThirdPartyProviderAuthorization) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "authorizations", t.Authorizations)
	populate(objectMap, "managedByTenantId", t.ManagedByTenantID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ThirdPartyProviderAuthorization.
func (t *ThirdPartyProviderAuthorization) UnmarshalJSON(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 "authorizations":
			err = unpopulate(val, "Authorizations", &t.Authorizations)
			delete(rawMsg, key)
		case "managedByTenantId":
			err = unpopulate(val, "ManagedByTenantID", &t.ManagedByTenantID)
			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 ThrottlingMetric.
func (t ThrottlingMetric) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "interval", t.Interval)
	populate(objectMap, "limit", t.Limit)
	populate(objectMap, "type", t.Type)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ThrottlingMetric.
func (t *ThrottlingMetric) UnmarshalJSON(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 "interval":
			err = unpopulate(val, "Interval", &t.Interval)
			delete(rawMsg, key)
		case "limit":
			err = unpopulate(val, "Limit", &t.Limit)
			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 ThrottlingRule.
func (t ThrottlingRule) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "action", t.Action)
	populate(objectMap, "applicationId", t.ApplicationID)
	populate(objectMap, "metrics", t.Metrics)
	populate(objectMap, "requiredFeatures", t.RequiredFeatures)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ThrottlingRule.
func (t *ThrottlingRule) UnmarshalJSON(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 "action":
			err = unpopulate(val, "Action", &t.Action)
			delete(rawMsg, key)
		case "applicationId":
			err = unpopulate(val, "ApplicationID", &t.ApplicationID)
			delete(rawMsg, key)
		case "metrics":
			err = unpopulate(val, "Metrics", &t.Metrics)
			delete(rawMsg, key)
		case "requiredFeatures":
			err = unpopulate(val, "RequiredFeatures", &t.RequiredFeatures)
			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 TokenAuthConfiguration.
func (t TokenAuthConfiguration) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "authenticationScheme", t.AuthenticationScheme)
	populate(objectMap, "disableCertificateAuthenticationFallback", t.DisableCertificateAuthenticationFallback)
	populate(objectMap, "signedRequestScope", t.SignedRequestScope)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type TokenAuthConfiguration.
func (t *TokenAuthConfiguration) UnmarshalJSON(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 "authenticationScheme":
			err = unpopulate(val, "AuthenticationScheme", &t.AuthenticationScheme)
			delete(rawMsg, key)
		case "disableCertificateAuthenticationFallback":
			err = unpopulate(val, "DisableCertificateAuthenticationFallback", &t.DisableCertificateAuthenticationFallback)
			delete(rawMsg, key)
		case "signedRequestScope":
			err = unpopulate(val, "SignedRequestScope", &t.SignedRequestScope)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", t, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type TrackedResource.
func (t TrackedResource) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "id", t.ID)
	populate(objectMap, "location", t.Location)
	populate(objectMap, "name", t.Name)
	populate(objectMap, "systemData", t.SystemData)
	populate(objectMap, "tags", t.Tags)
	populate(objectMap, "type", t.Type)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.
func (t *TrackedResource) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", t, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "id":
			err = unpopulate(val, "ID", &t.ID)
			delete(rawMsg, key)
		case "location":
			err = unpopulate(val, "Location", &t.Location)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &t.Name)
			delete(rawMsg, key)
		case "systemData":
			err = unpopulate(val, "SystemData", &t.SystemData)
			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 TrafficRegionRolloutConfiguration.
func (t TrafficRegionRolloutConfiguration) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "regions", t.Regions)
	populate(objectMap, "waitDuration", t.WaitDuration)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type TrafficRegionRolloutConfiguration.
func (t *TrafficRegionRolloutConfiguration) UnmarshalJSON(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 "regions":
			err = unpopulate(val, "Regions", &t.Regions)
			delete(rawMsg, key)
		case "waitDuration":
			err = unpopulate(val, "WaitDuration", &t.WaitDuration)
			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 TrafficRegions.
func (t TrafficRegions) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "regions", t.Regions)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type TrafficRegions.
func (t *TrafficRegions) UnmarshalJSON(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 "regions":
			err = unpopulate(val, "Regions", &t.Regions)
			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 TypedErrorInfo.
func (t TypedErrorInfo) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateAny(objectMap, "info", t.Info)
	populate(objectMap, "type", t.Type)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type TypedErrorInfo.
func (t *TypedErrorInfo) UnmarshalJSON(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 "info":
			err = unpopulate(val, "Info", &t.Info)
			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
}

func populate(m map[string]any, k string, v any) {
	if v == nil {
		return
	} else if azcore.IsNullValue(v) {
		m[k] = nil
	} else if !reflect.ValueOf(v).IsNil() {
		m[k] = v
	}
}

func populateAny(m map[string]any, k string, v any) {
	if v == nil {
		return
	} else if azcore.IsNullValue(v) {
		m[k] = nil
	} else {
		m[k] = v
	}
}

func unpopulate(data json.RawMessage, fn string, v any) error {
	if data == nil || string(data) == "null" {
		return nil
	}
	if err := json.Unmarshal(data, v); err != nil {
		return fmt.Errorf("struct field %s: %v", fn, err)
	}
	return nil
}
