...

Source file src/github.com/Azure/azure-sdk-for-go/services/preview/cosmos-db/mgmt/2021-04-01-preview/documentdb/models.go

Documentation: github.com/Azure/azure-sdk-for-go/services/preview/cosmos-db/mgmt/2021-04-01-preview/documentdb

     1  package documentdb
     2  
     3  // Copyright (c) Microsoft Corporation. All rights reserved.
     4  // Licensed under the MIT License. See License.txt in the project root for license information.
     5  //
     6  // Code generated by Microsoft (R) AutoRest Code Generator.
     7  // Changes may cause incorrect behavior and will be lost if the code is regenerated.
     8  
     9  import (
    10  	"context"
    11  	"encoding/json"
    12  	"github.com/Azure/go-autorest/autorest"
    13  	"github.com/Azure/go-autorest/autorest/azure"
    14  	"github.com/Azure/go-autorest/autorest/date"
    15  	"github.com/Azure/go-autorest/autorest/to"
    16  	"github.com/Azure/go-autorest/tracing"
    17  	"net/http"
    18  )
    19  
    20  // The package's fully qualified name.
    21  const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/cosmos-db/mgmt/2021-04-01-preview/documentdb"
    22  
    23  // APIProperties ...
    24  type APIProperties struct {
    25  	// ServerVersion - Describes the ServerVersion of an a MongoDB account. Possible values include: 'ServerVersionThreeFullStopTwo', 'ServerVersionThreeFullStopSix', 'ServerVersionFourFullStopZero'
    26  	ServerVersion ServerVersion `json:"serverVersion,omitempty"`
    27  }
    28  
    29  // ARMProxyResource the resource model definition for a ARM proxy resource. It will have everything other
    30  // than required location and tags
    31  type ARMProxyResource struct {
    32  	// ID - READ-ONLY; The unique resource identifier of the database account.
    33  	ID *string `json:"id,omitempty"`
    34  	// Name - READ-ONLY; The name of the database account.
    35  	Name *string `json:"name,omitempty"`
    36  	// Type - READ-ONLY; The type of Azure resource.
    37  	Type *string `json:"type,omitempty"`
    38  }
    39  
    40  // MarshalJSON is the custom marshaler for ARMProxyResource.
    41  func (apr ARMProxyResource) MarshalJSON() ([]byte, error) {
    42  	objectMap := make(map[string]interface{})
    43  	return json.Marshal(objectMap)
    44  }
    45  
    46  // ARMResourceProperties the core properties of ARM resources.
    47  type ARMResourceProperties struct {
    48  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
    49  	ID *string `json:"id,omitempty"`
    50  	// Name - READ-ONLY; The name of the ARM resource.
    51  	Name *string `json:"name,omitempty"`
    52  	// Type - READ-ONLY; The type of Azure resource.
    53  	Type *string `json:"type,omitempty"`
    54  	// Location - The location of the resource group to which the resource belongs.
    55  	Location *string                 `json:"location,omitempty"`
    56  	Tags     map[string]*string      `json:"tags"`
    57  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
    58  }
    59  
    60  // MarshalJSON is the custom marshaler for ARMResourceProperties.
    61  func (arp ARMResourceProperties) MarshalJSON() ([]byte, error) {
    62  	objectMap := make(map[string]interface{})
    63  	if arp.Location != nil {
    64  		objectMap["location"] = arp.Location
    65  	}
    66  	if arp.Tags != nil {
    67  		objectMap["tags"] = arp.Tags
    68  	}
    69  	if arp.Identity != nil {
    70  		objectMap["identity"] = arp.Identity
    71  	}
    72  	return json.Marshal(objectMap)
    73  }
    74  
    75  // AutoscaleSettings ...
    76  type AutoscaleSettings struct {
    77  	// MaxThroughput - Represents maximum throughput, the resource can scale up to.
    78  	MaxThroughput *int32 `json:"maxThroughput,omitempty"`
    79  }
    80  
    81  // AutoscaleSettingsResource cosmos DB provisioned throughput settings object
    82  type AutoscaleSettingsResource struct {
    83  	// MaxThroughput - Represents maximum throughput container can scale up to.
    84  	MaxThroughput *int32 `json:"maxThroughput,omitempty"`
    85  	// AutoUpgradePolicy - Cosmos DB resource auto-upgrade policy
    86  	AutoUpgradePolicy *AutoUpgradePolicyResource `json:"autoUpgradePolicy,omitempty"`
    87  	// TargetMaxThroughput - READ-ONLY; Represents target maximum throughput container can scale up to once offer is no longer in pending state.
    88  	TargetMaxThroughput *int32 `json:"targetMaxThroughput,omitempty"`
    89  }
    90  
    91  // MarshalJSON is the custom marshaler for AutoscaleSettingsResource.
    92  func (asr AutoscaleSettingsResource) MarshalJSON() ([]byte, error) {
    93  	objectMap := make(map[string]interface{})
    94  	if asr.MaxThroughput != nil {
    95  		objectMap["maxThroughput"] = asr.MaxThroughput
    96  	}
    97  	if asr.AutoUpgradePolicy != nil {
    98  		objectMap["autoUpgradePolicy"] = asr.AutoUpgradePolicy
    99  	}
   100  	return json.Marshal(objectMap)
   101  }
   102  
   103  // AutoUpgradePolicyResource cosmos DB resource auto-upgrade policy
   104  type AutoUpgradePolicyResource struct {
   105  	// ThroughputPolicy - Represents throughput policy which service must adhere to for auto-upgrade
   106  	ThroughputPolicy *ThroughputPolicyResource `json:"throughputPolicy,omitempty"`
   107  }
   108  
   109  // AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag.
   110  type AzureEntityResource struct {
   111  	// Etag - READ-ONLY; Resource Etag.
   112  	Etag *string `json:"etag,omitempty"`
   113  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
   114  	ID *string `json:"id,omitempty"`
   115  	// Name - READ-ONLY; The name of the resource
   116  	Name *string `json:"name,omitempty"`
   117  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
   118  	Type *string `json:"type,omitempty"`
   119  }
   120  
   121  // MarshalJSON is the custom marshaler for AzureEntityResource.
   122  func (aer AzureEntityResource) MarshalJSON() ([]byte, error) {
   123  	objectMap := make(map[string]interface{})
   124  	return json.Marshal(objectMap)
   125  }
   126  
   127  // BackupInformation backup information of a resource.
   128  type BackupInformation struct {
   129  	autorest.Response           `json:"-"`
   130  	ContinuousBackupInformation *ContinuousBackupInformation `json:"continuousBackupInformation,omitempty"`
   131  }
   132  
   133  // BasicBackupPolicy the object representing the policy for taking backups on an account.
   134  type BasicBackupPolicy interface {
   135  	AsPeriodicModeBackupPolicy() (*PeriodicModeBackupPolicy, bool)
   136  	AsContinuousModeBackupPolicy() (*ContinuousModeBackupPolicy, bool)
   137  	AsBackupPolicy() (*BackupPolicy, bool)
   138  }
   139  
   140  // BackupPolicy the object representing the policy for taking backups on an account.
   141  type BackupPolicy struct {
   142  	// Type - Possible values include: 'TypeBackupPolicy', 'TypePeriodic', 'TypeContinuous'
   143  	Type Type `json:"type,omitempty"`
   144  }
   145  
   146  func unmarshalBasicBackupPolicy(body []byte) (BasicBackupPolicy, error) {
   147  	var m map[string]interface{}
   148  	err := json.Unmarshal(body, &m)
   149  	if err != nil {
   150  		return nil, err
   151  	}
   152  
   153  	switch m["type"] {
   154  	case string(TypePeriodic):
   155  		var pmbp PeriodicModeBackupPolicy
   156  		err := json.Unmarshal(body, &pmbp)
   157  		return pmbp, err
   158  	case string(TypeContinuous):
   159  		var cmbp ContinuousModeBackupPolicy
   160  		err := json.Unmarshal(body, &cmbp)
   161  		return cmbp, err
   162  	default:
   163  		var bp BackupPolicy
   164  		err := json.Unmarshal(body, &bp)
   165  		return bp, err
   166  	}
   167  }
   168  func unmarshalBasicBackupPolicyArray(body []byte) ([]BasicBackupPolicy, error) {
   169  	var rawMessages []*json.RawMessage
   170  	err := json.Unmarshal(body, &rawMessages)
   171  	if err != nil {
   172  		return nil, err
   173  	}
   174  
   175  	bpArray := make([]BasicBackupPolicy, len(rawMessages))
   176  
   177  	for index, rawMessage := range rawMessages {
   178  		bp, err := unmarshalBasicBackupPolicy(*rawMessage)
   179  		if err != nil {
   180  			return nil, err
   181  		}
   182  		bpArray[index] = bp
   183  	}
   184  	return bpArray, nil
   185  }
   186  
   187  // MarshalJSON is the custom marshaler for BackupPolicy.
   188  func (bp BackupPolicy) MarshalJSON() ([]byte, error) {
   189  	bp.Type = TypeBackupPolicy
   190  	objectMap := make(map[string]interface{})
   191  	if bp.Type != "" {
   192  		objectMap["type"] = bp.Type
   193  	}
   194  	return json.Marshal(objectMap)
   195  }
   196  
   197  // AsPeriodicModeBackupPolicy is the BasicBackupPolicy implementation for BackupPolicy.
   198  func (bp BackupPolicy) AsPeriodicModeBackupPolicy() (*PeriodicModeBackupPolicy, bool) {
   199  	return nil, false
   200  }
   201  
   202  // AsContinuousModeBackupPolicy is the BasicBackupPolicy implementation for BackupPolicy.
   203  func (bp BackupPolicy) AsContinuousModeBackupPolicy() (*ContinuousModeBackupPolicy, bool) {
   204  	return nil, false
   205  }
   206  
   207  // AsBackupPolicy is the BasicBackupPolicy implementation for BackupPolicy.
   208  func (bp BackupPolicy) AsBackupPolicy() (*BackupPolicy, bool) {
   209  	return &bp, true
   210  }
   211  
   212  // AsBasicBackupPolicy is the BasicBackupPolicy implementation for BackupPolicy.
   213  func (bp BackupPolicy) AsBasicBackupPolicy() (BasicBackupPolicy, bool) {
   214  	return &bp, true
   215  }
   216  
   217  // BackupResource a restorable backup of a Cassandra cluster.
   218  type BackupResource struct {
   219  	autorest.Response `json:"-"`
   220  	Properties        *BackupResourceProperties `json:"properties,omitempty"`
   221  	// ID - READ-ONLY; The unique resource identifier of the database account.
   222  	ID *string `json:"id,omitempty"`
   223  	// Name - READ-ONLY; The name of the database account.
   224  	Name *string `json:"name,omitempty"`
   225  	// Type - READ-ONLY; The type of Azure resource.
   226  	Type *string `json:"type,omitempty"`
   227  }
   228  
   229  // MarshalJSON is the custom marshaler for BackupResource.
   230  func (br BackupResource) MarshalJSON() ([]byte, error) {
   231  	objectMap := make(map[string]interface{})
   232  	if br.Properties != nil {
   233  		objectMap["properties"] = br.Properties
   234  	}
   235  	return json.Marshal(objectMap)
   236  }
   237  
   238  // BackupResourceProperties ...
   239  type BackupResourceProperties struct {
   240  	// Timestamp - The time this backup was taken, formatted like 2021-01-21T17:35:21
   241  	Timestamp *date.Time `json:"timestamp,omitempty"`
   242  }
   243  
   244  // Capability cosmos DB capability object
   245  type Capability struct {
   246  	// Name - Name of the Cosmos DB capability. For example, "name": "EnableCassandra". Current values also include "EnableTable" and "EnableGremlin".
   247  	Name *string `json:"name,omitempty"`
   248  }
   249  
   250  // CassandraClustersCreateUpdateFuture an abstraction for monitoring and retrieving the results of a
   251  // long-running operation.
   252  type CassandraClustersCreateUpdateFuture struct {
   253  	azure.FutureAPI
   254  	// Result returns the result of the asynchronous operation.
   255  	// If the operation has not completed it will return an error.
   256  	Result func(CassandraClustersClient) (ClusterResource, error)
   257  }
   258  
   259  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   260  func (future *CassandraClustersCreateUpdateFuture) UnmarshalJSON(body []byte) error {
   261  	var azFuture azure.Future
   262  	if err := json.Unmarshal(body, &azFuture); err != nil {
   263  		return err
   264  	}
   265  	future.FutureAPI = &azFuture
   266  	future.Result = future.result
   267  	return nil
   268  }
   269  
   270  // result is the default implementation for CassandraClustersCreateUpdateFuture.Result.
   271  func (future *CassandraClustersCreateUpdateFuture) result(client CassandraClustersClient) (cr ClusterResource, err error) {
   272  	var done bool
   273  	done, err = future.DoneWithContext(context.Background(), client)
   274  	if err != nil {
   275  		err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersCreateUpdateFuture", "Result", future.Response(), "Polling failure")
   276  		return
   277  	}
   278  	if !done {
   279  		cr.Response.Response = future.Response()
   280  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraClustersCreateUpdateFuture")
   281  		return
   282  	}
   283  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   284  	if cr.Response.Response, err = future.GetResult(sender); err == nil && cr.Response.Response.StatusCode != http.StatusNoContent {
   285  		cr, err = client.CreateUpdateResponder(cr.Response.Response)
   286  		if err != nil {
   287  			err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersCreateUpdateFuture", "Result", cr.Response.Response, "Failure responding to request")
   288  		}
   289  	}
   290  	return
   291  }
   292  
   293  // CassandraClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
   294  // operation.
   295  type CassandraClustersDeleteFuture struct {
   296  	azure.FutureAPI
   297  	// Result returns the result of the asynchronous operation.
   298  	// If the operation has not completed it will return an error.
   299  	Result func(CassandraClustersClient) (autorest.Response, error)
   300  }
   301  
   302  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   303  func (future *CassandraClustersDeleteFuture) UnmarshalJSON(body []byte) error {
   304  	var azFuture azure.Future
   305  	if err := json.Unmarshal(body, &azFuture); err != nil {
   306  		return err
   307  	}
   308  	future.FutureAPI = &azFuture
   309  	future.Result = future.result
   310  	return nil
   311  }
   312  
   313  // result is the default implementation for CassandraClustersDeleteFuture.Result.
   314  func (future *CassandraClustersDeleteFuture) result(client CassandraClustersClient) (ar autorest.Response, err error) {
   315  	var done bool
   316  	done, err = future.DoneWithContext(context.Background(), client)
   317  	if err != nil {
   318  		err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersDeleteFuture", "Result", future.Response(), "Polling failure")
   319  		return
   320  	}
   321  	if !done {
   322  		ar.Response = future.Response()
   323  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraClustersDeleteFuture")
   324  		return
   325  	}
   326  	ar.Response = future.Response()
   327  	return
   328  }
   329  
   330  // CassandraClustersFetchNodeStatusFuture an abstraction for monitoring and retrieving the results of a
   331  // long-running operation.
   332  type CassandraClustersFetchNodeStatusFuture struct {
   333  	azure.FutureAPI
   334  	// Result returns the result of the asynchronous operation.
   335  	// If the operation has not completed it will return an error.
   336  	Result func(CassandraClustersClient) (ClusterNodeStatus, error)
   337  }
   338  
   339  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   340  func (future *CassandraClustersFetchNodeStatusFuture) UnmarshalJSON(body []byte) error {
   341  	var azFuture azure.Future
   342  	if err := json.Unmarshal(body, &azFuture); err != nil {
   343  		return err
   344  	}
   345  	future.FutureAPI = &azFuture
   346  	future.Result = future.result
   347  	return nil
   348  }
   349  
   350  // result is the default implementation for CassandraClustersFetchNodeStatusFuture.Result.
   351  func (future *CassandraClustersFetchNodeStatusFuture) result(client CassandraClustersClient) (cns ClusterNodeStatus, err error) {
   352  	var done bool
   353  	done, err = future.DoneWithContext(context.Background(), client)
   354  	if err != nil {
   355  		err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersFetchNodeStatusFuture", "Result", future.Response(), "Polling failure")
   356  		return
   357  	}
   358  	if !done {
   359  		cns.Response.Response = future.Response()
   360  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraClustersFetchNodeStatusFuture")
   361  		return
   362  	}
   363  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   364  	if cns.Response.Response, err = future.GetResult(sender); err == nil && cns.Response.Response.StatusCode != http.StatusNoContent {
   365  		cns, err = client.FetchNodeStatusResponder(cns.Response.Response)
   366  		if err != nil {
   367  			err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersFetchNodeStatusFuture", "Result", cns.Response.Response, "Failure responding to request")
   368  		}
   369  	}
   370  	return
   371  }
   372  
   373  // CassandraClustersRequestRepairFuture an abstraction for monitoring and retrieving the results of a
   374  // long-running operation.
   375  type CassandraClustersRequestRepairFuture struct {
   376  	azure.FutureAPI
   377  	// Result returns the result of the asynchronous operation.
   378  	// If the operation has not completed it will return an error.
   379  	Result func(CassandraClustersClient) (autorest.Response, error)
   380  }
   381  
   382  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   383  func (future *CassandraClustersRequestRepairFuture) UnmarshalJSON(body []byte) error {
   384  	var azFuture azure.Future
   385  	if err := json.Unmarshal(body, &azFuture); err != nil {
   386  		return err
   387  	}
   388  	future.FutureAPI = &azFuture
   389  	future.Result = future.result
   390  	return nil
   391  }
   392  
   393  // result is the default implementation for CassandraClustersRequestRepairFuture.Result.
   394  func (future *CassandraClustersRequestRepairFuture) result(client CassandraClustersClient) (ar autorest.Response, err error) {
   395  	var done bool
   396  	done, err = future.DoneWithContext(context.Background(), client)
   397  	if err != nil {
   398  		err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersRequestRepairFuture", "Result", future.Response(), "Polling failure")
   399  		return
   400  	}
   401  	if !done {
   402  		ar.Response = future.Response()
   403  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraClustersRequestRepairFuture")
   404  		return
   405  	}
   406  	ar.Response = future.Response()
   407  	return
   408  }
   409  
   410  // CassandraClustersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
   411  // operation.
   412  type CassandraClustersUpdateFuture struct {
   413  	azure.FutureAPI
   414  	// Result returns the result of the asynchronous operation.
   415  	// If the operation has not completed it will return an error.
   416  	Result func(CassandraClustersClient) (ClusterResource, error)
   417  }
   418  
   419  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   420  func (future *CassandraClustersUpdateFuture) UnmarshalJSON(body []byte) error {
   421  	var azFuture azure.Future
   422  	if err := json.Unmarshal(body, &azFuture); err != nil {
   423  		return err
   424  	}
   425  	future.FutureAPI = &azFuture
   426  	future.Result = future.result
   427  	return nil
   428  }
   429  
   430  // result is the default implementation for CassandraClustersUpdateFuture.Result.
   431  func (future *CassandraClustersUpdateFuture) result(client CassandraClustersClient) (cr ClusterResource, err error) {
   432  	var done bool
   433  	done, err = future.DoneWithContext(context.Background(), client)
   434  	if err != nil {
   435  		err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersUpdateFuture", "Result", future.Response(), "Polling failure")
   436  		return
   437  	}
   438  	if !done {
   439  		cr.Response.Response = future.Response()
   440  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraClustersUpdateFuture")
   441  		return
   442  	}
   443  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   444  	if cr.Response.Response, err = future.GetResult(sender); err == nil && cr.Response.Response.StatusCode != http.StatusNoContent {
   445  		cr, err = client.UpdateResponder(cr.Response.Response)
   446  		if err != nil {
   447  			err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersUpdateFuture", "Result", cr.Response.Response, "Failure responding to request")
   448  		}
   449  	}
   450  	return
   451  }
   452  
   453  // CassandraDataCentersCreateUpdateFuture an abstraction for monitoring and retrieving the results of a
   454  // long-running operation.
   455  type CassandraDataCentersCreateUpdateFuture struct {
   456  	azure.FutureAPI
   457  	// Result returns the result of the asynchronous operation.
   458  	// If the operation has not completed it will return an error.
   459  	Result func(CassandraDataCentersClient) (DataCenterResource, error)
   460  }
   461  
   462  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   463  func (future *CassandraDataCentersCreateUpdateFuture) UnmarshalJSON(body []byte) error {
   464  	var azFuture azure.Future
   465  	if err := json.Unmarshal(body, &azFuture); err != nil {
   466  		return err
   467  	}
   468  	future.FutureAPI = &azFuture
   469  	future.Result = future.result
   470  	return nil
   471  }
   472  
   473  // result is the default implementation for CassandraDataCentersCreateUpdateFuture.Result.
   474  func (future *CassandraDataCentersCreateUpdateFuture) result(client CassandraDataCentersClient) (dcr DataCenterResource, err error) {
   475  	var done bool
   476  	done, err = future.DoneWithContext(context.Background(), client)
   477  	if err != nil {
   478  		err = autorest.NewErrorWithError(err, "documentdb.CassandraDataCentersCreateUpdateFuture", "Result", future.Response(), "Polling failure")
   479  		return
   480  	}
   481  	if !done {
   482  		dcr.Response.Response = future.Response()
   483  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraDataCentersCreateUpdateFuture")
   484  		return
   485  	}
   486  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   487  	if dcr.Response.Response, err = future.GetResult(sender); err == nil && dcr.Response.Response.StatusCode != http.StatusNoContent {
   488  		dcr, err = client.CreateUpdateResponder(dcr.Response.Response)
   489  		if err != nil {
   490  			err = autorest.NewErrorWithError(err, "documentdb.CassandraDataCentersCreateUpdateFuture", "Result", dcr.Response.Response, "Failure responding to request")
   491  		}
   492  	}
   493  	return
   494  }
   495  
   496  // CassandraDataCentersDeleteFuture an abstraction for monitoring and retrieving the results of a
   497  // long-running operation.
   498  type CassandraDataCentersDeleteFuture struct {
   499  	azure.FutureAPI
   500  	// Result returns the result of the asynchronous operation.
   501  	// If the operation has not completed it will return an error.
   502  	Result func(CassandraDataCentersClient) (autorest.Response, error)
   503  }
   504  
   505  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   506  func (future *CassandraDataCentersDeleteFuture) UnmarshalJSON(body []byte) error {
   507  	var azFuture azure.Future
   508  	if err := json.Unmarshal(body, &azFuture); err != nil {
   509  		return err
   510  	}
   511  	future.FutureAPI = &azFuture
   512  	future.Result = future.result
   513  	return nil
   514  }
   515  
   516  // result is the default implementation for CassandraDataCentersDeleteFuture.Result.
   517  func (future *CassandraDataCentersDeleteFuture) result(client CassandraDataCentersClient) (ar autorest.Response, err error) {
   518  	var done bool
   519  	done, err = future.DoneWithContext(context.Background(), client)
   520  	if err != nil {
   521  		err = autorest.NewErrorWithError(err, "documentdb.CassandraDataCentersDeleteFuture", "Result", future.Response(), "Polling failure")
   522  		return
   523  	}
   524  	if !done {
   525  		ar.Response = future.Response()
   526  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraDataCentersDeleteFuture")
   527  		return
   528  	}
   529  	ar.Response = future.Response()
   530  	return
   531  }
   532  
   533  // CassandraDataCentersUpdateFuture an abstraction for monitoring and retrieving the results of a
   534  // long-running operation.
   535  type CassandraDataCentersUpdateFuture struct {
   536  	azure.FutureAPI
   537  	// Result returns the result of the asynchronous operation.
   538  	// If the operation has not completed it will return an error.
   539  	Result func(CassandraDataCentersClient) (DataCenterResource, error)
   540  }
   541  
   542  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   543  func (future *CassandraDataCentersUpdateFuture) UnmarshalJSON(body []byte) error {
   544  	var azFuture azure.Future
   545  	if err := json.Unmarshal(body, &azFuture); err != nil {
   546  		return err
   547  	}
   548  	future.FutureAPI = &azFuture
   549  	future.Result = future.result
   550  	return nil
   551  }
   552  
   553  // result is the default implementation for CassandraDataCentersUpdateFuture.Result.
   554  func (future *CassandraDataCentersUpdateFuture) result(client CassandraDataCentersClient) (dcr DataCenterResource, err error) {
   555  	var done bool
   556  	done, err = future.DoneWithContext(context.Background(), client)
   557  	if err != nil {
   558  		err = autorest.NewErrorWithError(err, "documentdb.CassandraDataCentersUpdateFuture", "Result", future.Response(), "Polling failure")
   559  		return
   560  	}
   561  	if !done {
   562  		dcr.Response.Response = future.Response()
   563  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraDataCentersUpdateFuture")
   564  		return
   565  	}
   566  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   567  	if dcr.Response.Response, err = future.GetResult(sender); err == nil && dcr.Response.Response.StatusCode != http.StatusNoContent {
   568  		dcr, err = client.UpdateResponder(dcr.Response.Response)
   569  		if err != nil {
   570  			err = autorest.NewErrorWithError(err, "documentdb.CassandraDataCentersUpdateFuture", "Result", dcr.Response.Response, "Failure responding to request")
   571  		}
   572  	}
   573  	return
   574  }
   575  
   576  // CassandraKeyspaceCreateUpdateParameters parameters to create and update Cosmos DB Cassandra keyspace.
   577  type CassandraKeyspaceCreateUpdateParameters struct {
   578  	// CassandraKeyspaceCreateUpdateProperties - Properties to create and update Azure Cosmos DB Cassandra keyspace.
   579  	*CassandraKeyspaceCreateUpdateProperties `json:"properties,omitempty"`
   580  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
   581  	ID *string `json:"id,omitempty"`
   582  	// Name - READ-ONLY; The name of the ARM resource.
   583  	Name *string `json:"name,omitempty"`
   584  	// Type - READ-ONLY; The type of Azure resource.
   585  	Type *string `json:"type,omitempty"`
   586  	// Location - The location of the resource group to which the resource belongs.
   587  	Location *string                 `json:"location,omitempty"`
   588  	Tags     map[string]*string      `json:"tags"`
   589  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
   590  }
   591  
   592  // MarshalJSON is the custom marshaler for CassandraKeyspaceCreateUpdateParameters.
   593  func (ckcup CassandraKeyspaceCreateUpdateParameters) MarshalJSON() ([]byte, error) {
   594  	objectMap := make(map[string]interface{})
   595  	if ckcup.CassandraKeyspaceCreateUpdateProperties != nil {
   596  		objectMap["properties"] = ckcup.CassandraKeyspaceCreateUpdateProperties
   597  	}
   598  	if ckcup.Location != nil {
   599  		objectMap["location"] = ckcup.Location
   600  	}
   601  	if ckcup.Tags != nil {
   602  		objectMap["tags"] = ckcup.Tags
   603  	}
   604  	if ckcup.Identity != nil {
   605  		objectMap["identity"] = ckcup.Identity
   606  	}
   607  	return json.Marshal(objectMap)
   608  }
   609  
   610  // UnmarshalJSON is the custom unmarshaler for CassandraKeyspaceCreateUpdateParameters struct.
   611  func (ckcup *CassandraKeyspaceCreateUpdateParameters) UnmarshalJSON(body []byte) error {
   612  	var m map[string]*json.RawMessage
   613  	err := json.Unmarshal(body, &m)
   614  	if err != nil {
   615  		return err
   616  	}
   617  	for k, v := range m {
   618  		switch k {
   619  		case "properties":
   620  			if v != nil {
   621  				var cassandraKeyspaceCreateUpdateProperties CassandraKeyspaceCreateUpdateProperties
   622  				err = json.Unmarshal(*v, &cassandraKeyspaceCreateUpdateProperties)
   623  				if err != nil {
   624  					return err
   625  				}
   626  				ckcup.CassandraKeyspaceCreateUpdateProperties = &cassandraKeyspaceCreateUpdateProperties
   627  			}
   628  		case "id":
   629  			if v != nil {
   630  				var ID string
   631  				err = json.Unmarshal(*v, &ID)
   632  				if err != nil {
   633  					return err
   634  				}
   635  				ckcup.ID = &ID
   636  			}
   637  		case "name":
   638  			if v != nil {
   639  				var name string
   640  				err = json.Unmarshal(*v, &name)
   641  				if err != nil {
   642  					return err
   643  				}
   644  				ckcup.Name = &name
   645  			}
   646  		case "type":
   647  			if v != nil {
   648  				var typeVar string
   649  				err = json.Unmarshal(*v, &typeVar)
   650  				if err != nil {
   651  					return err
   652  				}
   653  				ckcup.Type = &typeVar
   654  			}
   655  		case "location":
   656  			if v != nil {
   657  				var location string
   658  				err = json.Unmarshal(*v, &location)
   659  				if err != nil {
   660  					return err
   661  				}
   662  				ckcup.Location = &location
   663  			}
   664  		case "tags":
   665  			if v != nil {
   666  				var tags map[string]*string
   667  				err = json.Unmarshal(*v, &tags)
   668  				if err != nil {
   669  					return err
   670  				}
   671  				ckcup.Tags = tags
   672  			}
   673  		case "identity":
   674  			if v != nil {
   675  				var identity ManagedServiceIdentity
   676  				err = json.Unmarshal(*v, &identity)
   677  				if err != nil {
   678  					return err
   679  				}
   680  				ckcup.Identity = &identity
   681  			}
   682  		}
   683  	}
   684  
   685  	return nil
   686  }
   687  
   688  // CassandraKeyspaceCreateUpdateProperties properties to create and update Azure Cosmos DB Cassandra
   689  // keyspace.
   690  type CassandraKeyspaceCreateUpdateProperties struct {
   691  	// Resource - The standard JSON format of a Cassandra keyspace
   692  	Resource *CassandraKeyspaceResource `json:"resource,omitempty"`
   693  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
   694  	Options *CreateUpdateOptions `json:"options,omitempty"`
   695  }
   696  
   697  // CassandraKeyspaceGetProperties the properties of an Azure Cosmos DB Cassandra keyspace
   698  type CassandraKeyspaceGetProperties struct {
   699  	Resource *CassandraKeyspaceGetPropertiesResource `json:"resource,omitempty"`
   700  	Options  *CassandraKeyspaceGetPropertiesOptions  `json:"options,omitempty"`
   701  }
   702  
   703  // CassandraKeyspaceGetPropertiesOptions ...
   704  type CassandraKeyspaceGetPropertiesOptions struct {
   705  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
   706  	Throughput *int32 `json:"throughput,omitempty"`
   707  	// AutoscaleSettings - Specifies the Autoscale settings.
   708  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
   709  }
   710  
   711  // CassandraKeyspaceGetPropertiesResource ...
   712  type CassandraKeyspaceGetPropertiesResource struct {
   713  	// ID - Name of the Cosmos DB Cassandra keyspace
   714  	ID *string `json:"id,omitempty"`
   715  	// Rid - READ-ONLY; A system generated property. A unique identifier.
   716  	Rid *string `json:"_rid,omitempty"`
   717  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
   718  	Ts *float64 `json:"_ts,omitempty"`
   719  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
   720  	Etag *string `json:"_etag,omitempty"`
   721  }
   722  
   723  // MarshalJSON is the custom marshaler for CassandraKeyspaceGetPropertiesResource.
   724  func (ckgp CassandraKeyspaceGetPropertiesResource) MarshalJSON() ([]byte, error) {
   725  	objectMap := make(map[string]interface{})
   726  	if ckgp.ID != nil {
   727  		objectMap["id"] = ckgp.ID
   728  	}
   729  	return json.Marshal(objectMap)
   730  }
   731  
   732  // CassandraKeyspaceGetResults an Azure Cosmos DB Cassandra keyspace.
   733  type CassandraKeyspaceGetResults struct {
   734  	autorest.Response `json:"-"`
   735  	// CassandraKeyspaceGetProperties - The properties of an Azure Cosmos DB Cassandra keyspace
   736  	*CassandraKeyspaceGetProperties `json:"properties,omitempty"`
   737  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
   738  	ID *string `json:"id,omitempty"`
   739  	// Name - READ-ONLY; The name of the ARM resource.
   740  	Name *string `json:"name,omitempty"`
   741  	// Type - READ-ONLY; The type of Azure resource.
   742  	Type *string `json:"type,omitempty"`
   743  	// Location - The location of the resource group to which the resource belongs.
   744  	Location *string                 `json:"location,omitempty"`
   745  	Tags     map[string]*string      `json:"tags"`
   746  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
   747  }
   748  
   749  // MarshalJSON is the custom marshaler for CassandraKeyspaceGetResults.
   750  func (ckgr CassandraKeyspaceGetResults) MarshalJSON() ([]byte, error) {
   751  	objectMap := make(map[string]interface{})
   752  	if ckgr.CassandraKeyspaceGetProperties != nil {
   753  		objectMap["properties"] = ckgr.CassandraKeyspaceGetProperties
   754  	}
   755  	if ckgr.Location != nil {
   756  		objectMap["location"] = ckgr.Location
   757  	}
   758  	if ckgr.Tags != nil {
   759  		objectMap["tags"] = ckgr.Tags
   760  	}
   761  	if ckgr.Identity != nil {
   762  		objectMap["identity"] = ckgr.Identity
   763  	}
   764  	return json.Marshal(objectMap)
   765  }
   766  
   767  // UnmarshalJSON is the custom unmarshaler for CassandraKeyspaceGetResults struct.
   768  func (ckgr *CassandraKeyspaceGetResults) UnmarshalJSON(body []byte) error {
   769  	var m map[string]*json.RawMessage
   770  	err := json.Unmarshal(body, &m)
   771  	if err != nil {
   772  		return err
   773  	}
   774  	for k, v := range m {
   775  		switch k {
   776  		case "properties":
   777  			if v != nil {
   778  				var cassandraKeyspaceGetProperties CassandraKeyspaceGetProperties
   779  				err = json.Unmarshal(*v, &cassandraKeyspaceGetProperties)
   780  				if err != nil {
   781  					return err
   782  				}
   783  				ckgr.CassandraKeyspaceGetProperties = &cassandraKeyspaceGetProperties
   784  			}
   785  		case "id":
   786  			if v != nil {
   787  				var ID string
   788  				err = json.Unmarshal(*v, &ID)
   789  				if err != nil {
   790  					return err
   791  				}
   792  				ckgr.ID = &ID
   793  			}
   794  		case "name":
   795  			if v != nil {
   796  				var name string
   797  				err = json.Unmarshal(*v, &name)
   798  				if err != nil {
   799  					return err
   800  				}
   801  				ckgr.Name = &name
   802  			}
   803  		case "type":
   804  			if v != nil {
   805  				var typeVar string
   806  				err = json.Unmarshal(*v, &typeVar)
   807  				if err != nil {
   808  					return err
   809  				}
   810  				ckgr.Type = &typeVar
   811  			}
   812  		case "location":
   813  			if v != nil {
   814  				var location string
   815  				err = json.Unmarshal(*v, &location)
   816  				if err != nil {
   817  					return err
   818  				}
   819  				ckgr.Location = &location
   820  			}
   821  		case "tags":
   822  			if v != nil {
   823  				var tags map[string]*string
   824  				err = json.Unmarshal(*v, &tags)
   825  				if err != nil {
   826  					return err
   827  				}
   828  				ckgr.Tags = tags
   829  			}
   830  		case "identity":
   831  			if v != nil {
   832  				var identity ManagedServiceIdentity
   833  				err = json.Unmarshal(*v, &identity)
   834  				if err != nil {
   835  					return err
   836  				}
   837  				ckgr.Identity = &identity
   838  			}
   839  		}
   840  	}
   841  
   842  	return nil
   843  }
   844  
   845  // CassandraKeyspaceListResult the List operation response, that contains the Cassandra keyspaces and their
   846  // properties.
   847  type CassandraKeyspaceListResult struct {
   848  	autorest.Response `json:"-"`
   849  	// Value - READ-ONLY; List of Cassandra keyspaces and their properties.
   850  	Value *[]CassandraKeyspaceGetResults `json:"value,omitempty"`
   851  }
   852  
   853  // MarshalJSON is the custom marshaler for CassandraKeyspaceListResult.
   854  func (cklr CassandraKeyspaceListResult) MarshalJSON() ([]byte, error) {
   855  	objectMap := make(map[string]interface{})
   856  	return json.Marshal(objectMap)
   857  }
   858  
   859  // CassandraKeyspaceResource cosmos DB Cassandra keyspace resource object
   860  type CassandraKeyspaceResource struct {
   861  	// ID - Name of the Cosmos DB Cassandra keyspace
   862  	ID *string `json:"id,omitempty"`
   863  }
   864  
   865  // CassandraPartitionKey cosmos DB Cassandra table partition key
   866  type CassandraPartitionKey struct {
   867  	// Name - Name of the Cosmos DB Cassandra table partition key
   868  	Name *string `json:"name,omitempty"`
   869  }
   870  
   871  // CassandraResourcesCreateUpdateCassandraKeyspaceFuture an abstraction for monitoring and retrieving the
   872  // results of a long-running operation.
   873  type CassandraResourcesCreateUpdateCassandraKeyspaceFuture struct {
   874  	azure.FutureAPI
   875  	// Result returns the result of the asynchronous operation.
   876  	// If the operation has not completed it will return an error.
   877  	Result func(CassandraResourcesClient) (CassandraKeyspaceGetResults, error)
   878  }
   879  
   880  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   881  func (future *CassandraResourcesCreateUpdateCassandraKeyspaceFuture) UnmarshalJSON(body []byte) error {
   882  	var azFuture azure.Future
   883  	if err := json.Unmarshal(body, &azFuture); err != nil {
   884  		return err
   885  	}
   886  	future.FutureAPI = &azFuture
   887  	future.Result = future.result
   888  	return nil
   889  }
   890  
   891  // result is the default implementation for CassandraResourcesCreateUpdateCassandraKeyspaceFuture.Result.
   892  func (future *CassandraResourcesCreateUpdateCassandraKeyspaceFuture) result(client CassandraResourcesClient) (ckgr CassandraKeyspaceGetResults, err error) {
   893  	var done bool
   894  	done, err = future.DoneWithContext(context.Background(), client)
   895  	if err != nil {
   896  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesCreateUpdateCassandraKeyspaceFuture", "Result", future.Response(), "Polling failure")
   897  		return
   898  	}
   899  	if !done {
   900  		ckgr.Response.Response = future.Response()
   901  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesCreateUpdateCassandraKeyspaceFuture")
   902  		return
   903  	}
   904  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   905  	if ckgr.Response.Response, err = future.GetResult(sender); err == nil && ckgr.Response.Response.StatusCode != http.StatusNoContent {
   906  		ckgr, err = client.CreateUpdateCassandraKeyspaceResponder(ckgr.Response.Response)
   907  		if err != nil {
   908  			err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesCreateUpdateCassandraKeyspaceFuture", "Result", ckgr.Response.Response, "Failure responding to request")
   909  		}
   910  	}
   911  	return
   912  }
   913  
   914  // CassandraResourcesCreateUpdateCassandraTableFuture an abstraction for monitoring and retrieving the
   915  // results of a long-running operation.
   916  type CassandraResourcesCreateUpdateCassandraTableFuture struct {
   917  	azure.FutureAPI
   918  	// Result returns the result of the asynchronous operation.
   919  	// If the operation has not completed it will return an error.
   920  	Result func(CassandraResourcesClient) (CassandraTableGetResults, error)
   921  }
   922  
   923  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   924  func (future *CassandraResourcesCreateUpdateCassandraTableFuture) UnmarshalJSON(body []byte) error {
   925  	var azFuture azure.Future
   926  	if err := json.Unmarshal(body, &azFuture); err != nil {
   927  		return err
   928  	}
   929  	future.FutureAPI = &azFuture
   930  	future.Result = future.result
   931  	return nil
   932  }
   933  
   934  // result is the default implementation for CassandraResourcesCreateUpdateCassandraTableFuture.Result.
   935  func (future *CassandraResourcesCreateUpdateCassandraTableFuture) result(client CassandraResourcesClient) (ctgr CassandraTableGetResults, err error) {
   936  	var done bool
   937  	done, err = future.DoneWithContext(context.Background(), client)
   938  	if err != nil {
   939  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesCreateUpdateCassandraTableFuture", "Result", future.Response(), "Polling failure")
   940  		return
   941  	}
   942  	if !done {
   943  		ctgr.Response.Response = future.Response()
   944  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesCreateUpdateCassandraTableFuture")
   945  		return
   946  	}
   947  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   948  	if ctgr.Response.Response, err = future.GetResult(sender); err == nil && ctgr.Response.Response.StatusCode != http.StatusNoContent {
   949  		ctgr, err = client.CreateUpdateCassandraTableResponder(ctgr.Response.Response)
   950  		if err != nil {
   951  			err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesCreateUpdateCassandraTableFuture", "Result", ctgr.Response.Response, "Failure responding to request")
   952  		}
   953  	}
   954  	return
   955  }
   956  
   957  // CassandraResourcesDeleteCassandraKeyspaceFuture an abstraction for monitoring and retrieving the results
   958  // of a long-running operation.
   959  type CassandraResourcesDeleteCassandraKeyspaceFuture struct {
   960  	azure.FutureAPI
   961  	// Result returns the result of the asynchronous operation.
   962  	// If the operation has not completed it will return an error.
   963  	Result func(CassandraResourcesClient) (autorest.Response, error)
   964  }
   965  
   966  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   967  func (future *CassandraResourcesDeleteCassandraKeyspaceFuture) UnmarshalJSON(body []byte) error {
   968  	var azFuture azure.Future
   969  	if err := json.Unmarshal(body, &azFuture); err != nil {
   970  		return err
   971  	}
   972  	future.FutureAPI = &azFuture
   973  	future.Result = future.result
   974  	return nil
   975  }
   976  
   977  // result is the default implementation for CassandraResourcesDeleteCassandraKeyspaceFuture.Result.
   978  func (future *CassandraResourcesDeleteCassandraKeyspaceFuture) result(client CassandraResourcesClient) (ar autorest.Response, err error) {
   979  	var done bool
   980  	done, err = future.DoneWithContext(context.Background(), client)
   981  	if err != nil {
   982  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesDeleteCassandraKeyspaceFuture", "Result", future.Response(), "Polling failure")
   983  		return
   984  	}
   985  	if !done {
   986  		ar.Response = future.Response()
   987  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesDeleteCassandraKeyspaceFuture")
   988  		return
   989  	}
   990  	ar.Response = future.Response()
   991  	return
   992  }
   993  
   994  // CassandraResourcesDeleteCassandraTableFuture an abstraction for monitoring and retrieving the results of
   995  // a long-running operation.
   996  type CassandraResourcesDeleteCassandraTableFuture struct {
   997  	azure.FutureAPI
   998  	// Result returns the result of the asynchronous operation.
   999  	// If the operation has not completed it will return an error.
  1000  	Result func(CassandraResourcesClient) (autorest.Response, error)
  1001  }
  1002  
  1003  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1004  func (future *CassandraResourcesDeleteCassandraTableFuture) UnmarshalJSON(body []byte) error {
  1005  	var azFuture azure.Future
  1006  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1007  		return err
  1008  	}
  1009  	future.FutureAPI = &azFuture
  1010  	future.Result = future.result
  1011  	return nil
  1012  }
  1013  
  1014  // result is the default implementation for CassandraResourcesDeleteCassandraTableFuture.Result.
  1015  func (future *CassandraResourcesDeleteCassandraTableFuture) result(client CassandraResourcesClient) (ar autorest.Response, err error) {
  1016  	var done bool
  1017  	done, err = future.DoneWithContext(context.Background(), client)
  1018  	if err != nil {
  1019  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesDeleteCassandraTableFuture", "Result", future.Response(), "Polling failure")
  1020  		return
  1021  	}
  1022  	if !done {
  1023  		ar.Response = future.Response()
  1024  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesDeleteCassandraTableFuture")
  1025  		return
  1026  	}
  1027  	ar.Response = future.Response()
  1028  	return
  1029  }
  1030  
  1031  // CassandraResourcesMigrateCassandraKeyspaceToAutoscaleFuture an abstraction for monitoring and retrieving
  1032  // the results of a long-running operation.
  1033  type CassandraResourcesMigrateCassandraKeyspaceToAutoscaleFuture struct {
  1034  	azure.FutureAPI
  1035  	// Result returns the result of the asynchronous operation.
  1036  	// If the operation has not completed it will return an error.
  1037  	Result func(CassandraResourcesClient) (ThroughputSettingsGetResults, error)
  1038  }
  1039  
  1040  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1041  func (future *CassandraResourcesMigrateCassandraKeyspaceToAutoscaleFuture) UnmarshalJSON(body []byte) error {
  1042  	var azFuture azure.Future
  1043  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1044  		return err
  1045  	}
  1046  	future.FutureAPI = &azFuture
  1047  	future.Result = future.result
  1048  	return nil
  1049  }
  1050  
  1051  // result is the default implementation for CassandraResourcesMigrateCassandraKeyspaceToAutoscaleFuture.Result.
  1052  func (future *CassandraResourcesMigrateCassandraKeyspaceToAutoscaleFuture) result(client CassandraResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  1053  	var done bool
  1054  	done, err = future.DoneWithContext(context.Background(), client)
  1055  	if err != nil {
  1056  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesMigrateCassandraKeyspaceToAutoscaleFuture", "Result", future.Response(), "Polling failure")
  1057  		return
  1058  	}
  1059  	if !done {
  1060  		tsgr.Response.Response = future.Response()
  1061  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesMigrateCassandraKeyspaceToAutoscaleFuture")
  1062  		return
  1063  	}
  1064  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1065  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  1066  		tsgr, err = client.MigrateCassandraKeyspaceToAutoscaleResponder(tsgr.Response.Response)
  1067  		if err != nil {
  1068  			err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesMigrateCassandraKeyspaceToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  1069  		}
  1070  	}
  1071  	return
  1072  }
  1073  
  1074  // CassandraResourcesMigrateCassandraKeyspaceToManualThroughputFuture an abstraction for monitoring and
  1075  // retrieving the results of a long-running operation.
  1076  type CassandraResourcesMigrateCassandraKeyspaceToManualThroughputFuture struct {
  1077  	azure.FutureAPI
  1078  	// Result returns the result of the asynchronous operation.
  1079  	// If the operation has not completed it will return an error.
  1080  	Result func(CassandraResourcesClient) (ThroughputSettingsGetResults, error)
  1081  }
  1082  
  1083  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1084  func (future *CassandraResourcesMigrateCassandraKeyspaceToManualThroughputFuture) UnmarshalJSON(body []byte) error {
  1085  	var azFuture azure.Future
  1086  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1087  		return err
  1088  	}
  1089  	future.FutureAPI = &azFuture
  1090  	future.Result = future.result
  1091  	return nil
  1092  }
  1093  
  1094  // result is the default implementation for CassandraResourcesMigrateCassandraKeyspaceToManualThroughputFuture.Result.
  1095  func (future *CassandraResourcesMigrateCassandraKeyspaceToManualThroughputFuture) result(client CassandraResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  1096  	var done bool
  1097  	done, err = future.DoneWithContext(context.Background(), client)
  1098  	if err != nil {
  1099  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesMigrateCassandraKeyspaceToManualThroughputFuture", "Result", future.Response(), "Polling failure")
  1100  		return
  1101  	}
  1102  	if !done {
  1103  		tsgr.Response.Response = future.Response()
  1104  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesMigrateCassandraKeyspaceToManualThroughputFuture")
  1105  		return
  1106  	}
  1107  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1108  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  1109  		tsgr, err = client.MigrateCassandraKeyspaceToManualThroughputResponder(tsgr.Response.Response)
  1110  		if err != nil {
  1111  			err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesMigrateCassandraKeyspaceToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  1112  		}
  1113  	}
  1114  	return
  1115  }
  1116  
  1117  // CassandraResourcesMigrateCassandraTableToAutoscaleFuture an abstraction for monitoring and retrieving
  1118  // the results of a long-running operation.
  1119  type CassandraResourcesMigrateCassandraTableToAutoscaleFuture struct {
  1120  	azure.FutureAPI
  1121  	// Result returns the result of the asynchronous operation.
  1122  	// If the operation has not completed it will return an error.
  1123  	Result func(CassandraResourcesClient) (ThroughputSettingsGetResults, error)
  1124  }
  1125  
  1126  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1127  func (future *CassandraResourcesMigrateCassandraTableToAutoscaleFuture) UnmarshalJSON(body []byte) error {
  1128  	var azFuture azure.Future
  1129  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1130  		return err
  1131  	}
  1132  	future.FutureAPI = &azFuture
  1133  	future.Result = future.result
  1134  	return nil
  1135  }
  1136  
  1137  // result is the default implementation for CassandraResourcesMigrateCassandraTableToAutoscaleFuture.Result.
  1138  func (future *CassandraResourcesMigrateCassandraTableToAutoscaleFuture) result(client CassandraResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  1139  	var done bool
  1140  	done, err = future.DoneWithContext(context.Background(), client)
  1141  	if err != nil {
  1142  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesMigrateCassandraTableToAutoscaleFuture", "Result", future.Response(), "Polling failure")
  1143  		return
  1144  	}
  1145  	if !done {
  1146  		tsgr.Response.Response = future.Response()
  1147  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesMigrateCassandraTableToAutoscaleFuture")
  1148  		return
  1149  	}
  1150  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1151  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  1152  		tsgr, err = client.MigrateCassandraTableToAutoscaleResponder(tsgr.Response.Response)
  1153  		if err != nil {
  1154  			err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesMigrateCassandraTableToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  1155  		}
  1156  	}
  1157  	return
  1158  }
  1159  
  1160  // CassandraResourcesMigrateCassandraTableToManualThroughputFuture an abstraction for monitoring and
  1161  // retrieving the results of a long-running operation.
  1162  type CassandraResourcesMigrateCassandraTableToManualThroughputFuture struct {
  1163  	azure.FutureAPI
  1164  	// Result returns the result of the asynchronous operation.
  1165  	// If the operation has not completed it will return an error.
  1166  	Result func(CassandraResourcesClient) (ThroughputSettingsGetResults, error)
  1167  }
  1168  
  1169  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1170  func (future *CassandraResourcesMigrateCassandraTableToManualThroughputFuture) UnmarshalJSON(body []byte) error {
  1171  	var azFuture azure.Future
  1172  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1173  		return err
  1174  	}
  1175  	future.FutureAPI = &azFuture
  1176  	future.Result = future.result
  1177  	return nil
  1178  }
  1179  
  1180  // result is the default implementation for CassandraResourcesMigrateCassandraTableToManualThroughputFuture.Result.
  1181  func (future *CassandraResourcesMigrateCassandraTableToManualThroughputFuture) result(client CassandraResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  1182  	var done bool
  1183  	done, err = future.DoneWithContext(context.Background(), client)
  1184  	if err != nil {
  1185  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesMigrateCassandraTableToManualThroughputFuture", "Result", future.Response(), "Polling failure")
  1186  		return
  1187  	}
  1188  	if !done {
  1189  		tsgr.Response.Response = future.Response()
  1190  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesMigrateCassandraTableToManualThroughputFuture")
  1191  		return
  1192  	}
  1193  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1194  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  1195  		tsgr, err = client.MigrateCassandraTableToManualThroughputResponder(tsgr.Response.Response)
  1196  		if err != nil {
  1197  			err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesMigrateCassandraTableToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  1198  		}
  1199  	}
  1200  	return
  1201  }
  1202  
  1203  // CassandraResourcesUpdateCassandraKeyspaceThroughputFuture an abstraction for monitoring and retrieving
  1204  // the results of a long-running operation.
  1205  type CassandraResourcesUpdateCassandraKeyspaceThroughputFuture struct {
  1206  	azure.FutureAPI
  1207  	// Result returns the result of the asynchronous operation.
  1208  	// If the operation has not completed it will return an error.
  1209  	Result func(CassandraResourcesClient) (ThroughputSettingsGetResults, error)
  1210  }
  1211  
  1212  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1213  func (future *CassandraResourcesUpdateCassandraKeyspaceThroughputFuture) UnmarshalJSON(body []byte) error {
  1214  	var azFuture azure.Future
  1215  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1216  		return err
  1217  	}
  1218  	future.FutureAPI = &azFuture
  1219  	future.Result = future.result
  1220  	return nil
  1221  }
  1222  
  1223  // result is the default implementation for CassandraResourcesUpdateCassandraKeyspaceThroughputFuture.Result.
  1224  func (future *CassandraResourcesUpdateCassandraKeyspaceThroughputFuture) result(client CassandraResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  1225  	var done bool
  1226  	done, err = future.DoneWithContext(context.Background(), client)
  1227  	if err != nil {
  1228  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesUpdateCassandraKeyspaceThroughputFuture", "Result", future.Response(), "Polling failure")
  1229  		return
  1230  	}
  1231  	if !done {
  1232  		tsgr.Response.Response = future.Response()
  1233  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesUpdateCassandraKeyspaceThroughputFuture")
  1234  		return
  1235  	}
  1236  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1237  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  1238  		tsgr, err = client.UpdateCassandraKeyspaceThroughputResponder(tsgr.Response.Response)
  1239  		if err != nil {
  1240  			err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesUpdateCassandraKeyspaceThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  1241  		}
  1242  	}
  1243  	return
  1244  }
  1245  
  1246  // CassandraResourcesUpdateCassandraTableThroughputFuture an abstraction for monitoring and retrieving the
  1247  // results of a long-running operation.
  1248  type CassandraResourcesUpdateCassandraTableThroughputFuture struct {
  1249  	azure.FutureAPI
  1250  	// Result returns the result of the asynchronous operation.
  1251  	// If the operation has not completed it will return an error.
  1252  	Result func(CassandraResourcesClient) (ThroughputSettingsGetResults, error)
  1253  }
  1254  
  1255  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1256  func (future *CassandraResourcesUpdateCassandraTableThroughputFuture) UnmarshalJSON(body []byte) error {
  1257  	var azFuture azure.Future
  1258  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1259  		return err
  1260  	}
  1261  	future.FutureAPI = &azFuture
  1262  	future.Result = future.result
  1263  	return nil
  1264  }
  1265  
  1266  // result is the default implementation for CassandraResourcesUpdateCassandraTableThroughputFuture.Result.
  1267  func (future *CassandraResourcesUpdateCassandraTableThroughputFuture) result(client CassandraResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  1268  	var done bool
  1269  	done, err = future.DoneWithContext(context.Background(), client)
  1270  	if err != nil {
  1271  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesUpdateCassandraTableThroughputFuture", "Result", future.Response(), "Polling failure")
  1272  		return
  1273  	}
  1274  	if !done {
  1275  		tsgr.Response.Response = future.Response()
  1276  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesUpdateCassandraTableThroughputFuture")
  1277  		return
  1278  	}
  1279  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1280  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  1281  		tsgr, err = client.UpdateCassandraTableThroughputResponder(tsgr.Response.Response)
  1282  		if err != nil {
  1283  			err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesUpdateCassandraTableThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  1284  		}
  1285  	}
  1286  	return
  1287  }
  1288  
  1289  // CassandraSchema cosmos DB Cassandra table schema
  1290  type CassandraSchema struct {
  1291  	// Columns - List of Cassandra table columns.
  1292  	Columns *[]Column `json:"columns,omitempty"`
  1293  	// PartitionKeys - List of partition key.
  1294  	PartitionKeys *[]CassandraPartitionKey `json:"partitionKeys,omitempty"`
  1295  	// ClusterKeys - List of cluster key.
  1296  	ClusterKeys *[]ClusterKey `json:"clusterKeys,omitempty"`
  1297  }
  1298  
  1299  // CassandraTableCreateUpdateParameters parameters to create and update Cosmos DB Cassandra table.
  1300  type CassandraTableCreateUpdateParameters struct {
  1301  	// CassandraTableCreateUpdateProperties - Properties to create and update Azure Cosmos DB Cassandra table.
  1302  	*CassandraTableCreateUpdateProperties `json:"properties,omitempty"`
  1303  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  1304  	ID *string `json:"id,omitempty"`
  1305  	// Name - READ-ONLY; The name of the ARM resource.
  1306  	Name *string `json:"name,omitempty"`
  1307  	// Type - READ-ONLY; The type of Azure resource.
  1308  	Type *string `json:"type,omitempty"`
  1309  	// Location - The location of the resource group to which the resource belongs.
  1310  	Location *string                 `json:"location,omitempty"`
  1311  	Tags     map[string]*string      `json:"tags"`
  1312  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
  1313  }
  1314  
  1315  // MarshalJSON is the custom marshaler for CassandraTableCreateUpdateParameters.
  1316  func (ctcup CassandraTableCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  1317  	objectMap := make(map[string]interface{})
  1318  	if ctcup.CassandraTableCreateUpdateProperties != nil {
  1319  		objectMap["properties"] = ctcup.CassandraTableCreateUpdateProperties
  1320  	}
  1321  	if ctcup.Location != nil {
  1322  		objectMap["location"] = ctcup.Location
  1323  	}
  1324  	if ctcup.Tags != nil {
  1325  		objectMap["tags"] = ctcup.Tags
  1326  	}
  1327  	if ctcup.Identity != nil {
  1328  		objectMap["identity"] = ctcup.Identity
  1329  	}
  1330  	return json.Marshal(objectMap)
  1331  }
  1332  
  1333  // UnmarshalJSON is the custom unmarshaler for CassandraTableCreateUpdateParameters struct.
  1334  func (ctcup *CassandraTableCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  1335  	var m map[string]*json.RawMessage
  1336  	err := json.Unmarshal(body, &m)
  1337  	if err != nil {
  1338  		return err
  1339  	}
  1340  	for k, v := range m {
  1341  		switch k {
  1342  		case "properties":
  1343  			if v != nil {
  1344  				var cassandraTableCreateUpdateProperties CassandraTableCreateUpdateProperties
  1345  				err = json.Unmarshal(*v, &cassandraTableCreateUpdateProperties)
  1346  				if err != nil {
  1347  					return err
  1348  				}
  1349  				ctcup.CassandraTableCreateUpdateProperties = &cassandraTableCreateUpdateProperties
  1350  			}
  1351  		case "id":
  1352  			if v != nil {
  1353  				var ID string
  1354  				err = json.Unmarshal(*v, &ID)
  1355  				if err != nil {
  1356  					return err
  1357  				}
  1358  				ctcup.ID = &ID
  1359  			}
  1360  		case "name":
  1361  			if v != nil {
  1362  				var name string
  1363  				err = json.Unmarshal(*v, &name)
  1364  				if err != nil {
  1365  					return err
  1366  				}
  1367  				ctcup.Name = &name
  1368  			}
  1369  		case "type":
  1370  			if v != nil {
  1371  				var typeVar string
  1372  				err = json.Unmarshal(*v, &typeVar)
  1373  				if err != nil {
  1374  					return err
  1375  				}
  1376  				ctcup.Type = &typeVar
  1377  			}
  1378  		case "location":
  1379  			if v != nil {
  1380  				var location string
  1381  				err = json.Unmarshal(*v, &location)
  1382  				if err != nil {
  1383  					return err
  1384  				}
  1385  				ctcup.Location = &location
  1386  			}
  1387  		case "tags":
  1388  			if v != nil {
  1389  				var tags map[string]*string
  1390  				err = json.Unmarshal(*v, &tags)
  1391  				if err != nil {
  1392  					return err
  1393  				}
  1394  				ctcup.Tags = tags
  1395  			}
  1396  		case "identity":
  1397  			if v != nil {
  1398  				var identity ManagedServiceIdentity
  1399  				err = json.Unmarshal(*v, &identity)
  1400  				if err != nil {
  1401  					return err
  1402  				}
  1403  				ctcup.Identity = &identity
  1404  			}
  1405  		}
  1406  	}
  1407  
  1408  	return nil
  1409  }
  1410  
  1411  // CassandraTableCreateUpdateProperties properties to create and update Azure Cosmos DB Cassandra table.
  1412  type CassandraTableCreateUpdateProperties struct {
  1413  	// Resource - The standard JSON format of a Cassandra table
  1414  	Resource *CassandraTableResource `json:"resource,omitempty"`
  1415  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
  1416  	Options *CreateUpdateOptions `json:"options,omitempty"`
  1417  }
  1418  
  1419  // CassandraTableGetProperties the properties of an Azure Cosmos DB Cassandra table
  1420  type CassandraTableGetProperties struct {
  1421  	Resource *CassandraTableGetPropertiesResource `json:"resource,omitempty"`
  1422  	Options  *CassandraTableGetPropertiesOptions  `json:"options,omitempty"`
  1423  }
  1424  
  1425  // CassandraTableGetPropertiesOptions ...
  1426  type CassandraTableGetPropertiesOptions struct {
  1427  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
  1428  	Throughput *int32 `json:"throughput,omitempty"`
  1429  	// AutoscaleSettings - Specifies the Autoscale settings.
  1430  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  1431  }
  1432  
  1433  // CassandraTableGetPropertiesResource ...
  1434  type CassandraTableGetPropertiesResource struct {
  1435  	// ID - Name of the Cosmos DB Cassandra table
  1436  	ID *string `json:"id,omitempty"`
  1437  	// DefaultTTL - Time to live of the Cosmos DB Cassandra table
  1438  	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
  1439  	// Schema - Schema of the Cosmos DB Cassandra table
  1440  	Schema *CassandraSchema `json:"schema,omitempty"`
  1441  	// AnalyticalStorageTTL - Analytical TTL.
  1442  	AnalyticalStorageTTL *int32 `json:"analyticalStorageTtl,omitempty"`
  1443  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  1444  	Rid *string `json:"_rid,omitempty"`
  1445  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  1446  	Ts *float64 `json:"_ts,omitempty"`
  1447  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  1448  	Etag *string `json:"_etag,omitempty"`
  1449  }
  1450  
  1451  // MarshalJSON is the custom marshaler for CassandraTableGetPropertiesResource.
  1452  func (ctgp CassandraTableGetPropertiesResource) MarshalJSON() ([]byte, error) {
  1453  	objectMap := make(map[string]interface{})
  1454  	if ctgp.ID != nil {
  1455  		objectMap["id"] = ctgp.ID
  1456  	}
  1457  	if ctgp.DefaultTTL != nil {
  1458  		objectMap["defaultTtl"] = ctgp.DefaultTTL
  1459  	}
  1460  	if ctgp.Schema != nil {
  1461  		objectMap["schema"] = ctgp.Schema
  1462  	}
  1463  	if ctgp.AnalyticalStorageTTL != nil {
  1464  		objectMap["analyticalStorageTtl"] = ctgp.AnalyticalStorageTTL
  1465  	}
  1466  	return json.Marshal(objectMap)
  1467  }
  1468  
  1469  // CassandraTableGetResults an Azure Cosmos DB Cassandra table.
  1470  type CassandraTableGetResults struct {
  1471  	autorest.Response `json:"-"`
  1472  	// CassandraTableGetProperties - The properties of an Azure Cosmos DB Cassandra table
  1473  	*CassandraTableGetProperties `json:"properties,omitempty"`
  1474  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  1475  	ID *string `json:"id,omitempty"`
  1476  	// Name - READ-ONLY; The name of the ARM resource.
  1477  	Name *string `json:"name,omitempty"`
  1478  	// Type - READ-ONLY; The type of Azure resource.
  1479  	Type *string `json:"type,omitempty"`
  1480  	// Location - The location of the resource group to which the resource belongs.
  1481  	Location *string                 `json:"location,omitempty"`
  1482  	Tags     map[string]*string      `json:"tags"`
  1483  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
  1484  }
  1485  
  1486  // MarshalJSON is the custom marshaler for CassandraTableGetResults.
  1487  func (ctgr CassandraTableGetResults) MarshalJSON() ([]byte, error) {
  1488  	objectMap := make(map[string]interface{})
  1489  	if ctgr.CassandraTableGetProperties != nil {
  1490  		objectMap["properties"] = ctgr.CassandraTableGetProperties
  1491  	}
  1492  	if ctgr.Location != nil {
  1493  		objectMap["location"] = ctgr.Location
  1494  	}
  1495  	if ctgr.Tags != nil {
  1496  		objectMap["tags"] = ctgr.Tags
  1497  	}
  1498  	if ctgr.Identity != nil {
  1499  		objectMap["identity"] = ctgr.Identity
  1500  	}
  1501  	return json.Marshal(objectMap)
  1502  }
  1503  
  1504  // UnmarshalJSON is the custom unmarshaler for CassandraTableGetResults struct.
  1505  func (ctgr *CassandraTableGetResults) UnmarshalJSON(body []byte) error {
  1506  	var m map[string]*json.RawMessage
  1507  	err := json.Unmarshal(body, &m)
  1508  	if err != nil {
  1509  		return err
  1510  	}
  1511  	for k, v := range m {
  1512  		switch k {
  1513  		case "properties":
  1514  			if v != nil {
  1515  				var cassandraTableGetProperties CassandraTableGetProperties
  1516  				err = json.Unmarshal(*v, &cassandraTableGetProperties)
  1517  				if err != nil {
  1518  					return err
  1519  				}
  1520  				ctgr.CassandraTableGetProperties = &cassandraTableGetProperties
  1521  			}
  1522  		case "id":
  1523  			if v != nil {
  1524  				var ID string
  1525  				err = json.Unmarshal(*v, &ID)
  1526  				if err != nil {
  1527  					return err
  1528  				}
  1529  				ctgr.ID = &ID
  1530  			}
  1531  		case "name":
  1532  			if v != nil {
  1533  				var name string
  1534  				err = json.Unmarshal(*v, &name)
  1535  				if err != nil {
  1536  					return err
  1537  				}
  1538  				ctgr.Name = &name
  1539  			}
  1540  		case "type":
  1541  			if v != nil {
  1542  				var typeVar string
  1543  				err = json.Unmarshal(*v, &typeVar)
  1544  				if err != nil {
  1545  					return err
  1546  				}
  1547  				ctgr.Type = &typeVar
  1548  			}
  1549  		case "location":
  1550  			if v != nil {
  1551  				var location string
  1552  				err = json.Unmarshal(*v, &location)
  1553  				if err != nil {
  1554  					return err
  1555  				}
  1556  				ctgr.Location = &location
  1557  			}
  1558  		case "tags":
  1559  			if v != nil {
  1560  				var tags map[string]*string
  1561  				err = json.Unmarshal(*v, &tags)
  1562  				if err != nil {
  1563  					return err
  1564  				}
  1565  				ctgr.Tags = tags
  1566  			}
  1567  		case "identity":
  1568  			if v != nil {
  1569  				var identity ManagedServiceIdentity
  1570  				err = json.Unmarshal(*v, &identity)
  1571  				if err != nil {
  1572  					return err
  1573  				}
  1574  				ctgr.Identity = &identity
  1575  			}
  1576  		}
  1577  	}
  1578  
  1579  	return nil
  1580  }
  1581  
  1582  // CassandraTableListResult the List operation response, that contains the Cassandra tables and their
  1583  // properties.
  1584  type CassandraTableListResult struct {
  1585  	autorest.Response `json:"-"`
  1586  	// Value - READ-ONLY; List of Cassandra tables and their properties.
  1587  	Value *[]CassandraTableGetResults `json:"value,omitempty"`
  1588  }
  1589  
  1590  // MarshalJSON is the custom marshaler for CassandraTableListResult.
  1591  func (ctlr CassandraTableListResult) MarshalJSON() ([]byte, error) {
  1592  	objectMap := make(map[string]interface{})
  1593  	return json.Marshal(objectMap)
  1594  }
  1595  
  1596  // CassandraTableResource cosmos DB Cassandra table resource object
  1597  type CassandraTableResource struct {
  1598  	// ID - Name of the Cosmos DB Cassandra table
  1599  	ID *string `json:"id,omitempty"`
  1600  	// DefaultTTL - Time to live of the Cosmos DB Cassandra table
  1601  	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
  1602  	// Schema - Schema of the Cosmos DB Cassandra table
  1603  	Schema *CassandraSchema `json:"schema,omitempty"`
  1604  	// AnalyticalStorageTTL - Analytical TTL.
  1605  	AnalyticalStorageTTL *int32 `json:"analyticalStorageTtl,omitempty"`
  1606  }
  1607  
  1608  // Certificate ...
  1609  type Certificate struct {
  1610  	// Pem - PEM formatted public key.
  1611  	Pem *string `json:"pem,omitempty"`
  1612  }
  1613  
  1614  // CloudError an error response from the service.
  1615  type CloudError struct {
  1616  	Error *ErrorResponse `json:"error,omitempty"`
  1617  }
  1618  
  1619  // ClusterKey cosmos DB Cassandra table cluster key
  1620  type ClusterKey struct {
  1621  	// Name - Name of the Cosmos DB Cassandra table cluster key
  1622  	Name *string `json:"name,omitempty"`
  1623  	// OrderBy - Order of the Cosmos DB Cassandra table cluster key, only support "Asc" and "Desc"
  1624  	OrderBy *string `json:"orderBy,omitempty"`
  1625  }
  1626  
  1627  // ClusterNodeStatus the status of all nodes in the cluster (as returned by 'nodetool status').
  1628  type ClusterNodeStatus struct {
  1629  	autorest.Response `json:"-"`
  1630  	// Nodes - Information about nodes in the cluster (corresponds to what is returned from nodetool info).
  1631  	Nodes *[]ClusterNodeStatusNodesItem `json:"nodes,omitempty"`
  1632  }
  1633  
  1634  // ClusterNodeStatusNodesItem ...
  1635  type ClusterNodeStatusNodesItem struct {
  1636  	// Datacenter - The Cassandra data center this node resides in.
  1637  	Datacenter *string `json:"datacenter,omitempty"`
  1638  	// Status - Indicates whether the node is functioning or not. Possible values include: 'NodeStatusUp', 'NodeStatusDown'
  1639  	Status NodeStatus `json:"status,omitempty"`
  1640  	// State - The state of the node in relation to the cluster. Possible values include: 'NodeStateNormal', 'NodeStateLeaving', 'NodeStateJoining', 'NodeStateMoving', 'NodeStateStopped'
  1641  	State NodeState `json:"state,omitempty"`
  1642  	// Address - The node's URL.
  1643  	Address *string `json:"address,omitempty"`
  1644  	// Load - The amount of file system data in the data directory (e.g., 47.66 KB), excluding all content in the snapshots subdirectories. Because all SSTable data files are included, any data that is not cleaned up (such as TTL-expired cell or tombstoned data) is counted.
  1645  	Load *string `json:"load,omitempty"`
  1646  	// Tokens - List of tokens.
  1647  	Tokens *[]string `json:"tokens,omitempty"`
  1648  	// Owns - The percentage of the data owned by the node per datacenter times the replication factor (e.g., 33.3, or null if the data is not available). For example, a node can own 33% of the ring, but shows 100% if the replication factor is 3. For non-system keyspaces, the endpoint percentage ownership information is shown.
  1649  	Owns *float64 `json:"owns,omitempty"`
  1650  	// HostID - The network ID of the node.
  1651  	HostID *string `json:"hostId,omitempty"`
  1652  	// Rack - The rack this node is part of.
  1653  	Rack *string `json:"rack,omitempty"`
  1654  }
  1655  
  1656  // ClusterResource representation of a managed Cassandra cluster.
  1657  type ClusterResource struct {
  1658  	autorest.Response `json:"-"`
  1659  	// Properties - Properties of a managed Cassandra cluster.
  1660  	Properties *ClusterResourceProperties `json:"properties,omitempty"`
  1661  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  1662  	ID *string `json:"id,omitempty"`
  1663  	// Name - READ-ONLY; The name of the ARM resource.
  1664  	Name *string `json:"name,omitempty"`
  1665  	// Type - READ-ONLY; The type of Azure resource.
  1666  	Type *string `json:"type,omitempty"`
  1667  	// Location - The location of the resource group to which the resource belongs.
  1668  	Location *string                 `json:"location,omitempty"`
  1669  	Tags     map[string]*string      `json:"tags"`
  1670  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
  1671  }
  1672  
  1673  // MarshalJSON is the custom marshaler for ClusterResource.
  1674  func (cr ClusterResource) MarshalJSON() ([]byte, error) {
  1675  	objectMap := make(map[string]interface{})
  1676  	if cr.Properties != nil {
  1677  		objectMap["properties"] = cr.Properties
  1678  	}
  1679  	if cr.Location != nil {
  1680  		objectMap["location"] = cr.Location
  1681  	}
  1682  	if cr.Tags != nil {
  1683  		objectMap["tags"] = cr.Tags
  1684  	}
  1685  	if cr.Identity != nil {
  1686  		objectMap["identity"] = cr.Identity
  1687  	}
  1688  	return json.Marshal(objectMap)
  1689  }
  1690  
  1691  // ClusterResourceProperties properties of a managed Cassandra cluster.
  1692  type ClusterResourceProperties struct {
  1693  	// ProvisioningState - Possible values include: 'ManagedCassandraProvisioningStateCreating', 'ManagedCassandraProvisioningStateUpdating', 'ManagedCassandraProvisioningStateDeleting', 'ManagedCassandraProvisioningStateSucceeded', 'ManagedCassandraProvisioningStateFailed', 'ManagedCassandraProvisioningStateCanceled'
  1694  	ProvisioningState ManagedCassandraProvisioningState `json:"provisioningState,omitempty"`
  1695  	// RestoreFromBackupID - To create an empty cluster, omit this field or set it to null. To restore a backup into a new cluster, set this field to the resource id of the backup.
  1696  	RestoreFromBackupID *string `json:"restoreFromBackupId,omitempty"`
  1697  	// DelegatedManagementSubnetID - Resource id of a subnet that this cluster's management service should have its network interface attached to. The subnet must be routable to all subnets that will be delegated to data centers. The resource id must be of the form '/subscriptions/<subscription id>/resourceGroups/<resource group>/providers/Microsoft.Network/virtualNetworks/<virtual network>/subnets/<subnet>'
  1698  	DelegatedManagementSubnetID *string `json:"delegatedManagementSubnetId,omitempty"`
  1699  	// CassandraVersion - Which version of Cassandra should this cluster converge to running (e.g., 3.11). When updated, the cluster may take some time to migrate to the new version.
  1700  	CassandraVersion *string `json:"cassandraVersion,omitempty"`
  1701  	// ClusterNameOverride - If you need to set the clusterName property in cassandra.yaml to something besides the resource name of the cluster, set the value to use on this property.
  1702  	ClusterNameOverride *string `json:"clusterNameOverride,omitempty"`
  1703  	// AuthenticationMethod - Which authentication method Cassandra should use to authenticate clients. 'None' turns off authentication, so should not be used except in emergencies. 'Cassandra' is the default password based authentication. The default is 'Cassandra'. Possible values include: 'AuthenticationMethodNone', 'AuthenticationMethodCassandra'
  1704  	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
  1705  	// InitialCassandraAdminPassword - Initial password for clients connecting as admin to the cluster. Should be changed after cluster creation. Returns null on GET. This field only applies when the authenticationMethod field is 'Cassandra'.
  1706  	InitialCassandraAdminPassword *string `json:"initialCassandraAdminPassword,omitempty"`
  1707  	// HoursBetweenBackups - Number of hours to wait between taking a backup of the cluster. To disable backups, set this property to 0.
  1708  	HoursBetweenBackups *int32 `json:"hoursBetweenBackups,omitempty"`
  1709  	// PrometheusEndpoint - Hostname or IP address where the Prometheus endpoint containing data about the managed Cassandra nodes can be reached.
  1710  	PrometheusEndpoint *SeedNode `json:"prometheusEndpoint,omitempty"`
  1711  	// RepairEnabled - Should automatic repairs run on this cluster? If omitted, this is true, and should stay true unless you are running a hybrid cluster where you are already doing your own repairs.
  1712  	RepairEnabled *bool `json:"repairEnabled,omitempty"`
  1713  	// ClientCertificates - List of TLS certificates used to authorize clients connecting to the cluster. All connections are TLS encrypted whether clientCertificates is set or not, but if clientCertificates is set, the managed Cassandra cluster will reject all connections not bearing a TLS client certificate that can be validated from one or more of the public certificates in this property.
  1714  	ClientCertificates *[]Certificate `json:"clientCertificates,omitempty"`
  1715  	// ExternalGossipCertificates - List of TLS certificates used to authorize gossip from unmanaged data centers. The TLS certificates of all nodes in unmanaged data centers must be verifiable using one of the certificates provided in this property.
  1716  	ExternalGossipCertificates *[]Certificate `json:"externalGossipCertificates,omitempty"`
  1717  	// GossipCertificates - READ-ONLY; List of TLS certificates that unmanaged nodes must trust for gossip with managed nodes. All managed nodes will present TLS client certificates that are verifiable using one of the certificates provided in this property.
  1718  	GossipCertificates *[]Certificate `json:"gossipCertificates,omitempty"`
  1719  	// ExternalSeedNodes - List of IP addresses of seed nodes in unmanaged data centers. These will be added to the seed node lists of all managed nodes.
  1720  	ExternalSeedNodes *[]SeedNode `json:"externalSeedNodes,omitempty"`
  1721  	// SeedNodes - READ-ONLY; List of IP addresses of seed nodes in the managed data centers. These should be added to the seed node lists of all unmanaged nodes.
  1722  	SeedNodes *[]SeedNode `json:"seedNodes,omitempty"`
  1723  }
  1724  
  1725  // MarshalJSON is the custom marshaler for ClusterResourceProperties.
  1726  func (cr ClusterResourceProperties) MarshalJSON() ([]byte, error) {
  1727  	objectMap := make(map[string]interface{})
  1728  	if cr.ProvisioningState != "" {
  1729  		objectMap["provisioningState"] = cr.ProvisioningState
  1730  	}
  1731  	if cr.RestoreFromBackupID != nil {
  1732  		objectMap["restoreFromBackupId"] = cr.RestoreFromBackupID
  1733  	}
  1734  	if cr.DelegatedManagementSubnetID != nil {
  1735  		objectMap["delegatedManagementSubnetId"] = cr.DelegatedManagementSubnetID
  1736  	}
  1737  	if cr.CassandraVersion != nil {
  1738  		objectMap["cassandraVersion"] = cr.CassandraVersion
  1739  	}
  1740  	if cr.ClusterNameOverride != nil {
  1741  		objectMap["clusterNameOverride"] = cr.ClusterNameOverride
  1742  	}
  1743  	if cr.AuthenticationMethod != "" {
  1744  		objectMap["authenticationMethod"] = cr.AuthenticationMethod
  1745  	}
  1746  	if cr.InitialCassandraAdminPassword != nil {
  1747  		objectMap["initialCassandraAdminPassword"] = cr.InitialCassandraAdminPassword
  1748  	}
  1749  	if cr.HoursBetweenBackups != nil {
  1750  		objectMap["hoursBetweenBackups"] = cr.HoursBetweenBackups
  1751  	}
  1752  	if cr.PrometheusEndpoint != nil {
  1753  		objectMap["prometheusEndpoint"] = cr.PrometheusEndpoint
  1754  	}
  1755  	if cr.RepairEnabled != nil {
  1756  		objectMap["repairEnabled"] = cr.RepairEnabled
  1757  	}
  1758  	if cr.ClientCertificates != nil {
  1759  		objectMap["clientCertificates"] = cr.ClientCertificates
  1760  	}
  1761  	if cr.ExternalGossipCertificates != nil {
  1762  		objectMap["externalGossipCertificates"] = cr.ExternalGossipCertificates
  1763  	}
  1764  	if cr.ExternalSeedNodes != nil {
  1765  		objectMap["externalSeedNodes"] = cr.ExternalSeedNodes
  1766  	}
  1767  	return json.Marshal(objectMap)
  1768  }
  1769  
  1770  // Column cosmos DB Cassandra table column
  1771  type Column struct {
  1772  	// Name - Name of the Cosmos DB Cassandra table column
  1773  	Name *string `json:"name,omitempty"`
  1774  	// Type - Type of the Cosmos DB Cassandra table column
  1775  	Type *string `json:"type,omitempty"`
  1776  }
  1777  
  1778  // CompositePath ...
  1779  type CompositePath struct {
  1780  	// Path - The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*)
  1781  	Path *string `json:"path,omitempty"`
  1782  	// Order - Sort order for composite paths. Possible values include: 'CompositePathSortOrderAscending', 'CompositePathSortOrderDescending'
  1783  	Order CompositePathSortOrder `json:"order,omitempty"`
  1784  }
  1785  
  1786  // ConflictResolutionPolicy the conflict resolution policy for the container.
  1787  type ConflictResolutionPolicy struct {
  1788  	// Mode - Indicates the conflict resolution mode. Possible values include: 'ConflictResolutionModeLastWriterWins', 'ConflictResolutionModeCustom'
  1789  	Mode ConflictResolutionMode `json:"mode,omitempty"`
  1790  	// ConflictResolutionPath - The conflict resolution path in the case of LastWriterWins mode.
  1791  	ConflictResolutionPath *string `json:"conflictResolutionPath,omitempty"`
  1792  	// ConflictResolutionProcedure - The procedure to resolve conflicts in the case of custom mode.
  1793  	ConflictResolutionProcedure *string `json:"conflictResolutionProcedure,omitempty"`
  1794  }
  1795  
  1796  // ConsistencyPolicy the consistency policy for the Cosmos DB database account.
  1797  type ConsistencyPolicy struct {
  1798  	// DefaultConsistencyLevel - The default consistency level and configuration settings of the Cosmos DB account. Possible values include: 'DefaultConsistencyLevelEventual', 'DefaultConsistencyLevelSession', 'DefaultConsistencyLevelBoundedStaleness', 'DefaultConsistencyLevelStrong', 'DefaultConsistencyLevelConsistentPrefix'
  1799  	DefaultConsistencyLevel DefaultConsistencyLevel `json:"defaultConsistencyLevel,omitempty"`
  1800  	// MaxStalenessPrefix - When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'.
  1801  	MaxStalenessPrefix *int64 `json:"maxStalenessPrefix,omitempty"`
  1802  	// MaxIntervalInSeconds - When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'.
  1803  	MaxIntervalInSeconds *int32 `json:"maxIntervalInSeconds,omitempty"`
  1804  }
  1805  
  1806  // ContainerPartitionKey the configuration of the partition key to be used for partitioning data into
  1807  // multiple partitions
  1808  type ContainerPartitionKey struct {
  1809  	// Paths - List of paths using which data within the container can be partitioned
  1810  	Paths *[]string `json:"paths,omitempty"`
  1811  	// Kind - Indicates the kind of algorithm used for partitioning. For MultiHash, multiple partition keys (upto three maximum) are supported for container create. Possible values include: 'PartitionKindHash', 'PartitionKindRange', 'PartitionKindMultiHash'
  1812  	Kind PartitionKind `json:"kind,omitempty"`
  1813  	// Version - Indicates the version of the partition key definition
  1814  	Version *int32 `json:"version,omitempty"`
  1815  	// SystemKey - READ-ONLY; Indicates if the container is using a system generated partition key
  1816  	SystemKey *bool `json:"systemKey,omitempty"`
  1817  }
  1818  
  1819  // MarshalJSON is the custom marshaler for ContainerPartitionKey.
  1820  func (cpk ContainerPartitionKey) MarshalJSON() ([]byte, error) {
  1821  	objectMap := make(map[string]interface{})
  1822  	if cpk.Paths != nil {
  1823  		objectMap["paths"] = cpk.Paths
  1824  	}
  1825  	if cpk.Kind != "" {
  1826  		objectMap["kind"] = cpk.Kind
  1827  	}
  1828  	if cpk.Version != nil {
  1829  		objectMap["version"] = cpk.Version
  1830  	}
  1831  	return json.Marshal(objectMap)
  1832  }
  1833  
  1834  // ContinuousBackupInformation continuous backup description.
  1835  type ContinuousBackupInformation struct {
  1836  	// LatestRestorableTimestamp - The latest restorable timestamp for a resource.
  1837  	LatestRestorableTimestamp *string `json:"latestRestorableTimestamp,omitempty"`
  1838  }
  1839  
  1840  // ContinuousBackupRestoreLocation properties of the regional restorable account.
  1841  type ContinuousBackupRestoreLocation struct {
  1842  	// Location - The name of the continuous backup restore location.
  1843  	Location *string `json:"location,omitempty"`
  1844  }
  1845  
  1846  // ContinuousModeBackupPolicy the object representing continuous mode backup policy.
  1847  type ContinuousModeBackupPolicy struct {
  1848  	// Type - Possible values include: 'TypeBackupPolicy', 'TypePeriodic', 'TypeContinuous'
  1849  	Type Type `json:"type,omitempty"`
  1850  }
  1851  
  1852  // MarshalJSON is the custom marshaler for ContinuousModeBackupPolicy.
  1853  func (cmbp ContinuousModeBackupPolicy) MarshalJSON() ([]byte, error) {
  1854  	cmbp.Type = TypeContinuous
  1855  	objectMap := make(map[string]interface{})
  1856  	if cmbp.Type != "" {
  1857  		objectMap["type"] = cmbp.Type
  1858  	}
  1859  	return json.Marshal(objectMap)
  1860  }
  1861  
  1862  // AsPeriodicModeBackupPolicy is the BasicBackupPolicy implementation for ContinuousModeBackupPolicy.
  1863  func (cmbp ContinuousModeBackupPolicy) AsPeriodicModeBackupPolicy() (*PeriodicModeBackupPolicy, bool) {
  1864  	return nil, false
  1865  }
  1866  
  1867  // AsContinuousModeBackupPolicy is the BasicBackupPolicy implementation for ContinuousModeBackupPolicy.
  1868  func (cmbp ContinuousModeBackupPolicy) AsContinuousModeBackupPolicy() (*ContinuousModeBackupPolicy, bool) {
  1869  	return &cmbp, true
  1870  }
  1871  
  1872  // AsBackupPolicy is the BasicBackupPolicy implementation for ContinuousModeBackupPolicy.
  1873  func (cmbp ContinuousModeBackupPolicy) AsBackupPolicy() (*BackupPolicy, bool) {
  1874  	return nil, false
  1875  }
  1876  
  1877  // AsBasicBackupPolicy is the BasicBackupPolicy implementation for ContinuousModeBackupPolicy.
  1878  func (cmbp ContinuousModeBackupPolicy) AsBasicBackupPolicy() (BasicBackupPolicy, bool) {
  1879  	return &cmbp, true
  1880  }
  1881  
  1882  // CorsPolicy the CORS policy for the Cosmos DB database account.
  1883  type CorsPolicy struct {
  1884  	// AllowedOrigins - The origin domains that are permitted to make a request against the service via CORS.
  1885  	AllowedOrigins *string `json:"allowedOrigins,omitempty"`
  1886  	// AllowedMethods - The methods (HTTP request verbs) that the origin domain may use for a CORS request.
  1887  	AllowedMethods *string `json:"allowedMethods,omitempty"`
  1888  	// AllowedHeaders - The request headers that the origin domain may specify on the CORS request.
  1889  	AllowedHeaders *string `json:"allowedHeaders,omitempty"`
  1890  	// ExposedHeaders - The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer.
  1891  	ExposedHeaders *string `json:"exposedHeaders,omitempty"`
  1892  	// MaxAgeInSeconds - The maximum amount time that a browser should cache the preflight OPTIONS request.
  1893  	MaxAgeInSeconds *int64 `json:"maxAgeInSeconds,omitempty"`
  1894  }
  1895  
  1896  // CreateUpdateOptions createUpdateOptions are a list of key-value pairs that describe the resource.
  1897  // Supported keys are "If-Match", "If-None-Match", "Session-Token" and "Throughput"
  1898  type CreateUpdateOptions struct {
  1899  	// Throughput - Request Units per second. For example, "throughput": 10000.
  1900  	Throughput *int32 `json:"throughput,omitempty"`
  1901  	// AutoscaleSettings - Specifies the Autoscale settings.
  1902  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  1903  }
  1904  
  1905  // DatabaseAccountConnectionString connection string for the Cosmos DB account
  1906  type DatabaseAccountConnectionString struct {
  1907  	// ConnectionString - READ-ONLY; Value of the connection string
  1908  	ConnectionString *string `json:"connectionString,omitempty"`
  1909  	// Description - READ-ONLY; Description of the connection string
  1910  	Description *string `json:"description,omitempty"`
  1911  }
  1912  
  1913  // MarshalJSON is the custom marshaler for DatabaseAccountConnectionString.
  1914  func (dacs DatabaseAccountConnectionString) MarshalJSON() ([]byte, error) {
  1915  	objectMap := make(map[string]interface{})
  1916  	return json.Marshal(objectMap)
  1917  }
  1918  
  1919  // DatabaseAccountCreateUpdateParameters parameters to create and update Cosmos DB database accounts.
  1920  type DatabaseAccountCreateUpdateParameters struct {
  1921  	// Kind - Indicates the type of database account. This can only be set at database account creation. Possible values include: 'DatabaseAccountKindGlobalDocumentDB', 'DatabaseAccountKindMongoDB', 'DatabaseAccountKindParse'
  1922  	Kind       DatabaseAccountKind                        `json:"kind,omitempty"`
  1923  	Properties BasicDatabaseAccountCreateUpdateProperties `json:"properties,omitempty"`
  1924  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  1925  	ID *string `json:"id,omitempty"`
  1926  	// Name - READ-ONLY; The name of the ARM resource.
  1927  	Name *string `json:"name,omitempty"`
  1928  	// Type - READ-ONLY; The type of Azure resource.
  1929  	Type *string `json:"type,omitempty"`
  1930  	// Location - The location of the resource group to which the resource belongs.
  1931  	Location *string                 `json:"location,omitempty"`
  1932  	Tags     map[string]*string      `json:"tags"`
  1933  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
  1934  }
  1935  
  1936  // MarshalJSON is the custom marshaler for DatabaseAccountCreateUpdateParameters.
  1937  func (dacup DatabaseAccountCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  1938  	objectMap := make(map[string]interface{})
  1939  	if dacup.Kind != "" {
  1940  		objectMap["kind"] = dacup.Kind
  1941  	}
  1942  	objectMap["properties"] = dacup.Properties
  1943  	if dacup.Location != nil {
  1944  		objectMap["location"] = dacup.Location
  1945  	}
  1946  	if dacup.Tags != nil {
  1947  		objectMap["tags"] = dacup.Tags
  1948  	}
  1949  	if dacup.Identity != nil {
  1950  		objectMap["identity"] = dacup.Identity
  1951  	}
  1952  	return json.Marshal(objectMap)
  1953  }
  1954  
  1955  // UnmarshalJSON is the custom unmarshaler for DatabaseAccountCreateUpdateParameters struct.
  1956  func (dacup *DatabaseAccountCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  1957  	var m map[string]*json.RawMessage
  1958  	err := json.Unmarshal(body, &m)
  1959  	if err != nil {
  1960  		return err
  1961  	}
  1962  	for k, v := range m {
  1963  		switch k {
  1964  		case "kind":
  1965  			if v != nil {
  1966  				var kind DatabaseAccountKind
  1967  				err = json.Unmarshal(*v, &kind)
  1968  				if err != nil {
  1969  					return err
  1970  				}
  1971  				dacup.Kind = kind
  1972  			}
  1973  		case "properties":
  1974  			if v != nil {
  1975  				properties, err := unmarshalBasicDatabaseAccountCreateUpdateProperties(*v)
  1976  				if err != nil {
  1977  					return err
  1978  				}
  1979  				dacup.Properties = properties
  1980  			}
  1981  		case "id":
  1982  			if v != nil {
  1983  				var ID string
  1984  				err = json.Unmarshal(*v, &ID)
  1985  				if err != nil {
  1986  					return err
  1987  				}
  1988  				dacup.ID = &ID
  1989  			}
  1990  		case "name":
  1991  			if v != nil {
  1992  				var name string
  1993  				err = json.Unmarshal(*v, &name)
  1994  				if err != nil {
  1995  					return err
  1996  				}
  1997  				dacup.Name = &name
  1998  			}
  1999  		case "type":
  2000  			if v != nil {
  2001  				var typeVar string
  2002  				err = json.Unmarshal(*v, &typeVar)
  2003  				if err != nil {
  2004  					return err
  2005  				}
  2006  				dacup.Type = &typeVar
  2007  			}
  2008  		case "location":
  2009  			if v != nil {
  2010  				var location string
  2011  				err = json.Unmarshal(*v, &location)
  2012  				if err != nil {
  2013  					return err
  2014  				}
  2015  				dacup.Location = &location
  2016  			}
  2017  		case "tags":
  2018  			if v != nil {
  2019  				var tags map[string]*string
  2020  				err = json.Unmarshal(*v, &tags)
  2021  				if err != nil {
  2022  					return err
  2023  				}
  2024  				dacup.Tags = tags
  2025  			}
  2026  		case "identity":
  2027  			if v != nil {
  2028  				var identity ManagedServiceIdentity
  2029  				err = json.Unmarshal(*v, &identity)
  2030  				if err != nil {
  2031  					return err
  2032  				}
  2033  				dacup.Identity = &identity
  2034  			}
  2035  		}
  2036  	}
  2037  
  2038  	return nil
  2039  }
  2040  
  2041  // BasicDatabaseAccountCreateUpdateProperties properties to create and update Azure Cosmos DB database accounts.
  2042  type BasicDatabaseAccountCreateUpdateProperties interface {
  2043  	AsDefaultRequestDatabaseAccountCreateUpdateProperties() (*DefaultRequestDatabaseAccountCreateUpdateProperties, bool)
  2044  	AsRestoreReqeustDatabaseAccountCreateUpdateProperties() (*RestoreReqeustDatabaseAccountCreateUpdateProperties, bool)
  2045  	AsDatabaseAccountCreateUpdateProperties() (*DatabaseAccountCreateUpdateProperties, bool)
  2046  }
  2047  
  2048  // DatabaseAccountCreateUpdateProperties properties to create and update Azure Cosmos DB database accounts.
  2049  type DatabaseAccountCreateUpdateProperties struct {
  2050  	// ConsistencyPolicy - The consistency policy for the Cosmos DB account.
  2051  	ConsistencyPolicy *ConsistencyPolicy `json:"consistencyPolicy,omitempty"`
  2052  	// Locations - An array that contains the georeplication locations enabled for the Cosmos DB account.
  2053  	Locations *[]Location `json:"locations,omitempty"`
  2054  	// DatabaseAccountOfferType - The offer type for the database
  2055  	DatabaseAccountOfferType *string `json:"databaseAccountOfferType,omitempty"`
  2056  	// IPRules - List of IpRules.
  2057  	IPRules *[]IPAddressOrRange `json:"ipRules,omitempty"`
  2058  	// IsVirtualNetworkFilterEnabled - Flag to indicate whether to enable/disable Virtual Network ACL rules.
  2059  	IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty"`
  2060  	// EnableAutomaticFailover - Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account.
  2061  	EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty"`
  2062  	// Capabilities - List of Cosmos DB capabilities for the account
  2063  	Capabilities *[]Capability `json:"capabilities,omitempty"`
  2064  	// VirtualNetworkRules - List of Virtual Network ACL rules configured for the Cosmos DB account.
  2065  	VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"`
  2066  	// EnableMultipleWriteLocations - Enables the account to write in multiple locations
  2067  	EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"`
  2068  	// EnableCassandraConnector - Enables the cassandra connector on the Cosmos DB C* account
  2069  	EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"`
  2070  	// ConnectorOffer - The cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'ConnectorOfferSmall'
  2071  	ConnectorOffer ConnectorOffer `json:"connectorOffer,omitempty"`
  2072  	// DisableKeyBasedMetadataWriteAccess - Disable write operations on metadata resources (databases, containers, throughput) via account keys
  2073  	DisableKeyBasedMetadataWriteAccess *bool `json:"disableKeyBasedMetadataWriteAccess,omitempty"`
  2074  	// KeyVaultKeyURI - The URI of the key vault
  2075  	KeyVaultKeyURI *string `json:"keyVaultKeyUri,omitempty"`
  2076  	// DefaultIdentity - The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more.
  2077  	DefaultIdentity *string `json:"defaultIdentity,omitempty"`
  2078  	// PublicNetworkAccess - Whether requests from Public Network are allowed. Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled'
  2079  	PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`
  2080  	// EnableFreeTier - Flag to indicate whether Free Tier is enabled.
  2081  	EnableFreeTier *bool `json:"enableFreeTier,omitempty"`
  2082  	// APIProperties - API specific properties. Currently, supported only for MongoDB API.
  2083  	APIProperties *APIProperties `json:"apiProperties,omitempty"`
  2084  	// EnableAnalyticalStorage - Flag to indicate whether to enable storage analytics.
  2085  	EnableAnalyticalStorage *bool `json:"enableAnalyticalStorage,omitempty"`
  2086  	// BackupPolicy - The object representing the policy for taking backups on an account.
  2087  	BackupPolicy BasicBackupPolicy `json:"backupPolicy,omitempty"`
  2088  	// Cors - The CORS policy for the Cosmos DB database account.
  2089  	Cors *[]CorsPolicy `json:"cors,omitempty"`
  2090  	// NetworkACLBypass - Indicates what services are allowed to bypass firewall checks. Possible values include: 'NetworkACLBypassNone', 'NetworkACLBypassAzureServices'
  2091  	NetworkACLBypass NetworkACLBypass `json:"networkAclBypass,omitempty"`
  2092  	// NetworkACLBypassResourceIds - An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account.
  2093  	NetworkACLBypassResourceIds *[]string `json:"networkAclBypassResourceIds,omitempty"`
  2094  	// CreateMode - Possible values include: 'CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDatabaseAccountCreateUpdateProperties', 'CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDefault', 'CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeRestore'
  2095  	CreateMode CreateModeBasicDatabaseAccountCreateUpdateProperties `json:"createMode,omitempty"`
  2096  }
  2097  
  2098  func unmarshalBasicDatabaseAccountCreateUpdateProperties(body []byte) (BasicDatabaseAccountCreateUpdateProperties, error) {
  2099  	var m map[string]interface{}
  2100  	err := json.Unmarshal(body, &m)
  2101  	if err != nil {
  2102  		return nil, err
  2103  	}
  2104  
  2105  	switch m["createMode"] {
  2106  	case string(CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDefault):
  2107  		var drdacup DefaultRequestDatabaseAccountCreateUpdateProperties
  2108  		err := json.Unmarshal(body, &drdacup)
  2109  		return drdacup, err
  2110  	case string(CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeRestore):
  2111  		var rrdacup RestoreReqeustDatabaseAccountCreateUpdateProperties
  2112  		err := json.Unmarshal(body, &rrdacup)
  2113  		return rrdacup, err
  2114  	default:
  2115  		var dacup DatabaseAccountCreateUpdateProperties
  2116  		err := json.Unmarshal(body, &dacup)
  2117  		return dacup, err
  2118  	}
  2119  }
  2120  func unmarshalBasicDatabaseAccountCreateUpdatePropertiesArray(body []byte) ([]BasicDatabaseAccountCreateUpdateProperties, error) {
  2121  	var rawMessages []*json.RawMessage
  2122  	err := json.Unmarshal(body, &rawMessages)
  2123  	if err != nil {
  2124  		return nil, err
  2125  	}
  2126  
  2127  	dacupArray := make([]BasicDatabaseAccountCreateUpdateProperties, len(rawMessages))
  2128  
  2129  	for index, rawMessage := range rawMessages {
  2130  		dacup, err := unmarshalBasicDatabaseAccountCreateUpdateProperties(*rawMessage)
  2131  		if err != nil {
  2132  			return nil, err
  2133  		}
  2134  		dacupArray[index] = dacup
  2135  	}
  2136  	return dacupArray, nil
  2137  }
  2138  
  2139  // MarshalJSON is the custom marshaler for DatabaseAccountCreateUpdateProperties.
  2140  func (dacup DatabaseAccountCreateUpdateProperties) MarshalJSON() ([]byte, error) {
  2141  	dacup.CreateMode = CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDatabaseAccountCreateUpdateProperties
  2142  	objectMap := make(map[string]interface{})
  2143  	if dacup.ConsistencyPolicy != nil {
  2144  		objectMap["consistencyPolicy"] = dacup.ConsistencyPolicy
  2145  	}
  2146  	if dacup.Locations != nil {
  2147  		objectMap["locations"] = dacup.Locations
  2148  	}
  2149  	if dacup.DatabaseAccountOfferType != nil {
  2150  		objectMap["databaseAccountOfferType"] = dacup.DatabaseAccountOfferType
  2151  	}
  2152  	if dacup.IPRules != nil {
  2153  		objectMap["ipRules"] = dacup.IPRules
  2154  	}
  2155  	if dacup.IsVirtualNetworkFilterEnabled != nil {
  2156  		objectMap["isVirtualNetworkFilterEnabled"] = dacup.IsVirtualNetworkFilterEnabled
  2157  	}
  2158  	if dacup.EnableAutomaticFailover != nil {
  2159  		objectMap["enableAutomaticFailover"] = dacup.EnableAutomaticFailover
  2160  	}
  2161  	if dacup.Capabilities != nil {
  2162  		objectMap["capabilities"] = dacup.Capabilities
  2163  	}
  2164  	if dacup.VirtualNetworkRules != nil {
  2165  		objectMap["virtualNetworkRules"] = dacup.VirtualNetworkRules
  2166  	}
  2167  	if dacup.EnableMultipleWriteLocations != nil {
  2168  		objectMap["enableMultipleWriteLocations"] = dacup.EnableMultipleWriteLocations
  2169  	}
  2170  	if dacup.EnableCassandraConnector != nil {
  2171  		objectMap["enableCassandraConnector"] = dacup.EnableCassandraConnector
  2172  	}
  2173  	if dacup.ConnectorOffer != "" {
  2174  		objectMap["connectorOffer"] = dacup.ConnectorOffer
  2175  	}
  2176  	if dacup.DisableKeyBasedMetadataWriteAccess != nil {
  2177  		objectMap["disableKeyBasedMetadataWriteAccess"] = dacup.DisableKeyBasedMetadataWriteAccess
  2178  	}
  2179  	if dacup.KeyVaultKeyURI != nil {
  2180  		objectMap["keyVaultKeyUri"] = dacup.KeyVaultKeyURI
  2181  	}
  2182  	if dacup.DefaultIdentity != nil {
  2183  		objectMap["defaultIdentity"] = dacup.DefaultIdentity
  2184  	}
  2185  	if dacup.PublicNetworkAccess != "" {
  2186  		objectMap["publicNetworkAccess"] = dacup.PublicNetworkAccess
  2187  	}
  2188  	if dacup.EnableFreeTier != nil {
  2189  		objectMap["enableFreeTier"] = dacup.EnableFreeTier
  2190  	}
  2191  	if dacup.APIProperties != nil {
  2192  		objectMap["apiProperties"] = dacup.APIProperties
  2193  	}
  2194  	if dacup.EnableAnalyticalStorage != nil {
  2195  		objectMap["enableAnalyticalStorage"] = dacup.EnableAnalyticalStorage
  2196  	}
  2197  	objectMap["backupPolicy"] = dacup.BackupPolicy
  2198  	if dacup.Cors != nil {
  2199  		objectMap["cors"] = dacup.Cors
  2200  	}
  2201  	if dacup.NetworkACLBypass != "" {
  2202  		objectMap["networkAclBypass"] = dacup.NetworkACLBypass
  2203  	}
  2204  	if dacup.NetworkACLBypassResourceIds != nil {
  2205  		objectMap["networkAclBypassResourceIds"] = dacup.NetworkACLBypassResourceIds
  2206  	}
  2207  	if dacup.CreateMode != "" {
  2208  		objectMap["createMode"] = dacup.CreateMode
  2209  	}
  2210  	return json.Marshal(objectMap)
  2211  }
  2212  
  2213  // AsDefaultRequestDatabaseAccountCreateUpdateProperties is the BasicDatabaseAccountCreateUpdateProperties implementation for DatabaseAccountCreateUpdateProperties.
  2214  func (dacup DatabaseAccountCreateUpdateProperties) AsDefaultRequestDatabaseAccountCreateUpdateProperties() (*DefaultRequestDatabaseAccountCreateUpdateProperties, bool) {
  2215  	return nil, false
  2216  }
  2217  
  2218  // AsRestoreReqeustDatabaseAccountCreateUpdateProperties is the BasicDatabaseAccountCreateUpdateProperties implementation for DatabaseAccountCreateUpdateProperties.
  2219  func (dacup DatabaseAccountCreateUpdateProperties) AsRestoreReqeustDatabaseAccountCreateUpdateProperties() (*RestoreReqeustDatabaseAccountCreateUpdateProperties, bool) {
  2220  	return nil, false
  2221  }
  2222  
  2223  // AsDatabaseAccountCreateUpdateProperties is the BasicDatabaseAccountCreateUpdateProperties implementation for DatabaseAccountCreateUpdateProperties.
  2224  func (dacup DatabaseAccountCreateUpdateProperties) AsDatabaseAccountCreateUpdateProperties() (*DatabaseAccountCreateUpdateProperties, bool) {
  2225  	return &dacup, true
  2226  }
  2227  
  2228  // AsBasicDatabaseAccountCreateUpdateProperties is the BasicDatabaseAccountCreateUpdateProperties implementation for DatabaseAccountCreateUpdateProperties.
  2229  func (dacup DatabaseAccountCreateUpdateProperties) AsBasicDatabaseAccountCreateUpdateProperties() (BasicDatabaseAccountCreateUpdateProperties, bool) {
  2230  	return &dacup, true
  2231  }
  2232  
  2233  // UnmarshalJSON is the custom unmarshaler for DatabaseAccountCreateUpdateProperties struct.
  2234  func (dacup *DatabaseAccountCreateUpdateProperties) UnmarshalJSON(body []byte) error {
  2235  	var m map[string]*json.RawMessage
  2236  	err := json.Unmarshal(body, &m)
  2237  	if err != nil {
  2238  		return err
  2239  	}
  2240  	for k, v := range m {
  2241  		switch k {
  2242  		case "consistencyPolicy":
  2243  			if v != nil {
  2244  				var consistencyPolicy ConsistencyPolicy
  2245  				err = json.Unmarshal(*v, &consistencyPolicy)
  2246  				if err != nil {
  2247  					return err
  2248  				}
  2249  				dacup.ConsistencyPolicy = &consistencyPolicy
  2250  			}
  2251  		case "locations":
  2252  			if v != nil {
  2253  				var locations []Location
  2254  				err = json.Unmarshal(*v, &locations)
  2255  				if err != nil {
  2256  					return err
  2257  				}
  2258  				dacup.Locations = &locations
  2259  			}
  2260  		case "databaseAccountOfferType":
  2261  			if v != nil {
  2262  				var databaseAccountOfferType string
  2263  				err = json.Unmarshal(*v, &databaseAccountOfferType)
  2264  				if err != nil {
  2265  					return err
  2266  				}
  2267  				dacup.DatabaseAccountOfferType = &databaseAccountOfferType
  2268  			}
  2269  		case "ipRules":
  2270  			if v != nil {
  2271  				var IPRules []IPAddressOrRange
  2272  				err = json.Unmarshal(*v, &IPRules)
  2273  				if err != nil {
  2274  					return err
  2275  				}
  2276  				dacup.IPRules = &IPRules
  2277  			}
  2278  		case "isVirtualNetworkFilterEnabled":
  2279  			if v != nil {
  2280  				var isVirtualNetworkFilterEnabled bool
  2281  				err = json.Unmarshal(*v, &isVirtualNetworkFilterEnabled)
  2282  				if err != nil {
  2283  					return err
  2284  				}
  2285  				dacup.IsVirtualNetworkFilterEnabled = &isVirtualNetworkFilterEnabled
  2286  			}
  2287  		case "enableAutomaticFailover":
  2288  			if v != nil {
  2289  				var enableAutomaticFailover bool
  2290  				err = json.Unmarshal(*v, &enableAutomaticFailover)
  2291  				if err != nil {
  2292  					return err
  2293  				}
  2294  				dacup.EnableAutomaticFailover = &enableAutomaticFailover
  2295  			}
  2296  		case "capabilities":
  2297  			if v != nil {
  2298  				var capabilities []Capability
  2299  				err = json.Unmarshal(*v, &capabilities)
  2300  				if err != nil {
  2301  					return err
  2302  				}
  2303  				dacup.Capabilities = &capabilities
  2304  			}
  2305  		case "virtualNetworkRules":
  2306  			if v != nil {
  2307  				var virtualNetworkRules []VirtualNetworkRule
  2308  				err = json.Unmarshal(*v, &virtualNetworkRules)
  2309  				if err != nil {
  2310  					return err
  2311  				}
  2312  				dacup.VirtualNetworkRules = &virtualNetworkRules
  2313  			}
  2314  		case "enableMultipleWriteLocations":
  2315  			if v != nil {
  2316  				var enableMultipleWriteLocations bool
  2317  				err = json.Unmarshal(*v, &enableMultipleWriteLocations)
  2318  				if err != nil {
  2319  					return err
  2320  				}
  2321  				dacup.EnableMultipleWriteLocations = &enableMultipleWriteLocations
  2322  			}
  2323  		case "enableCassandraConnector":
  2324  			if v != nil {
  2325  				var enableCassandraConnector bool
  2326  				err = json.Unmarshal(*v, &enableCassandraConnector)
  2327  				if err != nil {
  2328  					return err
  2329  				}
  2330  				dacup.EnableCassandraConnector = &enableCassandraConnector
  2331  			}
  2332  		case "connectorOffer":
  2333  			if v != nil {
  2334  				var connectorOffer ConnectorOffer
  2335  				err = json.Unmarshal(*v, &connectorOffer)
  2336  				if err != nil {
  2337  					return err
  2338  				}
  2339  				dacup.ConnectorOffer = connectorOffer
  2340  			}
  2341  		case "disableKeyBasedMetadataWriteAccess":
  2342  			if v != nil {
  2343  				var disableKeyBasedMetadataWriteAccess bool
  2344  				err = json.Unmarshal(*v, &disableKeyBasedMetadataWriteAccess)
  2345  				if err != nil {
  2346  					return err
  2347  				}
  2348  				dacup.DisableKeyBasedMetadataWriteAccess = &disableKeyBasedMetadataWriteAccess
  2349  			}
  2350  		case "keyVaultKeyUri":
  2351  			if v != nil {
  2352  				var keyVaultKeyURI string
  2353  				err = json.Unmarshal(*v, &keyVaultKeyURI)
  2354  				if err != nil {
  2355  					return err
  2356  				}
  2357  				dacup.KeyVaultKeyURI = &keyVaultKeyURI
  2358  			}
  2359  		case "defaultIdentity":
  2360  			if v != nil {
  2361  				var defaultIdentity string
  2362  				err = json.Unmarshal(*v, &defaultIdentity)
  2363  				if err != nil {
  2364  					return err
  2365  				}
  2366  				dacup.DefaultIdentity = &defaultIdentity
  2367  			}
  2368  		case "publicNetworkAccess":
  2369  			if v != nil {
  2370  				var publicNetworkAccess PublicNetworkAccess
  2371  				err = json.Unmarshal(*v, &publicNetworkAccess)
  2372  				if err != nil {
  2373  					return err
  2374  				}
  2375  				dacup.PublicNetworkAccess = publicNetworkAccess
  2376  			}
  2377  		case "enableFreeTier":
  2378  			if v != nil {
  2379  				var enableFreeTier bool
  2380  				err = json.Unmarshal(*v, &enableFreeTier)
  2381  				if err != nil {
  2382  					return err
  2383  				}
  2384  				dacup.EnableFreeTier = &enableFreeTier
  2385  			}
  2386  		case "apiProperties":
  2387  			if v != nil {
  2388  				var APIProperties APIProperties
  2389  				err = json.Unmarshal(*v, &APIProperties)
  2390  				if err != nil {
  2391  					return err
  2392  				}
  2393  				dacup.APIProperties = &APIProperties
  2394  			}
  2395  		case "enableAnalyticalStorage":
  2396  			if v != nil {
  2397  				var enableAnalyticalStorage bool
  2398  				err = json.Unmarshal(*v, &enableAnalyticalStorage)
  2399  				if err != nil {
  2400  					return err
  2401  				}
  2402  				dacup.EnableAnalyticalStorage = &enableAnalyticalStorage
  2403  			}
  2404  		case "backupPolicy":
  2405  			if v != nil {
  2406  				backupPolicy, err := unmarshalBasicBackupPolicy(*v)
  2407  				if err != nil {
  2408  					return err
  2409  				}
  2410  				dacup.BackupPolicy = backupPolicy
  2411  			}
  2412  		case "cors":
  2413  			if v != nil {
  2414  				var cors []CorsPolicy
  2415  				err = json.Unmarshal(*v, &cors)
  2416  				if err != nil {
  2417  					return err
  2418  				}
  2419  				dacup.Cors = &cors
  2420  			}
  2421  		case "networkAclBypass":
  2422  			if v != nil {
  2423  				var networkACLBypass NetworkACLBypass
  2424  				err = json.Unmarshal(*v, &networkACLBypass)
  2425  				if err != nil {
  2426  					return err
  2427  				}
  2428  				dacup.NetworkACLBypass = networkACLBypass
  2429  			}
  2430  		case "networkAclBypassResourceIds":
  2431  			if v != nil {
  2432  				var networkACLBypassResourceIds []string
  2433  				err = json.Unmarshal(*v, &networkACLBypassResourceIds)
  2434  				if err != nil {
  2435  					return err
  2436  				}
  2437  				dacup.NetworkACLBypassResourceIds = &networkACLBypassResourceIds
  2438  			}
  2439  		case "createMode":
  2440  			if v != nil {
  2441  				var createMode CreateModeBasicDatabaseAccountCreateUpdateProperties
  2442  				err = json.Unmarshal(*v, &createMode)
  2443  				if err != nil {
  2444  					return err
  2445  				}
  2446  				dacup.CreateMode = createMode
  2447  			}
  2448  		}
  2449  	}
  2450  
  2451  	return nil
  2452  }
  2453  
  2454  // DatabaseAccountGetProperties properties for the database account.
  2455  type DatabaseAccountGetProperties struct {
  2456  	ProvisioningState *string `json:"provisioningState,omitempty"`
  2457  	// DocumentEndpoint - READ-ONLY; The connection endpoint for the Cosmos DB database account.
  2458  	DocumentEndpoint *string `json:"documentEndpoint,omitempty"`
  2459  	// DatabaseAccountOfferType - READ-ONLY; The offer type for the Cosmos DB database account. Default value: Standard. Possible values include: 'DatabaseAccountOfferTypeStandard'
  2460  	DatabaseAccountOfferType DatabaseAccountOfferType `json:"databaseAccountOfferType,omitempty"`
  2461  	// IPRules - List of IpRules.
  2462  	IPRules *[]IPAddressOrRange `json:"ipRules,omitempty"`
  2463  	// IsVirtualNetworkFilterEnabled - Flag to indicate whether to enable/disable Virtual Network ACL rules.
  2464  	IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty"`
  2465  	// EnableAutomaticFailover - Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account.
  2466  	EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty"`
  2467  	// ConsistencyPolicy - The consistency policy for the Cosmos DB database account.
  2468  	ConsistencyPolicy *ConsistencyPolicy `json:"consistencyPolicy,omitempty"`
  2469  	// Capabilities - List of Cosmos DB capabilities for the account
  2470  	Capabilities *[]Capability `json:"capabilities,omitempty"`
  2471  	// WriteLocations - READ-ONLY; An array that contains the write location for the Cosmos DB account.
  2472  	WriteLocations *[]Location `json:"writeLocations,omitempty"`
  2473  	// ReadLocations - READ-ONLY; An array that contains of the read locations enabled for the Cosmos DB account.
  2474  	ReadLocations *[]Location `json:"readLocations,omitempty"`
  2475  	// Locations - READ-ONLY; An array that contains all of the locations enabled for the Cosmos DB account.
  2476  	Locations *[]Location `json:"locations,omitempty"`
  2477  	// FailoverPolicies - READ-ONLY; An array that contains the regions ordered by their failover priorities.
  2478  	FailoverPolicies *[]FailoverPolicy `json:"failoverPolicies,omitempty"`
  2479  	// VirtualNetworkRules - List of Virtual Network ACL rules configured for the Cosmos DB account.
  2480  	VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"`
  2481  	// PrivateEndpointConnections - READ-ONLY; List of Private Endpoint Connections configured for the Cosmos DB account.
  2482  	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
  2483  	// EnableMultipleWriteLocations - Enables the account to write in multiple locations
  2484  	EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"`
  2485  	// EnableCassandraConnector - Enables the cassandra connector on the Cosmos DB C* account
  2486  	EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"`
  2487  	// ConnectorOffer - The cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'ConnectorOfferSmall'
  2488  	ConnectorOffer ConnectorOffer `json:"connectorOffer,omitempty"`
  2489  	// DisableKeyBasedMetadataWriteAccess - Disable write operations on metadata resources (databases, containers, throughput) via account keys
  2490  	DisableKeyBasedMetadataWriteAccess *bool `json:"disableKeyBasedMetadataWriteAccess,omitempty"`
  2491  	// KeyVaultKeyURI - The URI of the key vault
  2492  	KeyVaultKeyURI *string `json:"keyVaultKeyUri,omitempty"`
  2493  	// DefaultIdentity - The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more.
  2494  	DefaultIdentity *string `json:"defaultIdentity,omitempty"`
  2495  	// PublicNetworkAccess - Whether requests from Public Network are allowed. Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled'
  2496  	PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`
  2497  	// EnableFreeTier - Flag to indicate whether Free Tier is enabled.
  2498  	EnableFreeTier *bool `json:"enableFreeTier,omitempty"`
  2499  	// APIProperties - API specific properties.
  2500  	APIProperties *APIProperties `json:"apiProperties,omitempty"`
  2501  	// EnableAnalyticalStorage - Flag to indicate whether to enable storage analytics.
  2502  	EnableAnalyticalStorage *bool `json:"enableAnalyticalStorage,omitempty"`
  2503  	// InstanceID - READ-ONLY; A unique identifier assigned to the database account
  2504  	InstanceID *string `json:"instanceId,omitempty"`
  2505  	// CreateMode - Enum to indicate the mode of account creation. Possible values include: 'CreateModeDefault', 'CreateModeRestore'
  2506  	CreateMode CreateMode `json:"createMode,omitempty"`
  2507  	// RestoreParameters - Parameters to indicate the information about the restore.
  2508  	RestoreParameters *RestoreParameters `json:"restoreParameters,omitempty"`
  2509  	// BackupPolicy - The object representing the policy for taking backups on an account.
  2510  	BackupPolicy BasicBackupPolicy `json:"backupPolicy,omitempty"`
  2511  	// Cors - The CORS policy for the Cosmos DB database account.
  2512  	Cors *[]CorsPolicy `json:"cors,omitempty"`
  2513  	// NetworkACLBypass - Indicates what services are allowed to bypass firewall checks. Possible values include: 'NetworkACLBypassNone', 'NetworkACLBypassAzureServices'
  2514  	NetworkACLBypass NetworkACLBypass `json:"networkAclBypass,omitempty"`
  2515  	// NetworkACLBypassResourceIds - An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account.
  2516  	NetworkACLBypassResourceIds *[]string `json:"networkAclBypassResourceIds,omitempty"`
  2517  }
  2518  
  2519  // MarshalJSON is the custom marshaler for DatabaseAccountGetProperties.
  2520  func (dagp DatabaseAccountGetProperties) MarshalJSON() ([]byte, error) {
  2521  	objectMap := make(map[string]interface{})
  2522  	if dagp.ProvisioningState != nil {
  2523  		objectMap["provisioningState"] = dagp.ProvisioningState
  2524  	}
  2525  	if dagp.IPRules != nil {
  2526  		objectMap["ipRules"] = dagp.IPRules
  2527  	}
  2528  	if dagp.IsVirtualNetworkFilterEnabled != nil {
  2529  		objectMap["isVirtualNetworkFilterEnabled"] = dagp.IsVirtualNetworkFilterEnabled
  2530  	}
  2531  	if dagp.EnableAutomaticFailover != nil {
  2532  		objectMap["enableAutomaticFailover"] = dagp.EnableAutomaticFailover
  2533  	}
  2534  	if dagp.ConsistencyPolicy != nil {
  2535  		objectMap["consistencyPolicy"] = dagp.ConsistencyPolicy
  2536  	}
  2537  	if dagp.Capabilities != nil {
  2538  		objectMap["capabilities"] = dagp.Capabilities
  2539  	}
  2540  	if dagp.VirtualNetworkRules != nil {
  2541  		objectMap["virtualNetworkRules"] = dagp.VirtualNetworkRules
  2542  	}
  2543  	if dagp.EnableMultipleWriteLocations != nil {
  2544  		objectMap["enableMultipleWriteLocations"] = dagp.EnableMultipleWriteLocations
  2545  	}
  2546  	if dagp.EnableCassandraConnector != nil {
  2547  		objectMap["enableCassandraConnector"] = dagp.EnableCassandraConnector
  2548  	}
  2549  	if dagp.ConnectorOffer != "" {
  2550  		objectMap["connectorOffer"] = dagp.ConnectorOffer
  2551  	}
  2552  	if dagp.DisableKeyBasedMetadataWriteAccess != nil {
  2553  		objectMap["disableKeyBasedMetadataWriteAccess"] = dagp.DisableKeyBasedMetadataWriteAccess
  2554  	}
  2555  	if dagp.KeyVaultKeyURI != nil {
  2556  		objectMap["keyVaultKeyUri"] = dagp.KeyVaultKeyURI
  2557  	}
  2558  	if dagp.DefaultIdentity != nil {
  2559  		objectMap["defaultIdentity"] = dagp.DefaultIdentity
  2560  	}
  2561  	if dagp.PublicNetworkAccess != "" {
  2562  		objectMap["publicNetworkAccess"] = dagp.PublicNetworkAccess
  2563  	}
  2564  	if dagp.EnableFreeTier != nil {
  2565  		objectMap["enableFreeTier"] = dagp.EnableFreeTier
  2566  	}
  2567  	if dagp.APIProperties != nil {
  2568  		objectMap["apiProperties"] = dagp.APIProperties
  2569  	}
  2570  	if dagp.EnableAnalyticalStorage != nil {
  2571  		objectMap["enableAnalyticalStorage"] = dagp.EnableAnalyticalStorage
  2572  	}
  2573  	if dagp.CreateMode != "" {
  2574  		objectMap["createMode"] = dagp.CreateMode
  2575  	}
  2576  	if dagp.RestoreParameters != nil {
  2577  		objectMap["restoreParameters"] = dagp.RestoreParameters
  2578  	}
  2579  	objectMap["backupPolicy"] = dagp.BackupPolicy
  2580  	if dagp.Cors != nil {
  2581  		objectMap["cors"] = dagp.Cors
  2582  	}
  2583  	if dagp.NetworkACLBypass != "" {
  2584  		objectMap["networkAclBypass"] = dagp.NetworkACLBypass
  2585  	}
  2586  	if dagp.NetworkACLBypassResourceIds != nil {
  2587  		objectMap["networkAclBypassResourceIds"] = dagp.NetworkACLBypassResourceIds
  2588  	}
  2589  	return json.Marshal(objectMap)
  2590  }
  2591  
  2592  // UnmarshalJSON is the custom unmarshaler for DatabaseAccountGetProperties struct.
  2593  func (dagp *DatabaseAccountGetProperties) UnmarshalJSON(body []byte) error {
  2594  	var m map[string]*json.RawMessage
  2595  	err := json.Unmarshal(body, &m)
  2596  	if err != nil {
  2597  		return err
  2598  	}
  2599  	for k, v := range m {
  2600  		switch k {
  2601  		case "provisioningState":
  2602  			if v != nil {
  2603  				var provisioningState string
  2604  				err = json.Unmarshal(*v, &provisioningState)
  2605  				if err != nil {
  2606  					return err
  2607  				}
  2608  				dagp.ProvisioningState = &provisioningState
  2609  			}
  2610  		case "documentEndpoint":
  2611  			if v != nil {
  2612  				var documentEndpoint string
  2613  				err = json.Unmarshal(*v, &documentEndpoint)
  2614  				if err != nil {
  2615  					return err
  2616  				}
  2617  				dagp.DocumentEndpoint = &documentEndpoint
  2618  			}
  2619  		case "databaseAccountOfferType":
  2620  			if v != nil {
  2621  				var databaseAccountOfferType DatabaseAccountOfferType
  2622  				err = json.Unmarshal(*v, &databaseAccountOfferType)
  2623  				if err != nil {
  2624  					return err
  2625  				}
  2626  				dagp.DatabaseAccountOfferType = databaseAccountOfferType
  2627  			}
  2628  		case "ipRules":
  2629  			if v != nil {
  2630  				var IPRules []IPAddressOrRange
  2631  				err = json.Unmarshal(*v, &IPRules)
  2632  				if err != nil {
  2633  					return err
  2634  				}
  2635  				dagp.IPRules = &IPRules
  2636  			}
  2637  		case "isVirtualNetworkFilterEnabled":
  2638  			if v != nil {
  2639  				var isVirtualNetworkFilterEnabled bool
  2640  				err = json.Unmarshal(*v, &isVirtualNetworkFilterEnabled)
  2641  				if err != nil {
  2642  					return err
  2643  				}
  2644  				dagp.IsVirtualNetworkFilterEnabled = &isVirtualNetworkFilterEnabled
  2645  			}
  2646  		case "enableAutomaticFailover":
  2647  			if v != nil {
  2648  				var enableAutomaticFailover bool
  2649  				err = json.Unmarshal(*v, &enableAutomaticFailover)
  2650  				if err != nil {
  2651  					return err
  2652  				}
  2653  				dagp.EnableAutomaticFailover = &enableAutomaticFailover
  2654  			}
  2655  		case "consistencyPolicy":
  2656  			if v != nil {
  2657  				var consistencyPolicy ConsistencyPolicy
  2658  				err = json.Unmarshal(*v, &consistencyPolicy)
  2659  				if err != nil {
  2660  					return err
  2661  				}
  2662  				dagp.ConsistencyPolicy = &consistencyPolicy
  2663  			}
  2664  		case "capabilities":
  2665  			if v != nil {
  2666  				var capabilities []Capability
  2667  				err = json.Unmarshal(*v, &capabilities)
  2668  				if err != nil {
  2669  					return err
  2670  				}
  2671  				dagp.Capabilities = &capabilities
  2672  			}
  2673  		case "writeLocations":
  2674  			if v != nil {
  2675  				var writeLocations []Location
  2676  				err = json.Unmarshal(*v, &writeLocations)
  2677  				if err != nil {
  2678  					return err
  2679  				}
  2680  				dagp.WriteLocations = &writeLocations
  2681  			}
  2682  		case "readLocations":
  2683  			if v != nil {
  2684  				var readLocations []Location
  2685  				err = json.Unmarshal(*v, &readLocations)
  2686  				if err != nil {
  2687  					return err
  2688  				}
  2689  				dagp.ReadLocations = &readLocations
  2690  			}
  2691  		case "locations":
  2692  			if v != nil {
  2693  				var locations []Location
  2694  				err = json.Unmarshal(*v, &locations)
  2695  				if err != nil {
  2696  					return err
  2697  				}
  2698  				dagp.Locations = &locations
  2699  			}
  2700  		case "failoverPolicies":
  2701  			if v != nil {
  2702  				var failoverPolicies []FailoverPolicy
  2703  				err = json.Unmarshal(*v, &failoverPolicies)
  2704  				if err != nil {
  2705  					return err
  2706  				}
  2707  				dagp.FailoverPolicies = &failoverPolicies
  2708  			}
  2709  		case "virtualNetworkRules":
  2710  			if v != nil {
  2711  				var virtualNetworkRules []VirtualNetworkRule
  2712  				err = json.Unmarshal(*v, &virtualNetworkRules)
  2713  				if err != nil {
  2714  					return err
  2715  				}
  2716  				dagp.VirtualNetworkRules = &virtualNetworkRules
  2717  			}
  2718  		case "privateEndpointConnections":
  2719  			if v != nil {
  2720  				var privateEndpointConnections []PrivateEndpointConnection
  2721  				err = json.Unmarshal(*v, &privateEndpointConnections)
  2722  				if err != nil {
  2723  					return err
  2724  				}
  2725  				dagp.PrivateEndpointConnections = &privateEndpointConnections
  2726  			}
  2727  		case "enableMultipleWriteLocations":
  2728  			if v != nil {
  2729  				var enableMultipleWriteLocations bool
  2730  				err = json.Unmarshal(*v, &enableMultipleWriteLocations)
  2731  				if err != nil {
  2732  					return err
  2733  				}
  2734  				dagp.EnableMultipleWriteLocations = &enableMultipleWriteLocations
  2735  			}
  2736  		case "enableCassandraConnector":
  2737  			if v != nil {
  2738  				var enableCassandraConnector bool
  2739  				err = json.Unmarshal(*v, &enableCassandraConnector)
  2740  				if err != nil {
  2741  					return err
  2742  				}
  2743  				dagp.EnableCassandraConnector = &enableCassandraConnector
  2744  			}
  2745  		case "connectorOffer":
  2746  			if v != nil {
  2747  				var connectorOffer ConnectorOffer
  2748  				err = json.Unmarshal(*v, &connectorOffer)
  2749  				if err != nil {
  2750  					return err
  2751  				}
  2752  				dagp.ConnectorOffer = connectorOffer
  2753  			}
  2754  		case "disableKeyBasedMetadataWriteAccess":
  2755  			if v != nil {
  2756  				var disableKeyBasedMetadataWriteAccess bool
  2757  				err = json.Unmarshal(*v, &disableKeyBasedMetadataWriteAccess)
  2758  				if err != nil {
  2759  					return err
  2760  				}
  2761  				dagp.DisableKeyBasedMetadataWriteAccess = &disableKeyBasedMetadataWriteAccess
  2762  			}
  2763  		case "keyVaultKeyUri":
  2764  			if v != nil {
  2765  				var keyVaultKeyURI string
  2766  				err = json.Unmarshal(*v, &keyVaultKeyURI)
  2767  				if err != nil {
  2768  					return err
  2769  				}
  2770  				dagp.KeyVaultKeyURI = &keyVaultKeyURI
  2771  			}
  2772  		case "defaultIdentity":
  2773  			if v != nil {
  2774  				var defaultIdentity string
  2775  				err = json.Unmarshal(*v, &defaultIdentity)
  2776  				if err != nil {
  2777  					return err
  2778  				}
  2779  				dagp.DefaultIdentity = &defaultIdentity
  2780  			}
  2781  		case "publicNetworkAccess":
  2782  			if v != nil {
  2783  				var publicNetworkAccess PublicNetworkAccess
  2784  				err = json.Unmarshal(*v, &publicNetworkAccess)
  2785  				if err != nil {
  2786  					return err
  2787  				}
  2788  				dagp.PublicNetworkAccess = publicNetworkAccess
  2789  			}
  2790  		case "enableFreeTier":
  2791  			if v != nil {
  2792  				var enableFreeTier bool
  2793  				err = json.Unmarshal(*v, &enableFreeTier)
  2794  				if err != nil {
  2795  					return err
  2796  				}
  2797  				dagp.EnableFreeTier = &enableFreeTier
  2798  			}
  2799  		case "apiProperties":
  2800  			if v != nil {
  2801  				var APIProperties APIProperties
  2802  				err = json.Unmarshal(*v, &APIProperties)
  2803  				if err != nil {
  2804  					return err
  2805  				}
  2806  				dagp.APIProperties = &APIProperties
  2807  			}
  2808  		case "enableAnalyticalStorage":
  2809  			if v != nil {
  2810  				var enableAnalyticalStorage bool
  2811  				err = json.Unmarshal(*v, &enableAnalyticalStorage)
  2812  				if err != nil {
  2813  					return err
  2814  				}
  2815  				dagp.EnableAnalyticalStorage = &enableAnalyticalStorage
  2816  			}
  2817  		case "instanceId":
  2818  			if v != nil {
  2819  				var instanceID string
  2820  				err = json.Unmarshal(*v, &instanceID)
  2821  				if err != nil {
  2822  					return err
  2823  				}
  2824  				dagp.InstanceID = &instanceID
  2825  			}
  2826  		case "createMode":
  2827  			if v != nil {
  2828  				var createMode CreateMode
  2829  				err = json.Unmarshal(*v, &createMode)
  2830  				if err != nil {
  2831  					return err
  2832  				}
  2833  				dagp.CreateMode = createMode
  2834  			}
  2835  		case "restoreParameters":
  2836  			if v != nil {
  2837  				var restoreParameters RestoreParameters
  2838  				err = json.Unmarshal(*v, &restoreParameters)
  2839  				if err != nil {
  2840  					return err
  2841  				}
  2842  				dagp.RestoreParameters = &restoreParameters
  2843  			}
  2844  		case "backupPolicy":
  2845  			if v != nil {
  2846  				backupPolicy, err := unmarshalBasicBackupPolicy(*v)
  2847  				if err != nil {
  2848  					return err
  2849  				}
  2850  				dagp.BackupPolicy = backupPolicy
  2851  			}
  2852  		case "cors":
  2853  			if v != nil {
  2854  				var cors []CorsPolicy
  2855  				err = json.Unmarshal(*v, &cors)
  2856  				if err != nil {
  2857  					return err
  2858  				}
  2859  				dagp.Cors = &cors
  2860  			}
  2861  		case "networkAclBypass":
  2862  			if v != nil {
  2863  				var networkACLBypass NetworkACLBypass
  2864  				err = json.Unmarshal(*v, &networkACLBypass)
  2865  				if err != nil {
  2866  					return err
  2867  				}
  2868  				dagp.NetworkACLBypass = networkACLBypass
  2869  			}
  2870  		case "networkAclBypassResourceIds":
  2871  			if v != nil {
  2872  				var networkACLBypassResourceIds []string
  2873  				err = json.Unmarshal(*v, &networkACLBypassResourceIds)
  2874  				if err != nil {
  2875  					return err
  2876  				}
  2877  				dagp.NetworkACLBypassResourceIds = &networkACLBypassResourceIds
  2878  			}
  2879  		}
  2880  	}
  2881  
  2882  	return nil
  2883  }
  2884  
  2885  // DatabaseAccountGetResults an Azure Cosmos DB database account.
  2886  type DatabaseAccountGetResults struct {
  2887  	autorest.Response `json:"-"`
  2888  	// Kind - Indicates the type of database account. This can only be set at database account creation. Possible values include: 'DatabaseAccountKindGlobalDocumentDB', 'DatabaseAccountKindMongoDB', 'DatabaseAccountKindParse'
  2889  	Kind                          DatabaseAccountKind `json:"kind,omitempty"`
  2890  	*DatabaseAccountGetProperties `json:"properties,omitempty"`
  2891  	// SystemData - READ-ONLY; The system meta data relating to this resource.
  2892  	SystemData *SystemData `json:"systemData,omitempty"`
  2893  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  2894  	ID *string `json:"id,omitempty"`
  2895  	// Name - READ-ONLY; The name of the ARM resource.
  2896  	Name *string `json:"name,omitempty"`
  2897  	// Type - READ-ONLY; The type of Azure resource.
  2898  	Type *string `json:"type,omitempty"`
  2899  	// Location - The location of the resource group to which the resource belongs.
  2900  	Location *string                 `json:"location,omitempty"`
  2901  	Tags     map[string]*string      `json:"tags"`
  2902  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
  2903  }
  2904  
  2905  // MarshalJSON is the custom marshaler for DatabaseAccountGetResults.
  2906  func (dagr DatabaseAccountGetResults) MarshalJSON() ([]byte, error) {
  2907  	objectMap := make(map[string]interface{})
  2908  	if dagr.Kind != "" {
  2909  		objectMap["kind"] = dagr.Kind
  2910  	}
  2911  	if dagr.DatabaseAccountGetProperties != nil {
  2912  		objectMap["properties"] = dagr.DatabaseAccountGetProperties
  2913  	}
  2914  	if dagr.Location != nil {
  2915  		objectMap["location"] = dagr.Location
  2916  	}
  2917  	if dagr.Tags != nil {
  2918  		objectMap["tags"] = dagr.Tags
  2919  	}
  2920  	if dagr.Identity != nil {
  2921  		objectMap["identity"] = dagr.Identity
  2922  	}
  2923  	return json.Marshal(objectMap)
  2924  }
  2925  
  2926  // UnmarshalJSON is the custom unmarshaler for DatabaseAccountGetResults struct.
  2927  func (dagr *DatabaseAccountGetResults) UnmarshalJSON(body []byte) error {
  2928  	var m map[string]*json.RawMessage
  2929  	err := json.Unmarshal(body, &m)
  2930  	if err != nil {
  2931  		return err
  2932  	}
  2933  	for k, v := range m {
  2934  		switch k {
  2935  		case "kind":
  2936  			if v != nil {
  2937  				var kind DatabaseAccountKind
  2938  				err = json.Unmarshal(*v, &kind)
  2939  				if err != nil {
  2940  					return err
  2941  				}
  2942  				dagr.Kind = kind
  2943  			}
  2944  		case "properties":
  2945  			if v != nil {
  2946  				var databaseAccountGetProperties DatabaseAccountGetProperties
  2947  				err = json.Unmarshal(*v, &databaseAccountGetProperties)
  2948  				if err != nil {
  2949  					return err
  2950  				}
  2951  				dagr.DatabaseAccountGetProperties = &databaseAccountGetProperties
  2952  			}
  2953  		case "systemData":
  2954  			if v != nil {
  2955  				var systemData SystemData
  2956  				err = json.Unmarshal(*v, &systemData)
  2957  				if err != nil {
  2958  					return err
  2959  				}
  2960  				dagr.SystemData = &systemData
  2961  			}
  2962  		case "id":
  2963  			if v != nil {
  2964  				var ID string
  2965  				err = json.Unmarshal(*v, &ID)
  2966  				if err != nil {
  2967  					return err
  2968  				}
  2969  				dagr.ID = &ID
  2970  			}
  2971  		case "name":
  2972  			if v != nil {
  2973  				var name string
  2974  				err = json.Unmarshal(*v, &name)
  2975  				if err != nil {
  2976  					return err
  2977  				}
  2978  				dagr.Name = &name
  2979  			}
  2980  		case "type":
  2981  			if v != nil {
  2982  				var typeVar string
  2983  				err = json.Unmarshal(*v, &typeVar)
  2984  				if err != nil {
  2985  					return err
  2986  				}
  2987  				dagr.Type = &typeVar
  2988  			}
  2989  		case "location":
  2990  			if v != nil {
  2991  				var location string
  2992  				err = json.Unmarshal(*v, &location)
  2993  				if err != nil {
  2994  					return err
  2995  				}
  2996  				dagr.Location = &location
  2997  			}
  2998  		case "tags":
  2999  			if v != nil {
  3000  				var tags map[string]*string
  3001  				err = json.Unmarshal(*v, &tags)
  3002  				if err != nil {
  3003  					return err
  3004  				}
  3005  				dagr.Tags = tags
  3006  			}
  3007  		case "identity":
  3008  			if v != nil {
  3009  				var identity ManagedServiceIdentity
  3010  				err = json.Unmarshal(*v, &identity)
  3011  				if err != nil {
  3012  					return err
  3013  				}
  3014  				dagr.Identity = &identity
  3015  			}
  3016  		}
  3017  	}
  3018  
  3019  	return nil
  3020  }
  3021  
  3022  // DatabaseAccountListConnectionStringsResult the connection strings for the given database account.
  3023  type DatabaseAccountListConnectionStringsResult struct {
  3024  	autorest.Response `json:"-"`
  3025  	// ConnectionStrings - An array that contains the connection strings for the Cosmos DB account.
  3026  	ConnectionStrings *[]DatabaseAccountConnectionString `json:"connectionStrings,omitempty"`
  3027  }
  3028  
  3029  // DatabaseAccountListKeysResult the access keys for the given database account.
  3030  type DatabaseAccountListKeysResult struct {
  3031  	autorest.Response `json:"-"`
  3032  	// PrimaryMasterKey - READ-ONLY; Base 64 encoded value of the primary read-write key.
  3033  	PrimaryMasterKey *string `json:"primaryMasterKey,omitempty"`
  3034  	// SecondaryMasterKey - READ-ONLY; Base 64 encoded value of the secondary read-write key.
  3035  	SecondaryMasterKey *string `json:"secondaryMasterKey,omitempty"`
  3036  	// PrimaryReadonlyMasterKey - READ-ONLY; Base 64 encoded value of the primary read-only key.
  3037  	PrimaryReadonlyMasterKey *string `json:"primaryReadonlyMasterKey,omitempty"`
  3038  	// SecondaryReadonlyMasterKey - READ-ONLY; Base 64 encoded value of the secondary read-only key.
  3039  	SecondaryReadonlyMasterKey *string `json:"secondaryReadonlyMasterKey,omitempty"`
  3040  }
  3041  
  3042  // MarshalJSON is the custom marshaler for DatabaseAccountListKeysResult.
  3043  func (dalkr DatabaseAccountListKeysResult) MarshalJSON() ([]byte, error) {
  3044  	objectMap := make(map[string]interface{})
  3045  	return json.Marshal(objectMap)
  3046  }
  3047  
  3048  // DatabaseAccountListReadOnlyKeysResult the read-only access keys for the given database account.
  3049  type DatabaseAccountListReadOnlyKeysResult struct {
  3050  	autorest.Response `json:"-"`
  3051  	// PrimaryReadonlyMasterKey - READ-ONLY; Base 64 encoded value of the primary read-only key.
  3052  	PrimaryReadonlyMasterKey *string `json:"primaryReadonlyMasterKey,omitempty"`
  3053  	// SecondaryReadonlyMasterKey - READ-ONLY; Base 64 encoded value of the secondary read-only key.
  3054  	SecondaryReadonlyMasterKey *string `json:"secondaryReadonlyMasterKey,omitempty"`
  3055  }
  3056  
  3057  // MarshalJSON is the custom marshaler for DatabaseAccountListReadOnlyKeysResult.
  3058  func (dalrokr DatabaseAccountListReadOnlyKeysResult) MarshalJSON() ([]byte, error) {
  3059  	objectMap := make(map[string]interface{})
  3060  	return json.Marshal(objectMap)
  3061  }
  3062  
  3063  // DatabaseAccountRegenerateKeyParameters parameters to regenerate the keys within the database account.
  3064  type DatabaseAccountRegenerateKeyParameters struct {
  3065  	// KeyKind - The access key to regenerate. Possible values include: 'KeyKindPrimary', 'KeyKindSecondary', 'KeyKindPrimaryReadonly', 'KeyKindSecondaryReadonly'
  3066  	KeyKind KeyKind `json:"keyKind,omitempty"`
  3067  }
  3068  
  3069  // DatabaseAccountsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
  3070  // long-running operation.
  3071  type DatabaseAccountsCreateOrUpdateFuture struct {
  3072  	azure.FutureAPI
  3073  	// Result returns the result of the asynchronous operation.
  3074  	// If the operation has not completed it will return an error.
  3075  	Result func(DatabaseAccountsClient) (DatabaseAccountGetResults, error)
  3076  }
  3077  
  3078  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  3079  func (future *DatabaseAccountsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  3080  	var azFuture azure.Future
  3081  	if err := json.Unmarshal(body, &azFuture); err != nil {
  3082  		return err
  3083  	}
  3084  	future.FutureAPI = &azFuture
  3085  	future.Result = future.result
  3086  	return nil
  3087  }
  3088  
  3089  // result is the default implementation for DatabaseAccountsCreateOrUpdateFuture.Result.
  3090  func (future *DatabaseAccountsCreateOrUpdateFuture) result(client DatabaseAccountsClient) (dagr DatabaseAccountGetResults, err error) {
  3091  	var done bool
  3092  	done, err = future.DoneWithContext(context.Background(), client)
  3093  	if err != nil {
  3094  		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  3095  		return
  3096  	}
  3097  	if !done {
  3098  		dagr.Response.Response = future.Response()
  3099  		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsCreateOrUpdateFuture")
  3100  		return
  3101  	}
  3102  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  3103  	if dagr.Response.Response, err = future.GetResult(sender); err == nil && dagr.Response.Response.StatusCode != http.StatusNoContent {
  3104  		dagr, err = client.CreateOrUpdateResponder(dagr.Response.Response)
  3105  		if err != nil {
  3106  			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateOrUpdateFuture", "Result", dagr.Response.Response, "Failure responding to request")
  3107  		}
  3108  	}
  3109  	return
  3110  }
  3111  
  3112  // DatabaseAccountsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
  3113  // operation.
  3114  type DatabaseAccountsDeleteFuture struct {
  3115  	azure.FutureAPI
  3116  	// Result returns the result of the asynchronous operation.
  3117  	// If the operation has not completed it will return an error.
  3118  	Result func(DatabaseAccountsClient) (autorest.Response, error)
  3119  }
  3120  
  3121  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  3122  func (future *DatabaseAccountsDeleteFuture) UnmarshalJSON(body []byte) error {
  3123  	var azFuture azure.Future
  3124  	if err := json.Unmarshal(body, &azFuture); err != nil {
  3125  		return err
  3126  	}
  3127  	future.FutureAPI = &azFuture
  3128  	future.Result = future.result
  3129  	return nil
  3130  }
  3131  
  3132  // result is the default implementation for DatabaseAccountsDeleteFuture.Result.
  3133  func (future *DatabaseAccountsDeleteFuture) result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
  3134  	var done bool
  3135  	done, err = future.DoneWithContext(context.Background(), client)
  3136  	if err != nil {
  3137  		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsDeleteFuture", "Result", future.Response(), "Polling failure")
  3138  		return
  3139  	}
  3140  	if !done {
  3141  		ar.Response = future.Response()
  3142  		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsDeleteFuture")
  3143  		return
  3144  	}
  3145  	ar.Response = future.Response()
  3146  	return
  3147  }
  3148  
  3149  // DatabaseAccountsFailoverPriorityChangeFuture an abstraction for monitoring and retrieving the results of
  3150  // a long-running operation.
  3151  type DatabaseAccountsFailoverPriorityChangeFuture struct {
  3152  	azure.FutureAPI
  3153  	// Result returns the result of the asynchronous operation.
  3154  	// If the operation has not completed it will return an error.
  3155  	Result func(DatabaseAccountsClient) (autorest.Response, error)
  3156  }
  3157  
  3158  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  3159  func (future *DatabaseAccountsFailoverPriorityChangeFuture) UnmarshalJSON(body []byte) error {
  3160  	var azFuture azure.Future
  3161  	if err := json.Unmarshal(body, &azFuture); err != nil {
  3162  		return err
  3163  	}
  3164  	future.FutureAPI = &azFuture
  3165  	future.Result = future.result
  3166  	return nil
  3167  }
  3168  
  3169  // result is the default implementation for DatabaseAccountsFailoverPriorityChangeFuture.Result.
  3170  func (future *DatabaseAccountsFailoverPriorityChangeFuture) result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
  3171  	var done bool
  3172  	done, err = future.DoneWithContext(context.Background(), client)
  3173  	if err != nil {
  3174  		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsFailoverPriorityChangeFuture", "Result", future.Response(), "Polling failure")
  3175  		return
  3176  	}
  3177  	if !done {
  3178  		ar.Response = future.Response()
  3179  		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsFailoverPriorityChangeFuture")
  3180  		return
  3181  	}
  3182  	ar.Response = future.Response()
  3183  	return
  3184  }
  3185  
  3186  // DatabaseAccountsListResult the List operation response, that contains the database accounts and their
  3187  // properties.
  3188  type DatabaseAccountsListResult struct {
  3189  	autorest.Response `json:"-"`
  3190  	// Value - READ-ONLY; List of database account and their properties.
  3191  	Value *[]DatabaseAccountGetResults `json:"value,omitempty"`
  3192  }
  3193  
  3194  // MarshalJSON is the custom marshaler for DatabaseAccountsListResult.
  3195  func (dalr DatabaseAccountsListResult) MarshalJSON() ([]byte, error) {
  3196  	objectMap := make(map[string]interface{})
  3197  	return json.Marshal(objectMap)
  3198  }
  3199  
  3200  // DatabaseAccountsOfflineRegionFuture an abstraction for monitoring and retrieving the results of a
  3201  // long-running operation.
  3202  type DatabaseAccountsOfflineRegionFuture struct {
  3203  	azure.FutureAPI
  3204  	// Result returns the result of the asynchronous operation.
  3205  	// If the operation has not completed it will return an error.
  3206  	Result func(DatabaseAccountsClient) (autorest.Response, error)
  3207  }
  3208  
  3209  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  3210  func (future *DatabaseAccountsOfflineRegionFuture) UnmarshalJSON(body []byte) error {
  3211  	var azFuture azure.Future
  3212  	if err := json.Unmarshal(body, &azFuture); err != nil {
  3213  		return err
  3214  	}
  3215  	future.FutureAPI = &azFuture
  3216  	future.Result = future.result
  3217  	return nil
  3218  }
  3219  
  3220  // result is the default implementation for DatabaseAccountsOfflineRegionFuture.Result.
  3221  func (future *DatabaseAccountsOfflineRegionFuture) result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
  3222  	var done bool
  3223  	done, err = future.DoneWithContext(context.Background(), client)
  3224  	if err != nil {
  3225  		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsOfflineRegionFuture", "Result", future.Response(), "Polling failure")
  3226  		return
  3227  	}
  3228  	if !done {
  3229  		ar.Response = future.Response()
  3230  		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsOfflineRegionFuture")
  3231  		return
  3232  	}
  3233  	ar.Response = future.Response()
  3234  	return
  3235  }
  3236  
  3237  // DatabaseAccountsOnlineRegionFuture an abstraction for monitoring and retrieving the results of a
  3238  // long-running operation.
  3239  type DatabaseAccountsOnlineRegionFuture struct {
  3240  	azure.FutureAPI
  3241  	// Result returns the result of the asynchronous operation.
  3242  	// If the operation has not completed it will return an error.
  3243  	Result func(DatabaseAccountsClient) (autorest.Response, error)
  3244  }
  3245  
  3246  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  3247  func (future *DatabaseAccountsOnlineRegionFuture) UnmarshalJSON(body []byte) error {
  3248  	var azFuture azure.Future
  3249  	if err := json.Unmarshal(body, &azFuture); err != nil {
  3250  		return err
  3251  	}
  3252  	future.FutureAPI = &azFuture
  3253  	future.Result = future.result
  3254  	return nil
  3255  }
  3256  
  3257  // result is the default implementation for DatabaseAccountsOnlineRegionFuture.Result.
  3258  func (future *DatabaseAccountsOnlineRegionFuture) result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
  3259  	var done bool
  3260  	done, err = future.DoneWithContext(context.Background(), client)
  3261  	if err != nil {
  3262  		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsOnlineRegionFuture", "Result", future.Response(), "Polling failure")
  3263  		return
  3264  	}
  3265  	if !done {
  3266  		ar.Response = future.Response()
  3267  		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsOnlineRegionFuture")
  3268  		return
  3269  	}
  3270  	ar.Response = future.Response()
  3271  	return
  3272  }
  3273  
  3274  // DatabaseAccountsRegenerateKeyFuture an abstraction for monitoring and retrieving the results of a
  3275  // long-running operation.
  3276  type DatabaseAccountsRegenerateKeyFuture struct {
  3277  	azure.FutureAPI
  3278  	// Result returns the result of the asynchronous operation.
  3279  	// If the operation has not completed it will return an error.
  3280  	Result func(DatabaseAccountsClient) (autorest.Response, error)
  3281  }
  3282  
  3283  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  3284  func (future *DatabaseAccountsRegenerateKeyFuture) UnmarshalJSON(body []byte) error {
  3285  	var azFuture azure.Future
  3286  	if err := json.Unmarshal(body, &azFuture); err != nil {
  3287  		return err
  3288  	}
  3289  	future.FutureAPI = &azFuture
  3290  	future.Result = future.result
  3291  	return nil
  3292  }
  3293  
  3294  // result is the default implementation for DatabaseAccountsRegenerateKeyFuture.Result.
  3295  func (future *DatabaseAccountsRegenerateKeyFuture) result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
  3296  	var done bool
  3297  	done, err = future.DoneWithContext(context.Background(), client)
  3298  	if err != nil {
  3299  		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsRegenerateKeyFuture", "Result", future.Response(), "Polling failure")
  3300  		return
  3301  	}
  3302  	if !done {
  3303  		ar.Response = future.Response()
  3304  		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsRegenerateKeyFuture")
  3305  		return
  3306  	}
  3307  	ar.Response = future.Response()
  3308  	return
  3309  }
  3310  
  3311  // DatabaseAccountsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
  3312  // operation.
  3313  type DatabaseAccountsUpdateFuture struct {
  3314  	azure.FutureAPI
  3315  	// Result returns the result of the asynchronous operation.
  3316  	// If the operation has not completed it will return an error.
  3317  	Result func(DatabaseAccountsClient) (DatabaseAccountGetResults, error)
  3318  }
  3319  
  3320  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  3321  func (future *DatabaseAccountsUpdateFuture) UnmarshalJSON(body []byte) error {
  3322  	var azFuture azure.Future
  3323  	if err := json.Unmarshal(body, &azFuture); err != nil {
  3324  		return err
  3325  	}
  3326  	future.FutureAPI = &azFuture
  3327  	future.Result = future.result
  3328  	return nil
  3329  }
  3330  
  3331  // result is the default implementation for DatabaseAccountsUpdateFuture.Result.
  3332  func (future *DatabaseAccountsUpdateFuture) result(client DatabaseAccountsClient) (dagr DatabaseAccountGetResults, err error) {
  3333  	var done bool
  3334  	done, err = future.DoneWithContext(context.Background(), client)
  3335  	if err != nil {
  3336  		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateFuture", "Result", future.Response(), "Polling failure")
  3337  		return
  3338  	}
  3339  	if !done {
  3340  		dagr.Response.Response = future.Response()
  3341  		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsUpdateFuture")
  3342  		return
  3343  	}
  3344  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  3345  	if dagr.Response.Response, err = future.GetResult(sender); err == nil && dagr.Response.Response.StatusCode != http.StatusNoContent {
  3346  		dagr, err = client.UpdateResponder(dagr.Response.Response)
  3347  		if err != nil {
  3348  			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateFuture", "Result", dagr.Response.Response, "Failure responding to request")
  3349  		}
  3350  	}
  3351  	return
  3352  }
  3353  
  3354  // DatabaseAccountUpdateParameters parameters for patching Azure Cosmos DB database account properties.
  3355  type DatabaseAccountUpdateParameters struct {
  3356  	Tags map[string]*string `json:"tags"`
  3357  	// Location - The location of the resource group to which the resource belongs.
  3358  	Location                         *string `json:"location,omitempty"`
  3359  	*DatabaseAccountUpdateProperties `json:"properties,omitempty"`
  3360  	Identity                         *ManagedServiceIdentity `json:"identity,omitempty"`
  3361  }
  3362  
  3363  // MarshalJSON is the custom marshaler for DatabaseAccountUpdateParameters.
  3364  func (daup DatabaseAccountUpdateParameters) MarshalJSON() ([]byte, error) {
  3365  	objectMap := make(map[string]interface{})
  3366  	if daup.Tags != nil {
  3367  		objectMap["tags"] = daup.Tags
  3368  	}
  3369  	if daup.Location != nil {
  3370  		objectMap["location"] = daup.Location
  3371  	}
  3372  	if daup.DatabaseAccountUpdateProperties != nil {
  3373  		objectMap["properties"] = daup.DatabaseAccountUpdateProperties
  3374  	}
  3375  	if daup.Identity != nil {
  3376  		objectMap["identity"] = daup.Identity
  3377  	}
  3378  	return json.Marshal(objectMap)
  3379  }
  3380  
  3381  // UnmarshalJSON is the custom unmarshaler for DatabaseAccountUpdateParameters struct.
  3382  func (daup *DatabaseAccountUpdateParameters) UnmarshalJSON(body []byte) error {
  3383  	var m map[string]*json.RawMessage
  3384  	err := json.Unmarshal(body, &m)
  3385  	if err != nil {
  3386  		return err
  3387  	}
  3388  	for k, v := range m {
  3389  		switch k {
  3390  		case "tags":
  3391  			if v != nil {
  3392  				var tags map[string]*string
  3393  				err = json.Unmarshal(*v, &tags)
  3394  				if err != nil {
  3395  					return err
  3396  				}
  3397  				daup.Tags = tags
  3398  			}
  3399  		case "location":
  3400  			if v != nil {
  3401  				var location string
  3402  				err = json.Unmarshal(*v, &location)
  3403  				if err != nil {
  3404  					return err
  3405  				}
  3406  				daup.Location = &location
  3407  			}
  3408  		case "properties":
  3409  			if v != nil {
  3410  				var databaseAccountUpdateProperties DatabaseAccountUpdateProperties
  3411  				err = json.Unmarshal(*v, &databaseAccountUpdateProperties)
  3412  				if err != nil {
  3413  					return err
  3414  				}
  3415  				daup.DatabaseAccountUpdateProperties = &databaseAccountUpdateProperties
  3416  			}
  3417  		case "identity":
  3418  			if v != nil {
  3419  				var identity ManagedServiceIdentity
  3420  				err = json.Unmarshal(*v, &identity)
  3421  				if err != nil {
  3422  					return err
  3423  				}
  3424  				daup.Identity = &identity
  3425  			}
  3426  		}
  3427  	}
  3428  
  3429  	return nil
  3430  }
  3431  
  3432  // DatabaseAccountUpdateProperties properties to update Azure Cosmos DB database accounts.
  3433  type DatabaseAccountUpdateProperties struct {
  3434  	// ConsistencyPolicy - The consistency policy for the Cosmos DB account.
  3435  	ConsistencyPolicy *ConsistencyPolicy `json:"consistencyPolicy,omitempty"`
  3436  	// Locations - An array that contains the georeplication locations enabled for the Cosmos DB account.
  3437  	Locations *[]Location `json:"locations,omitempty"`
  3438  	// IPRules - List of IpRules.
  3439  	IPRules *[]IPAddressOrRange `json:"ipRules,omitempty"`
  3440  	// IsVirtualNetworkFilterEnabled - Flag to indicate whether to enable/disable Virtual Network ACL rules.
  3441  	IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty"`
  3442  	// EnableAutomaticFailover - Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account.
  3443  	EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty"`
  3444  	// Capabilities - List of Cosmos DB capabilities for the account
  3445  	Capabilities *[]Capability `json:"capabilities,omitempty"`
  3446  	// VirtualNetworkRules - List of Virtual Network ACL rules configured for the Cosmos DB account.
  3447  	VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"`
  3448  	// EnableMultipleWriteLocations - Enables the account to write in multiple locations
  3449  	EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"`
  3450  	// EnableCassandraConnector - Enables the cassandra connector on the Cosmos DB C* account
  3451  	EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"`
  3452  	// ConnectorOffer - The cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'ConnectorOfferSmall'
  3453  	ConnectorOffer ConnectorOffer `json:"connectorOffer,omitempty"`
  3454  	// DisableKeyBasedMetadataWriteAccess - Disable write operations on metadata resources (databases, containers, throughput) via account keys
  3455  	DisableKeyBasedMetadataWriteAccess *bool `json:"disableKeyBasedMetadataWriteAccess,omitempty"`
  3456  	// KeyVaultKeyURI - The URI of the key vault
  3457  	KeyVaultKeyURI *string `json:"keyVaultKeyUri,omitempty"`
  3458  	// DefaultIdentity - The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more.
  3459  	DefaultIdentity *string `json:"defaultIdentity,omitempty"`
  3460  	// PublicNetworkAccess - Whether requests from Public Network are allowed. Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled'
  3461  	PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`
  3462  	// EnableFreeTier - Flag to indicate whether Free Tier is enabled.
  3463  	EnableFreeTier *bool `json:"enableFreeTier,omitempty"`
  3464  	// APIProperties - API specific properties. Currently, supported only for MongoDB API.
  3465  	APIProperties *APIProperties `json:"apiProperties,omitempty"`
  3466  	// EnableAnalyticalStorage - Flag to indicate whether to enable storage analytics.
  3467  	EnableAnalyticalStorage *bool `json:"enableAnalyticalStorage,omitempty"`
  3468  	// BackupPolicy - The object representing the policy for taking backups on an account.
  3469  	BackupPolicy BasicBackupPolicy `json:"backupPolicy,omitempty"`
  3470  	// Cors - The CORS policy for the Cosmos DB database account.
  3471  	Cors *[]CorsPolicy `json:"cors,omitempty"`
  3472  	// NetworkACLBypass - Indicates what services are allowed to bypass firewall checks. Possible values include: 'NetworkACLBypassNone', 'NetworkACLBypassAzureServices'
  3473  	NetworkACLBypass NetworkACLBypass `json:"networkAclBypass,omitempty"`
  3474  	// NetworkACLBypassResourceIds - An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account.
  3475  	NetworkACLBypassResourceIds *[]string `json:"networkAclBypassResourceIds,omitempty"`
  3476  }
  3477  
  3478  // UnmarshalJSON is the custom unmarshaler for DatabaseAccountUpdateProperties struct.
  3479  func (daup *DatabaseAccountUpdateProperties) UnmarshalJSON(body []byte) error {
  3480  	var m map[string]*json.RawMessage
  3481  	err := json.Unmarshal(body, &m)
  3482  	if err != nil {
  3483  		return err
  3484  	}
  3485  	for k, v := range m {
  3486  		switch k {
  3487  		case "consistencyPolicy":
  3488  			if v != nil {
  3489  				var consistencyPolicy ConsistencyPolicy
  3490  				err = json.Unmarshal(*v, &consistencyPolicy)
  3491  				if err != nil {
  3492  					return err
  3493  				}
  3494  				daup.ConsistencyPolicy = &consistencyPolicy
  3495  			}
  3496  		case "locations":
  3497  			if v != nil {
  3498  				var locations []Location
  3499  				err = json.Unmarshal(*v, &locations)
  3500  				if err != nil {
  3501  					return err
  3502  				}
  3503  				daup.Locations = &locations
  3504  			}
  3505  		case "ipRules":
  3506  			if v != nil {
  3507  				var IPRules []IPAddressOrRange
  3508  				err = json.Unmarshal(*v, &IPRules)
  3509  				if err != nil {
  3510  					return err
  3511  				}
  3512  				daup.IPRules = &IPRules
  3513  			}
  3514  		case "isVirtualNetworkFilterEnabled":
  3515  			if v != nil {
  3516  				var isVirtualNetworkFilterEnabled bool
  3517  				err = json.Unmarshal(*v, &isVirtualNetworkFilterEnabled)
  3518  				if err != nil {
  3519  					return err
  3520  				}
  3521  				daup.IsVirtualNetworkFilterEnabled = &isVirtualNetworkFilterEnabled
  3522  			}
  3523  		case "enableAutomaticFailover":
  3524  			if v != nil {
  3525  				var enableAutomaticFailover bool
  3526  				err = json.Unmarshal(*v, &enableAutomaticFailover)
  3527  				if err != nil {
  3528  					return err
  3529  				}
  3530  				daup.EnableAutomaticFailover = &enableAutomaticFailover
  3531  			}
  3532  		case "capabilities":
  3533  			if v != nil {
  3534  				var capabilities []Capability
  3535  				err = json.Unmarshal(*v, &capabilities)
  3536  				if err != nil {
  3537  					return err
  3538  				}
  3539  				daup.Capabilities = &capabilities
  3540  			}
  3541  		case "virtualNetworkRules":
  3542  			if v != nil {
  3543  				var virtualNetworkRules []VirtualNetworkRule
  3544  				err = json.Unmarshal(*v, &virtualNetworkRules)
  3545  				if err != nil {
  3546  					return err
  3547  				}
  3548  				daup.VirtualNetworkRules = &virtualNetworkRules
  3549  			}
  3550  		case "enableMultipleWriteLocations":
  3551  			if v != nil {
  3552  				var enableMultipleWriteLocations bool
  3553  				err = json.Unmarshal(*v, &enableMultipleWriteLocations)
  3554  				if err != nil {
  3555  					return err
  3556  				}
  3557  				daup.EnableMultipleWriteLocations = &enableMultipleWriteLocations
  3558  			}
  3559  		case "enableCassandraConnector":
  3560  			if v != nil {
  3561  				var enableCassandraConnector bool
  3562  				err = json.Unmarshal(*v, &enableCassandraConnector)
  3563  				if err != nil {
  3564  					return err
  3565  				}
  3566  				daup.EnableCassandraConnector = &enableCassandraConnector
  3567  			}
  3568  		case "connectorOffer":
  3569  			if v != nil {
  3570  				var connectorOffer ConnectorOffer
  3571  				err = json.Unmarshal(*v, &connectorOffer)
  3572  				if err != nil {
  3573  					return err
  3574  				}
  3575  				daup.ConnectorOffer = connectorOffer
  3576  			}
  3577  		case "disableKeyBasedMetadataWriteAccess":
  3578  			if v != nil {
  3579  				var disableKeyBasedMetadataWriteAccess bool
  3580  				err = json.Unmarshal(*v, &disableKeyBasedMetadataWriteAccess)
  3581  				if err != nil {
  3582  					return err
  3583  				}
  3584  				daup.DisableKeyBasedMetadataWriteAccess = &disableKeyBasedMetadataWriteAccess
  3585  			}
  3586  		case "keyVaultKeyUri":
  3587  			if v != nil {
  3588  				var keyVaultKeyURI string
  3589  				err = json.Unmarshal(*v, &keyVaultKeyURI)
  3590  				if err != nil {
  3591  					return err
  3592  				}
  3593  				daup.KeyVaultKeyURI = &keyVaultKeyURI
  3594  			}
  3595  		case "defaultIdentity":
  3596  			if v != nil {
  3597  				var defaultIdentity string
  3598  				err = json.Unmarshal(*v, &defaultIdentity)
  3599  				if err != nil {
  3600  					return err
  3601  				}
  3602  				daup.DefaultIdentity = &defaultIdentity
  3603  			}
  3604  		case "publicNetworkAccess":
  3605  			if v != nil {
  3606  				var publicNetworkAccess PublicNetworkAccess
  3607  				err = json.Unmarshal(*v, &publicNetworkAccess)
  3608  				if err != nil {
  3609  					return err
  3610  				}
  3611  				daup.PublicNetworkAccess = publicNetworkAccess
  3612  			}
  3613  		case "enableFreeTier":
  3614  			if v != nil {
  3615  				var enableFreeTier bool
  3616  				err = json.Unmarshal(*v, &enableFreeTier)
  3617  				if err != nil {
  3618  					return err
  3619  				}
  3620  				daup.EnableFreeTier = &enableFreeTier
  3621  			}
  3622  		case "apiProperties":
  3623  			if v != nil {
  3624  				var APIProperties APIProperties
  3625  				err = json.Unmarshal(*v, &APIProperties)
  3626  				if err != nil {
  3627  					return err
  3628  				}
  3629  				daup.APIProperties = &APIProperties
  3630  			}
  3631  		case "enableAnalyticalStorage":
  3632  			if v != nil {
  3633  				var enableAnalyticalStorage bool
  3634  				err = json.Unmarshal(*v, &enableAnalyticalStorage)
  3635  				if err != nil {
  3636  					return err
  3637  				}
  3638  				daup.EnableAnalyticalStorage = &enableAnalyticalStorage
  3639  			}
  3640  		case "backupPolicy":
  3641  			if v != nil {
  3642  				backupPolicy, err := unmarshalBasicBackupPolicy(*v)
  3643  				if err != nil {
  3644  					return err
  3645  				}
  3646  				daup.BackupPolicy = backupPolicy
  3647  			}
  3648  		case "cors":
  3649  			if v != nil {
  3650  				var cors []CorsPolicy
  3651  				err = json.Unmarshal(*v, &cors)
  3652  				if err != nil {
  3653  					return err
  3654  				}
  3655  				daup.Cors = &cors
  3656  			}
  3657  		case "networkAclBypass":
  3658  			if v != nil {
  3659  				var networkACLBypass NetworkACLBypass
  3660  				err = json.Unmarshal(*v, &networkACLBypass)
  3661  				if err != nil {
  3662  					return err
  3663  				}
  3664  				daup.NetworkACLBypass = networkACLBypass
  3665  			}
  3666  		case "networkAclBypassResourceIds":
  3667  			if v != nil {
  3668  				var networkACLBypassResourceIds []string
  3669  				err = json.Unmarshal(*v, &networkACLBypassResourceIds)
  3670  				if err != nil {
  3671  					return err
  3672  				}
  3673  				daup.NetworkACLBypassResourceIds = &networkACLBypassResourceIds
  3674  			}
  3675  		}
  3676  	}
  3677  
  3678  	return nil
  3679  }
  3680  
  3681  // DatabaseRestoreResource specific Databases to restore.
  3682  type DatabaseRestoreResource struct {
  3683  	// DatabaseName - The name of the database available for restore.
  3684  	DatabaseName *string `json:"databaseName,omitempty"`
  3685  	// CollectionNames - The names of the collections available for restore.
  3686  	CollectionNames *[]string `json:"collectionNames,omitempty"`
  3687  }
  3688  
  3689  // DataCenterResource a managed Cassandra data center.
  3690  type DataCenterResource struct {
  3691  	autorest.Response `json:"-"`
  3692  	// Properties - Properties of a managed Cassandra data center.
  3693  	Properties *DataCenterResourceProperties `json:"properties,omitempty"`
  3694  	// ID - READ-ONLY; The unique resource identifier of the database account.
  3695  	ID *string `json:"id,omitempty"`
  3696  	// Name - READ-ONLY; The name of the database account.
  3697  	Name *string `json:"name,omitempty"`
  3698  	// Type - READ-ONLY; The type of Azure resource.
  3699  	Type *string `json:"type,omitempty"`
  3700  }
  3701  
  3702  // MarshalJSON is the custom marshaler for DataCenterResource.
  3703  func (dcr DataCenterResource) MarshalJSON() ([]byte, error) {
  3704  	objectMap := make(map[string]interface{})
  3705  	if dcr.Properties != nil {
  3706  		objectMap["properties"] = dcr.Properties
  3707  	}
  3708  	return json.Marshal(objectMap)
  3709  }
  3710  
  3711  // DataCenterResourceProperties properties of a managed Cassandra data center.
  3712  type DataCenterResourceProperties struct {
  3713  	// ProvisioningState - Possible values include: 'ManagedCassandraProvisioningStateCreating', 'ManagedCassandraProvisioningStateUpdating', 'ManagedCassandraProvisioningStateDeleting', 'ManagedCassandraProvisioningStateSucceeded', 'ManagedCassandraProvisioningStateFailed', 'ManagedCassandraProvisioningStateCanceled'
  3714  	ProvisioningState ManagedCassandraProvisioningState `json:"provisioningState,omitempty"`
  3715  	// DataCenterLocation - The region this data center should be created in.
  3716  	DataCenterLocation *string `json:"dataCenterLocation,omitempty"`
  3717  	// DelegatedSubnetID - Resource id of a subnet the nodes in this data center should have their network interfaces connected to. The subnet must be in the same region specified in 'dataCenterLocation' and must be able to route to the subnet specified in the cluster's 'delegatedManagementSubnetId' property. This resource id will be of the form '/subscriptions/<subscription id>/resourceGroups/<resource group>/providers/Microsoft.Network/virtualNetworks/<virtual network>/subnets/<subnet>'.
  3718  	DelegatedSubnetID *string `json:"delegatedSubnetId,omitempty"`
  3719  	// NodeCount - The number of nodes the data center should have. This is the desired number. After it is set, it may take some time for the data center to be scaled to match. To monitor the number of nodes and their status, use the fetchNodeStatus method on the cluster.
  3720  	NodeCount *int32 `json:"nodeCount,omitempty"`
  3721  	// SeedNodes - READ-ONLY; IP addresses for seed nodes in this data center. This is for reference. Generally you will want to use the seedNodes property on the cluster, which aggregates the seed nodes from all data centers in the cluster.
  3722  	SeedNodes *[]SeedNode `json:"seedNodes,omitempty"`
  3723  	// Base64EncodedCassandraYamlFragment - A fragment of a cassandra.yaml configuration file to be included in the cassandra.yaml for all nodes in this data center. The fragment should be Base64 encoded, and only a subset of keys are allowed.
  3724  	Base64EncodedCassandraYamlFragment *string `json:"base64EncodedCassandraYamlFragment,omitempty"`
  3725  }
  3726  
  3727  // MarshalJSON is the custom marshaler for DataCenterResourceProperties.
  3728  func (dcr DataCenterResourceProperties) MarshalJSON() ([]byte, error) {
  3729  	objectMap := make(map[string]interface{})
  3730  	if dcr.ProvisioningState != "" {
  3731  		objectMap["provisioningState"] = dcr.ProvisioningState
  3732  	}
  3733  	if dcr.DataCenterLocation != nil {
  3734  		objectMap["dataCenterLocation"] = dcr.DataCenterLocation
  3735  	}
  3736  	if dcr.DelegatedSubnetID != nil {
  3737  		objectMap["delegatedSubnetId"] = dcr.DelegatedSubnetID
  3738  	}
  3739  	if dcr.NodeCount != nil {
  3740  		objectMap["nodeCount"] = dcr.NodeCount
  3741  	}
  3742  	if dcr.Base64EncodedCassandraYamlFragment != nil {
  3743  		objectMap["base64EncodedCassandraYamlFragment"] = dcr.Base64EncodedCassandraYamlFragment
  3744  	}
  3745  	return json.Marshal(objectMap)
  3746  }
  3747  
  3748  // DataTransferRegionalServiceResource resource for a regional service location.
  3749  type DataTransferRegionalServiceResource struct {
  3750  	// Name - READ-ONLY; The regional service name.
  3751  	Name *string `json:"name,omitempty"`
  3752  	// Location - READ-ONLY; The location name.
  3753  	Location *string `json:"location,omitempty"`
  3754  	// Status - READ-ONLY; Possible values include: 'ServiceStatusCreating', 'ServiceStatusRunning', 'ServiceStatusUpdating', 'ServiceStatusDeleting', 'ServiceStatusError', 'ServiceStatusStopped'
  3755  	Status ServiceStatus `json:"status,omitempty"`
  3756  }
  3757  
  3758  // MarshalJSON is the custom marshaler for DataTransferRegionalServiceResource.
  3759  func (dtrsr DataTransferRegionalServiceResource) MarshalJSON() ([]byte, error) {
  3760  	objectMap := make(map[string]interface{})
  3761  	return json.Marshal(objectMap)
  3762  }
  3763  
  3764  // DataTransferServiceResource describes the service response property.
  3765  type DataTransferServiceResource struct {
  3766  	Properties *DataTransferServiceResourceProperties `json:"properties,omitempty"`
  3767  }
  3768  
  3769  // DataTransferServiceResourceProperties properties for DataTransferServiceResource.
  3770  type DataTransferServiceResourceProperties struct {
  3771  	// Locations - READ-ONLY; An array that contains all of the locations for the service.
  3772  	Locations *[]DataTransferRegionalServiceResource `json:"locations,omitempty"`
  3773  	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
  3774  	AdditionalProperties map[string]interface{} `json:""`
  3775  	// CreationTime - READ-ONLY; Time of the last state change (ISO-8601 format).
  3776  	CreationTime *date.Time `json:"creationTime,omitempty"`
  3777  	// InstanceSize - Possible values include: 'ServiceSizeCosmosD4s', 'ServiceSizeCosmosD8s', 'ServiceSizeCosmosD16s'
  3778  	InstanceSize ServiceSize `json:"instanceSize,omitempty"`
  3779  	// InstanceCount - Instance count for the service.
  3780  	InstanceCount *int32 `json:"instanceCount,omitempty"`
  3781  	// Status - READ-ONLY; Possible values include: 'ServiceStatusCreating', 'ServiceStatusRunning', 'ServiceStatusUpdating', 'ServiceStatusDeleting', 'ServiceStatusError', 'ServiceStatusStopped'
  3782  	Status ServiceStatus `json:"status,omitempty"`
  3783  	// ServiceType - Possible values include: 'ServiceTypeBasicServiceResourcePropertiesServiceTypeServiceResourceProperties', 'ServiceTypeBasicServiceResourcePropertiesServiceTypeDataTransferServiceResourceProperties', 'ServiceTypeBasicServiceResourcePropertiesServiceTypeSQLDedicatedGatewayServiceResourceProperties'
  3784  	ServiceType ServiceTypeBasicServiceResourceProperties `json:"serviceType,omitempty"`
  3785  }
  3786  
  3787  // MarshalJSON is the custom marshaler for DataTransferServiceResourceProperties.
  3788  func (dtsrp DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) {
  3789  	dtsrp.ServiceType = ServiceTypeBasicServiceResourcePropertiesServiceTypeDataTransferServiceResourceProperties
  3790  	objectMap := make(map[string]interface{})
  3791  	if dtsrp.InstanceSize != "" {
  3792  		objectMap["instanceSize"] = dtsrp.InstanceSize
  3793  	}
  3794  	if dtsrp.InstanceCount != nil {
  3795  		objectMap["instanceCount"] = dtsrp.InstanceCount
  3796  	}
  3797  	if dtsrp.ServiceType != "" {
  3798  		objectMap["serviceType"] = dtsrp.ServiceType
  3799  	}
  3800  	for k, v := range dtsrp.AdditionalProperties {
  3801  		objectMap[k] = v
  3802  	}
  3803  	return json.Marshal(objectMap)
  3804  }
  3805  
  3806  // AsDataTransferServiceResourceProperties is the BasicServiceResourceProperties implementation for DataTransferServiceResourceProperties.
  3807  func (dtsrp DataTransferServiceResourceProperties) AsDataTransferServiceResourceProperties() (*DataTransferServiceResourceProperties, bool) {
  3808  	return &dtsrp, true
  3809  }
  3810  
  3811  // AsSQLDedicatedGatewayServiceResourceProperties is the BasicServiceResourceProperties implementation for DataTransferServiceResourceProperties.
  3812  func (dtsrp DataTransferServiceResourceProperties) AsSQLDedicatedGatewayServiceResourceProperties() (*SQLDedicatedGatewayServiceResourceProperties, bool) {
  3813  	return nil, false
  3814  }
  3815  
  3816  // AsServiceResourceProperties is the BasicServiceResourceProperties implementation for DataTransferServiceResourceProperties.
  3817  func (dtsrp DataTransferServiceResourceProperties) AsServiceResourceProperties() (*ServiceResourceProperties, bool) {
  3818  	return nil, false
  3819  }
  3820  
  3821  // AsBasicServiceResourceProperties is the BasicServiceResourceProperties implementation for DataTransferServiceResourceProperties.
  3822  func (dtsrp DataTransferServiceResourceProperties) AsBasicServiceResourceProperties() (BasicServiceResourceProperties, bool) {
  3823  	return &dtsrp, true
  3824  }
  3825  
  3826  // UnmarshalJSON is the custom unmarshaler for DataTransferServiceResourceProperties struct.
  3827  func (dtsrp *DataTransferServiceResourceProperties) UnmarshalJSON(body []byte) error {
  3828  	var m map[string]*json.RawMessage
  3829  	err := json.Unmarshal(body, &m)
  3830  	if err != nil {
  3831  		return err
  3832  	}
  3833  	for k, v := range m {
  3834  		switch k {
  3835  		case "locations":
  3836  			if v != nil {
  3837  				var locations []DataTransferRegionalServiceResource
  3838  				err = json.Unmarshal(*v, &locations)
  3839  				if err != nil {
  3840  					return err
  3841  				}
  3842  				dtsrp.Locations = &locations
  3843  			}
  3844  		default:
  3845  			if v != nil {
  3846  				var additionalProperties interface{}
  3847  				err = json.Unmarshal(*v, &additionalProperties)
  3848  				if err != nil {
  3849  					return err
  3850  				}
  3851  				if dtsrp.AdditionalProperties == nil {
  3852  					dtsrp.AdditionalProperties = make(map[string]interface{})
  3853  				}
  3854  				dtsrp.AdditionalProperties[k] = additionalProperties
  3855  			}
  3856  		case "creationTime":
  3857  			if v != nil {
  3858  				var creationTime date.Time
  3859  				err = json.Unmarshal(*v, &creationTime)
  3860  				if err != nil {
  3861  					return err
  3862  				}
  3863  				dtsrp.CreationTime = &creationTime
  3864  			}
  3865  		case "instanceSize":
  3866  			if v != nil {
  3867  				var instanceSize ServiceSize
  3868  				err = json.Unmarshal(*v, &instanceSize)
  3869  				if err != nil {
  3870  					return err
  3871  				}
  3872  				dtsrp.InstanceSize = instanceSize
  3873  			}
  3874  		case "instanceCount":
  3875  			if v != nil {
  3876  				var instanceCount int32
  3877  				err = json.Unmarshal(*v, &instanceCount)
  3878  				if err != nil {
  3879  					return err
  3880  				}
  3881  				dtsrp.InstanceCount = &instanceCount
  3882  			}
  3883  		case "status":
  3884  			if v != nil {
  3885  				var status ServiceStatus
  3886  				err = json.Unmarshal(*v, &status)
  3887  				if err != nil {
  3888  					return err
  3889  				}
  3890  				dtsrp.Status = status
  3891  			}
  3892  		case "serviceType":
  3893  			if v != nil {
  3894  				var serviceType ServiceTypeBasicServiceResourceProperties
  3895  				err = json.Unmarshal(*v, &serviceType)
  3896  				if err != nil {
  3897  					return err
  3898  				}
  3899  				dtsrp.ServiceType = serviceType
  3900  			}
  3901  		}
  3902  	}
  3903  
  3904  	return nil
  3905  }
  3906  
  3907  // DefaultRequestDatabaseAccountCreateUpdateProperties properties for non-restore Azure Cosmos DB database
  3908  // account requests.
  3909  type DefaultRequestDatabaseAccountCreateUpdateProperties struct {
  3910  	// ConsistencyPolicy - The consistency policy for the Cosmos DB account.
  3911  	ConsistencyPolicy *ConsistencyPolicy `json:"consistencyPolicy,omitempty"`
  3912  	// Locations - An array that contains the georeplication locations enabled for the Cosmos DB account.
  3913  	Locations *[]Location `json:"locations,omitempty"`
  3914  	// DatabaseAccountOfferType - The offer type for the database
  3915  	DatabaseAccountOfferType *string `json:"databaseAccountOfferType,omitempty"`
  3916  	// IPRules - List of IpRules.
  3917  	IPRules *[]IPAddressOrRange `json:"ipRules,omitempty"`
  3918  	// IsVirtualNetworkFilterEnabled - Flag to indicate whether to enable/disable Virtual Network ACL rules.
  3919  	IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty"`
  3920  	// EnableAutomaticFailover - Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account.
  3921  	EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty"`
  3922  	// Capabilities - List of Cosmos DB capabilities for the account
  3923  	Capabilities *[]Capability `json:"capabilities,omitempty"`
  3924  	// VirtualNetworkRules - List of Virtual Network ACL rules configured for the Cosmos DB account.
  3925  	VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"`
  3926  	// EnableMultipleWriteLocations - Enables the account to write in multiple locations
  3927  	EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"`
  3928  	// EnableCassandraConnector - Enables the cassandra connector on the Cosmos DB C* account
  3929  	EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"`
  3930  	// ConnectorOffer - The cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'ConnectorOfferSmall'
  3931  	ConnectorOffer ConnectorOffer `json:"connectorOffer,omitempty"`
  3932  	// DisableKeyBasedMetadataWriteAccess - Disable write operations on metadata resources (databases, containers, throughput) via account keys
  3933  	DisableKeyBasedMetadataWriteAccess *bool `json:"disableKeyBasedMetadataWriteAccess,omitempty"`
  3934  	// KeyVaultKeyURI - The URI of the key vault
  3935  	KeyVaultKeyURI *string `json:"keyVaultKeyUri,omitempty"`
  3936  	// DefaultIdentity - The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more.
  3937  	DefaultIdentity *string `json:"defaultIdentity,omitempty"`
  3938  	// PublicNetworkAccess - Whether requests from Public Network are allowed. Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled'
  3939  	PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`
  3940  	// EnableFreeTier - Flag to indicate whether Free Tier is enabled.
  3941  	EnableFreeTier *bool `json:"enableFreeTier,omitempty"`
  3942  	// APIProperties - API specific properties. Currently, supported only for MongoDB API.
  3943  	APIProperties *APIProperties `json:"apiProperties,omitempty"`
  3944  	// EnableAnalyticalStorage - Flag to indicate whether to enable storage analytics.
  3945  	EnableAnalyticalStorage *bool `json:"enableAnalyticalStorage,omitempty"`
  3946  	// BackupPolicy - The object representing the policy for taking backups on an account.
  3947  	BackupPolicy BasicBackupPolicy `json:"backupPolicy,omitempty"`
  3948  	// Cors - The CORS policy for the Cosmos DB database account.
  3949  	Cors *[]CorsPolicy `json:"cors,omitempty"`
  3950  	// NetworkACLBypass - Indicates what services are allowed to bypass firewall checks. Possible values include: 'NetworkACLBypassNone', 'NetworkACLBypassAzureServices'
  3951  	NetworkACLBypass NetworkACLBypass `json:"networkAclBypass,omitempty"`
  3952  	// NetworkACLBypassResourceIds - An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account.
  3953  	NetworkACLBypassResourceIds *[]string `json:"networkAclBypassResourceIds,omitempty"`
  3954  	// CreateMode - Possible values include: 'CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDatabaseAccountCreateUpdateProperties', 'CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDefault', 'CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeRestore'
  3955  	CreateMode CreateModeBasicDatabaseAccountCreateUpdateProperties `json:"createMode,omitempty"`
  3956  }
  3957  
  3958  // MarshalJSON is the custom marshaler for DefaultRequestDatabaseAccountCreateUpdateProperties.
  3959  func (drdacup DefaultRequestDatabaseAccountCreateUpdateProperties) MarshalJSON() ([]byte, error) {
  3960  	drdacup.CreateMode = CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDefault
  3961  	objectMap := make(map[string]interface{})
  3962  	if drdacup.ConsistencyPolicy != nil {
  3963  		objectMap["consistencyPolicy"] = drdacup.ConsistencyPolicy
  3964  	}
  3965  	if drdacup.Locations != nil {
  3966  		objectMap["locations"] = drdacup.Locations
  3967  	}
  3968  	if drdacup.DatabaseAccountOfferType != nil {
  3969  		objectMap["databaseAccountOfferType"] = drdacup.DatabaseAccountOfferType
  3970  	}
  3971  	if drdacup.IPRules != nil {
  3972  		objectMap["ipRules"] = drdacup.IPRules
  3973  	}
  3974  	if drdacup.IsVirtualNetworkFilterEnabled != nil {
  3975  		objectMap["isVirtualNetworkFilterEnabled"] = drdacup.IsVirtualNetworkFilterEnabled
  3976  	}
  3977  	if drdacup.EnableAutomaticFailover != nil {
  3978  		objectMap["enableAutomaticFailover"] = drdacup.EnableAutomaticFailover
  3979  	}
  3980  	if drdacup.Capabilities != nil {
  3981  		objectMap["capabilities"] = drdacup.Capabilities
  3982  	}
  3983  	if drdacup.VirtualNetworkRules != nil {
  3984  		objectMap["virtualNetworkRules"] = drdacup.VirtualNetworkRules
  3985  	}
  3986  	if drdacup.EnableMultipleWriteLocations != nil {
  3987  		objectMap["enableMultipleWriteLocations"] = drdacup.EnableMultipleWriteLocations
  3988  	}
  3989  	if drdacup.EnableCassandraConnector != nil {
  3990  		objectMap["enableCassandraConnector"] = drdacup.EnableCassandraConnector
  3991  	}
  3992  	if drdacup.ConnectorOffer != "" {
  3993  		objectMap["connectorOffer"] = drdacup.ConnectorOffer
  3994  	}
  3995  	if drdacup.DisableKeyBasedMetadataWriteAccess != nil {
  3996  		objectMap["disableKeyBasedMetadataWriteAccess"] = drdacup.DisableKeyBasedMetadataWriteAccess
  3997  	}
  3998  	if drdacup.KeyVaultKeyURI != nil {
  3999  		objectMap["keyVaultKeyUri"] = drdacup.KeyVaultKeyURI
  4000  	}
  4001  	if drdacup.DefaultIdentity != nil {
  4002  		objectMap["defaultIdentity"] = drdacup.DefaultIdentity
  4003  	}
  4004  	if drdacup.PublicNetworkAccess != "" {
  4005  		objectMap["publicNetworkAccess"] = drdacup.PublicNetworkAccess
  4006  	}
  4007  	if drdacup.EnableFreeTier != nil {
  4008  		objectMap["enableFreeTier"] = drdacup.EnableFreeTier
  4009  	}
  4010  	if drdacup.APIProperties != nil {
  4011  		objectMap["apiProperties"] = drdacup.APIProperties
  4012  	}
  4013  	if drdacup.EnableAnalyticalStorage != nil {
  4014  		objectMap["enableAnalyticalStorage"] = drdacup.EnableAnalyticalStorage
  4015  	}
  4016  	objectMap["backupPolicy"] = drdacup.BackupPolicy
  4017  	if drdacup.Cors != nil {
  4018  		objectMap["cors"] = drdacup.Cors
  4019  	}
  4020  	if drdacup.NetworkACLBypass != "" {
  4021  		objectMap["networkAclBypass"] = drdacup.NetworkACLBypass
  4022  	}
  4023  	if drdacup.NetworkACLBypassResourceIds != nil {
  4024  		objectMap["networkAclBypassResourceIds"] = drdacup.NetworkACLBypassResourceIds
  4025  	}
  4026  	if drdacup.CreateMode != "" {
  4027  		objectMap["createMode"] = drdacup.CreateMode
  4028  	}
  4029  	return json.Marshal(objectMap)
  4030  }
  4031  
  4032  // AsDefaultRequestDatabaseAccountCreateUpdateProperties is the BasicDatabaseAccountCreateUpdateProperties implementation for DefaultRequestDatabaseAccountCreateUpdateProperties.
  4033  func (drdacup DefaultRequestDatabaseAccountCreateUpdateProperties) AsDefaultRequestDatabaseAccountCreateUpdateProperties() (*DefaultRequestDatabaseAccountCreateUpdateProperties, bool) {
  4034  	return &drdacup, true
  4035  }
  4036  
  4037  // AsRestoreReqeustDatabaseAccountCreateUpdateProperties is the BasicDatabaseAccountCreateUpdateProperties implementation for DefaultRequestDatabaseAccountCreateUpdateProperties.
  4038  func (drdacup DefaultRequestDatabaseAccountCreateUpdateProperties) AsRestoreReqeustDatabaseAccountCreateUpdateProperties() (*RestoreReqeustDatabaseAccountCreateUpdateProperties, bool) {
  4039  	return nil, false
  4040  }
  4041  
  4042  // AsDatabaseAccountCreateUpdateProperties is the BasicDatabaseAccountCreateUpdateProperties implementation for DefaultRequestDatabaseAccountCreateUpdateProperties.
  4043  func (drdacup DefaultRequestDatabaseAccountCreateUpdateProperties) AsDatabaseAccountCreateUpdateProperties() (*DatabaseAccountCreateUpdateProperties, bool) {
  4044  	return nil, false
  4045  }
  4046  
  4047  // AsBasicDatabaseAccountCreateUpdateProperties is the BasicDatabaseAccountCreateUpdateProperties implementation for DefaultRequestDatabaseAccountCreateUpdateProperties.
  4048  func (drdacup DefaultRequestDatabaseAccountCreateUpdateProperties) AsBasicDatabaseAccountCreateUpdateProperties() (BasicDatabaseAccountCreateUpdateProperties, bool) {
  4049  	return &drdacup, true
  4050  }
  4051  
  4052  // UnmarshalJSON is the custom unmarshaler for DefaultRequestDatabaseAccountCreateUpdateProperties struct.
  4053  func (drdacup *DefaultRequestDatabaseAccountCreateUpdateProperties) UnmarshalJSON(body []byte) error {
  4054  	var m map[string]*json.RawMessage
  4055  	err := json.Unmarshal(body, &m)
  4056  	if err != nil {
  4057  		return err
  4058  	}
  4059  	for k, v := range m {
  4060  		switch k {
  4061  		case "consistencyPolicy":
  4062  			if v != nil {
  4063  				var consistencyPolicy ConsistencyPolicy
  4064  				err = json.Unmarshal(*v, &consistencyPolicy)
  4065  				if err != nil {
  4066  					return err
  4067  				}
  4068  				drdacup.ConsistencyPolicy = &consistencyPolicy
  4069  			}
  4070  		case "locations":
  4071  			if v != nil {
  4072  				var locations []Location
  4073  				err = json.Unmarshal(*v, &locations)
  4074  				if err != nil {
  4075  					return err
  4076  				}
  4077  				drdacup.Locations = &locations
  4078  			}
  4079  		case "databaseAccountOfferType":
  4080  			if v != nil {
  4081  				var databaseAccountOfferType string
  4082  				err = json.Unmarshal(*v, &databaseAccountOfferType)
  4083  				if err != nil {
  4084  					return err
  4085  				}
  4086  				drdacup.DatabaseAccountOfferType = &databaseAccountOfferType
  4087  			}
  4088  		case "ipRules":
  4089  			if v != nil {
  4090  				var IPRules []IPAddressOrRange
  4091  				err = json.Unmarshal(*v, &IPRules)
  4092  				if err != nil {
  4093  					return err
  4094  				}
  4095  				drdacup.IPRules = &IPRules
  4096  			}
  4097  		case "isVirtualNetworkFilterEnabled":
  4098  			if v != nil {
  4099  				var isVirtualNetworkFilterEnabled bool
  4100  				err = json.Unmarshal(*v, &isVirtualNetworkFilterEnabled)
  4101  				if err != nil {
  4102  					return err
  4103  				}
  4104  				drdacup.IsVirtualNetworkFilterEnabled = &isVirtualNetworkFilterEnabled
  4105  			}
  4106  		case "enableAutomaticFailover":
  4107  			if v != nil {
  4108  				var enableAutomaticFailover bool
  4109  				err = json.Unmarshal(*v, &enableAutomaticFailover)
  4110  				if err != nil {
  4111  					return err
  4112  				}
  4113  				drdacup.EnableAutomaticFailover = &enableAutomaticFailover
  4114  			}
  4115  		case "capabilities":
  4116  			if v != nil {
  4117  				var capabilities []Capability
  4118  				err = json.Unmarshal(*v, &capabilities)
  4119  				if err != nil {
  4120  					return err
  4121  				}
  4122  				drdacup.Capabilities = &capabilities
  4123  			}
  4124  		case "virtualNetworkRules":
  4125  			if v != nil {
  4126  				var virtualNetworkRules []VirtualNetworkRule
  4127  				err = json.Unmarshal(*v, &virtualNetworkRules)
  4128  				if err != nil {
  4129  					return err
  4130  				}
  4131  				drdacup.VirtualNetworkRules = &virtualNetworkRules
  4132  			}
  4133  		case "enableMultipleWriteLocations":
  4134  			if v != nil {
  4135  				var enableMultipleWriteLocations bool
  4136  				err = json.Unmarshal(*v, &enableMultipleWriteLocations)
  4137  				if err != nil {
  4138  					return err
  4139  				}
  4140  				drdacup.EnableMultipleWriteLocations = &enableMultipleWriteLocations
  4141  			}
  4142  		case "enableCassandraConnector":
  4143  			if v != nil {
  4144  				var enableCassandraConnector bool
  4145  				err = json.Unmarshal(*v, &enableCassandraConnector)
  4146  				if err != nil {
  4147  					return err
  4148  				}
  4149  				drdacup.EnableCassandraConnector = &enableCassandraConnector
  4150  			}
  4151  		case "connectorOffer":
  4152  			if v != nil {
  4153  				var connectorOffer ConnectorOffer
  4154  				err = json.Unmarshal(*v, &connectorOffer)
  4155  				if err != nil {
  4156  					return err
  4157  				}
  4158  				drdacup.ConnectorOffer = connectorOffer
  4159  			}
  4160  		case "disableKeyBasedMetadataWriteAccess":
  4161  			if v != nil {
  4162  				var disableKeyBasedMetadataWriteAccess bool
  4163  				err = json.Unmarshal(*v, &disableKeyBasedMetadataWriteAccess)
  4164  				if err != nil {
  4165  					return err
  4166  				}
  4167  				drdacup.DisableKeyBasedMetadataWriteAccess = &disableKeyBasedMetadataWriteAccess
  4168  			}
  4169  		case "keyVaultKeyUri":
  4170  			if v != nil {
  4171  				var keyVaultKeyURI string
  4172  				err = json.Unmarshal(*v, &keyVaultKeyURI)
  4173  				if err != nil {
  4174  					return err
  4175  				}
  4176  				drdacup.KeyVaultKeyURI = &keyVaultKeyURI
  4177  			}
  4178  		case "defaultIdentity":
  4179  			if v != nil {
  4180  				var defaultIdentity string
  4181  				err = json.Unmarshal(*v, &defaultIdentity)
  4182  				if err != nil {
  4183  					return err
  4184  				}
  4185  				drdacup.DefaultIdentity = &defaultIdentity
  4186  			}
  4187  		case "publicNetworkAccess":
  4188  			if v != nil {
  4189  				var publicNetworkAccess PublicNetworkAccess
  4190  				err = json.Unmarshal(*v, &publicNetworkAccess)
  4191  				if err != nil {
  4192  					return err
  4193  				}
  4194  				drdacup.PublicNetworkAccess = publicNetworkAccess
  4195  			}
  4196  		case "enableFreeTier":
  4197  			if v != nil {
  4198  				var enableFreeTier bool
  4199  				err = json.Unmarshal(*v, &enableFreeTier)
  4200  				if err != nil {
  4201  					return err
  4202  				}
  4203  				drdacup.EnableFreeTier = &enableFreeTier
  4204  			}
  4205  		case "apiProperties":
  4206  			if v != nil {
  4207  				var APIProperties APIProperties
  4208  				err = json.Unmarshal(*v, &APIProperties)
  4209  				if err != nil {
  4210  					return err
  4211  				}
  4212  				drdacup.APIProperties = &APIProperties
  4213  			}
  4214  		case "enableAnalyticalStorage":
  4215  			if v != nil {
  4216  				var enableAnalyticalStorage bool
  4217  				err = json.Unmarshal(*v, &enableAnalyticalStorage)
  4218  				if err != nil {
  4219  					return err
  4220  				}
  4221  				drdacup.EnableAnalyticalStorage = &enableAnalyticalStorage
  4222  			}
  4223  		case "backupPolicy":
  4224  			if v != nil {
  4225  				backupPolicy, err := unmarshalBasicBackupPolicy(*v)
  4226  				if err != nil {
  4227  					return err
  4228  				}
  4229  				drdacup.BackupPolicy = backupPolicy
  4230  			}
  4231  		case "cors":
  4232  			if v != nil {
  4233  				var cors []CorsPolicy
  4234  				err = json.Unmarshal(*v, &cors)
  4235  				if err != nil {
  4236  					return err
  4237  				}
  4238  				drdacup.Cors = &cors
  4239  			}
  4240  		case "networkAclBypass":
  4241  			if v != nil {
  4242  				var networkACLBypass NetworkACLBypass
  4243  				err = json.Unmarshal(*v, &networkACLBypass)
  4244  				if err != nil {
  4245  					return err
  4246  				}
  4247  				drdacup.NetworkACLBypass = networkACLBypass
  4248  			}
  4249  		case "networkAclBypassResourceIds":
  4250  			if v != nil {
  4251  				var networkACLBypassResourceIds []string
  4252  				err = json.Unmarshal(*v, &networkACLBypassResourceIds)
  4253  				if err != nil {
  4254  					return err
  4255  				}
  4256  				drdacup.NetworkACLBypassResourceIds = &networkACLBypassResourceIds
  4257  			}
  4258  		case "createMode":
  4259  			if v != nil {
  4260  				var createMode CreateModeBasicDatabaseAccountCreateUpdateProperties
  4261  				err = json.Unmarshal(*v, &createMode)
  4262  				if err != nil {
  4263  					return err
  4264  				}
  4265  				drdacup.CreateMode = createMode
  4266  			}
  4267  		}
  4268  	}
  4269  
  4270  	return nil
  4271  }
  4272  
  4273  // ErrorResponse error Response.
  4274  type ErrorResponse struct {
  4275  	// Code - Error code.
  4276  	Code *string `json:"code,omitempty"`
  4277  	// Message - Error message indicating why the operation failed.
  4278  	Message *string `json:"message,omitempty"`
  4279  }
  4280  
  4281  // ExcludedPath ...
  4282  type ExcludedPath struct {
  4283  	// Path - The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*)
  4284  	Path *string `json:"path,omitempty"`
  4285  }
  4286  
  4287  // ExtendedResourceProperties the system generated resource properties associated with SQL databases, SQL
  4288  // containers, Gremlin databases and Gremlin graphs.
  4289  type ExtendedResourceProperties struct {
  4290  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  4291  	Rid *string `json:"_rid,omitempty"`
  4292  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  4293  	Ts *float64 `json:"_ts,omitempty"`
  4294  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  4295  	Etag *string `json:"_etag,omitempty"`
  4296  }
  4297  
  4298  // MarshalJSON is the custom marshaler for ExtendedResourceProperties.
  4299  func (erp ExtendedResourceProperties) MarshalJSON() ([]byte, error) {
  4300  	objectMap := make(map[string]interface{})
  4301  	return json.Marshal(objectMap)
  4302  }
  4303  
  4304  // FailoverPolicies the list of new failover policies for the failover priority change.
  4305  type FailoverPolicies struct {
  4306  	// FailoverPolicies - List of failover policies.
  4307  	FailoverPolicies *[]FailoverPolicy `json:"failoverPolicies,omitempty"`
  4308  }
  4309  
  4310  // FailoverPolicy the failover policy for a given region of a database account.
  4311  type FailoverPolicy struct {
  4312  	// ID - READ-ONLY; The unique identifier of the region in which the database account replicates to. Example: &lt;accountName&gt;-&lt;locationName&gt;.
  4313  	ID *string `json:"id,omitempty"`
  4314  	// LocationName - The name of the region in which the database account exists.
  4315  	LocationName *string `json:"locationName,omitempty"`
  4316  	// FailoverPriority - The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists.
  4317  	FailoverPriority *int32 `json:"failoverPriority,omitempty"`
  4318  }
  4319  
  4320  // MarshalJSON is the custom marshaler for FailoverPolicy.
  4321  func (fp FailoverPolicy) MarshalJSON() ([]byte, error) {
  4322  	objectMap := make(map[string]interface{})
  4323  	if fp.LocationName != nil {
  4324  		objectMap["locationName"] = fp.LocationName
  4325  	}
  4326  	if fp.FailoverPriority != nil {
  4327  		objectMap["failoverPriority"] = fp.FailoverPriority
  4328  	}
  4329  	return json.Marshal(objectMap)
  4330  }
  4331  
  4332  // GremlinDatabaseCreateUpdateParameters parameters to create and update Cosmos DB Gremlin database.
  4333  type GremlinDatabaseCreateUpdateParameters struct {
  4334  	// GremlinDatabaseCreateUpdateProperties - Properties to create and update Azure Cosmos DB Gremlin database.
  4335  	*GremlinDatabaseCreateUpdateProperties `json:"properties,omitempty"`
  4336  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  4337  	ID *string `json:"id,omitempty"`
  4338  	// Name - READ-ONLY; The name of the ARM resource.
  4339  	Name *string `json:"name,omitempty"`
  4340  	// Type - READ-ONLY; The type of Azure resource.
  4341  	Type *string `json:"type,omitempty"`
  4342  	// Location - The location of the resource group to which the resource belongs.
  4343  	Location *string                 `json:"location,omitempty"`
  4344  	Tags     map[string]*string      `json:"tags"`
  4345  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
  4346  }
  4347  
  4348  // MarshalJSON is the custom marshaler for GremlinDatabaseCreateUpdateParameters.
  4349  func (gdcup GremlinDatabaseCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  4350  	objectMap := make(map[string]interface{})
  4351  	if gdcup.GremlinDatabaseCreateUpdateProperties != nil {
  4352  		objectMap["properties"] = gdcup.GremlinDatabaseCreateUpdateProperties
  4353  	}
  4354  	if gdcup.Location != nil {
  4355  		objectMap["location"] = gdcup.Location
  4356  	}
  4357  	if gdcup.Tags != nil {
  4358  		objectMap["tags"] = gdcup.Tags
  4359  	}
  4360  	if gdcup.Identity != nil {
  4361  		objectMap["identity"] = gdcup.Identity
  4362  	}
  4363  	return json.Marshal(objectMap)
  4364  }
  4365  
  4366  // UnmarshalJSON is the custom unmarshaler for GremlinDatabaseCreateUpdateParameters struct.
  4367  func (gdcup *GremlinDatabaseCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  4368  	var m map[string]*json.RawMessage
  4369  	err := json.Unmarshal(body, &m)
  4370  	if err != nil {
  4371  		return err
  4372  	}
  4373  	for k, v := range m {
  4374  		switch k {
  4375  		case "properties":
  4376  			if v != nil {
  4377  				var gremlinDatabaseCreateUpdateProperties GremlinDatabaseCreateUpdateProperties
  4378  				err = json.Unmarshal(*v, &gremlinDatabaseCreateUpdateProperties)
  4379  				if err != nil {
  4380  					return err
  4381  				}
  4382  				gdcup.GremlinDatabaseCreateUpdateProperties = &gremlinDatabaseCreateUpdateProperties
  4383  			}
  4384  		case "id":
  4385  			if v != nil {
  4386  				var ID string
  4387  				err = json.Unmarshal(*v, &ID)
  4388  				if err != nil {
  4389  					return err
  4390  				}
  4391  				gdcup.ID = &ID
  4392  			}
  4393  		case "name":
  4394  			if v != nil {
  4395  				var name string
  4396  				err = json.Unmarshal(*v, &name)
  4397  				if err != nil {
  4398  					return err
  4399  				}
  4400  				gdcup.Name = &name
  4401  			}
  4402  		case "type":
  4403  			if v != nil {
  4404  				var typeVar string
  4405  				err = json.Unmarshal(*v, &typeVar)
  4406  				if err != nil {
  4407  					return err
  4408  				}
  4409  				gdcup.Type = &typeVar
  4410  			}
  4411  		case "location":
  4412  			if v != nil {
  4413  				var location string
  4414  				err = json.Unmarshal(*v, &location)
  4415  				if err != nil {
  4416  					return err
  4417  				}
  4418  				gdcup.Location = &location
  4419  			}
  4420  		case "tags":
  4421  			if v != nil {
  4422  				var tags map[string]*string
  4423  				err = json.Unmarshal(*v, &tags)
  4424  				if err != nil {
  4425  					return err
  4426  				}
  4427  				gdcup.Tags = tags
  4428  			}
  4429  		case "identity":
  4430  			if v != nil {
  4431  				var identity ManagedServiceIdentity
  4432  				err = json.Unmarshal(*v, &identity)
  4433  				if err != nil {
  4434  					return err
  4435  				}
  4436  				gdcup.Identity = &identity
  4437  			}
  4438  		}
  4439  	}
  4440  
  4441  	return nil
  4442  }
  4443  
  4444  // GremlinDatabaseCreateUpdateProperties properties to create and update Azure Cosmos DB Gremlin database.
  4445  type GremlinDatabaseCreateUpdateProperties struct {
  4446  	// Resource - The standard JSON format of a Gremlin database
  4447  	Resource *GremlinDatabaseResource `json:"resource,omitempty"`
  4448  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
  4449  	Options *CreateUpdateOptions `json:"options,omitempty"`
  4450  }
  4451  
  4452  // GremlinDatabaseGetProperties the properties of an Azure Cosmos DB SQL database
  4453  type GremlinDatabaseGetProperties struct {
  4454  	Resource *GremlinDatabaseGetPropertiesResource `json:"resource,omitempty"`
  4455  	Options  *GremlinDatabaseGetPropertiesOptions  `json:"options,omitempty"`
  4456  }
  4457  
  4458  // GremlinDatabaseGetPropertiesOptions ...
  4459  type GremlinDatabaseGetPropertiesOptions struct {
  4460  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
  4461  	Throughput *int32 `json:"throughput,omitempty"`
  4462  	// AutoscaleSettings - Specifies the Autoscale settings.
  4463  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  4464  }
  4465  
  4466  // GremlinDatabaseGetPropertiesResource ...
  4467  type GremlinDatabaseGetPropertiesResource struct {
  4468  	// ID - Name of the Cosmos DB Gremlin database
  4469  	ID *string `json:"id,omitempty"`
  4470  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  4471  	Rid *string `json:"_rid,omitempty"`
  4472  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  4473  	Ts *float64 `json:"_ts,omitempty"`
  4474  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  4475  	Etag *string `json:"_etag,omitempty"`
  4476  }
  4477  
  4478  // MarshalJSON is the custom marshaler for GremlinDatabaseGetPropertiesResource.
  4479  func (gdgp GremlinDatabaseGetPropertiesResource) MarshalJSON() ([]byte, error) {
  4480  	objectMap := make(map[string]interface{})
  4481  	if gdgp.ID != nil {
  4482  		objectMap["id"] = gdgp.ID
  4483  	}
  4484  	return json.Marshal(objectMap)
  4485  }
  4486  
  4487  // GremlinDatabaseGetResults an Azure Cosmos DB Gremlin database.
  4488  type GremlinDatabaseGetResults struct {
  4489  	autorest.Response `json:"-"`
  4490  	// GremlinDatabaseGetProperties - The properties of an Azure Cosmos DB SQL database
  4491  	*GremlinDatabaseGetProperties `json:"properties,omitempty"`
  4492  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  4493  	ID *string `json:"id,omitempty"`
  4494  	// Name - READ-ONLY; The name of the ARM resource.
  4495  	Name *string `json:"name,omitempty"`
  4496  	// Type - READ-ONLY; The type of Azure resource.
  4497  	Type *string `json:"type,omitempty"`
  4498  	// Location - The location of the resource group to which the resource belongs.
  4499  	Location *string                 `json:"location,omitempty"`
  4500  	Tags     map[string]*string      `json:"tags"`
  4501  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
  4502  }
  4503  
  4504  // MarshalJSON is the custom marshaler for GremlinDatabaseGetResults.
  4505  func (gdgr GremlinDatabaseGetResults) MarshalJSON() ([]byte, error) {
  4506  	objectMap := make(map[string]interface{})
  4507  	if gdgr.GremlinDatabaseGetProperties != nil {
  4508  		objectMap["properties"] = gdgr.GremlinDatabaseGetProperties
  4509  	}
  4510  	if gdgr.Location != nil {
  4511  		objectMap["location"] = gdgr.Location
  4512  	}
  4513  	if gdgr.Tags != nil {
  4514  		objectMap["tags"] = gdgr.Tags
  4515  	}
  4516  	if gdgr.Identity != nil {
  4517  		objectMap["identity"] = gdgr.Identity
  4518  	}
  4519  	return json.Marshal(objectMap)
  4520  }
  4521  
  4522  // UnmarshalJSON is the custom unmarshaler for GremlinDatabaseGetResults struct.
  4523  func (gdgr *GremlinDatabaseGetResults) UnmarshalJSON(body []byte) error {
  4524  	var m map[string]*json.RawMessage
  4525  	err := json.Unmarshal(body, &m)
  4526  	if err != nil {
  4527  		return err
  4528  	}
  4529  	for k, v := range m {
  4530  		switch k {
  4531  		case "properties":
  4532  			if v != nil {
  4533  				var gremlinDatabaseGetProperties GremlinDatabaseGetProperties
  4534  				err = json.Unmarshal(*v, &gremlinDatabaseGetProperties)
  4535  				if err != nil {
  4536  					return err
  4537  				}
  4538  				gdgr.GremlinDatabaseGetProperties = &gremlinDatabaseGetProperties
  4539  			}
  4540  		case "id":
  4541  			if v != nil {
  4542  				var ID string
  4543  				err = json.Unmarshal(*v, &ID)
  4544  				if err != nil {
  4545  					return err
  4546  				}
  4547  				gdgr.ID = &ID
  4548  			}
  4549  		case "name":
  4550  			if v != nil {
  4551  				var name string
  4552  				err = json.Unmarshal(*v, &name)
  4553  				if err != nil {
  4554  					return err
  4555  				}
  4556  				gdgr.Name = &name
  4557  			}
  4558  		case "type":
  4559  			if v != nil {
  4560  				var typeVar string
  4561  				err = json.Unmarshal(*v, &typeVar)
  4562  				if err != nil {
  4563  					return err
  4564  				}
  4565  				gdgr.Type = &typeVar
  4566  			}
  4567  		case "location":
  4568  			if v != nil {
  4569  				var location string
  4570  				err = json.Unmarshal(*v, &location)
  4571  				if err != nil {
  4572  					return err
  4573  				}
  4574  				gdgr.Location = &location
  4575  			}
  4576  		case "tags":
  4577  			if v != nil {
  4578  				var tags map[string]*string
  4579  				err = json.Unmarshal(*v, &tags)
  4580  				if err != nil {
  4581  					return err
  4582  				}
  4583  				gdgr.Tags = tags
  4584  			}
  4585  		case "identity":
  4586  			if v != nil {
  4587  				var identity ManagedServiceIdentity
  4588  				err = json.Unmarshal(*v, &identity)
  4589  				if err != nil {
  4590  					return err
  4591  				}
  4592  				gdgr.Identity = &identity
  4593  			}
  4594  		}
  4595  	}
  4596  
  4597  	return nil
  4598  }
  4599  
  4600  // GremlinDatabaseListResult the List operation response, that contains the Gremlin databases and their
  4601  // properties.
  4602  type GremlinDatabaseListResult struct {
  4603  	autorest.Response `json:"-"`
  4604  	// Value - READ-ONLY; List of Gremlin databases and their properties.
  4605  	Value *[]GremlinDatabaseGetResults `json:"value,omitempty"`
  4606  }
  4607  
  4608  // MarshalJSON is the custom marshaler for GremlinDatabaseListResult.
  4609  func (gdlr GremlinDatabaseListResult) MarshalJSON() ([]byte, error) {
  4610  	objectMap := make(map[string]interface{})
  4611  	return json.Marshal(objectMap)
  4612  }
  4613  
  4614  // GremlinDatabaseResource cosmos DB Gremlin database resource object
  4615  type GremlinDatabaseResource struct {
  4616  	// ID - Name of the Cosmos DB Gremlin database
  4617  	ID *string `json:"id,omitempty"`
  4618  }
  4619  
  4620  // GremlinGraphCreateUpdateParameters parameters to create and update Cosmos DB Gremlin graph.
  4621  type GremlinGraphCreateUpdateParameters struct {
  4622  	// GremlinGraphCreateUpdateProperties - Properties to create and update Azure Cosmos DB Gremlin graph.
  4623  	*GremlinGraphCreateUpdateProperties `json:"properties,omitempty"`
  4624  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  4625  	ID *string `json:"id,omitempty"`
  4626  	// Name - READ-ONLY; The name of the ARM resource.
  4627  	Name *string `json:"name,omitempty"`
  4628  	// Type - READ-ONLY; The type of Azure resource.
  4629  	Type *string `json:"type,omitempty"`
  4630  	// Location - The location of the resource group to which the resource belongs.
  4631  	Location *string                 `json:"location,omitempty"`
  4632  	Tags     map[string]*string      `json:"tags"`
  4633  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
  4634  }
  4635  
  4636  // MarshalJSON is the custom marshaler for GremlinGraphCreateUpdateParameters.
  4637  func (ggcup GremlinGraphCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  4638  	objectMap := make(map[string]interface{})
  4639  	if ggcup.GremlinGraphCreateUpdateProperties != nil {
  4640  		objectMap["properties"] = ggcup.GremlinGraphCreateUpdateProperties
  4641  	}
  4642  	if ggcup.Location != nil {
  4643  		objectMap["location"] = ggcup.Location
  4644  	}
  4645  	if ggcup.Tags != nil {
  4646  		objectMap["tags"] = ggcup.Tags
  4647  	}
  4648  	if ggcup.Identity != nil {
  4649  		objectMap["identity"] = ggcup.Identity
  4650  	}
  4651  	return json.Marshal(objectMap)
  4652  }
  4653  
  4654  // UnmarshalJSON is the custom unmarshaler for GremlinGraphCreateUpdateParameters struct.
  4655  func (ggcup *GremlinGraphCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  4656  	var m map[string]*json.RawMessage
  4657  	err := json.Unmarshal(body, &m)
  4658  	if err != nil {
  4659  		return err
  4660  	}
  4661  	for k, v := range m {
  4662  		switch k {
  4663  		case "properties":
  4664  			if v != nil {
  4665  				var gremlinGraphCreateUpdateProperties GremlinGraphCreateUpdateProperties
  4666  				err = json.Unmarshal(*v, &gremlinGraphCreateUpdateProperties)
  4667  				if err != nil {
  4668  					return err
  4669  				}
  4670  				ggcup.GremlinGraphCreateUpdateProperties = &gremlinGraphCreateUpdateProperties
  4671  			}
  4672  		case "id":
  4673  			if v != nil {
  4674  				var ID string
  4675  				err = json.Unmarshal(*v, &ID)
  4676  				if err != nil {
  4677  					return err
  4678  				}
  4679  				ggcup.ID = &ID
  4680  			}
  4681  		case "name":
  4682  			if v != nil {
  4683  				var name string
  4684  				err = json.Unmarshal(*v, &name)
  4685  				if err != nil {
  4686  					return err
  4687  				}
  4688  				ggcup.Name = &name
  4689  			}
  4690  		case "type":
  4691  			if v != nil {
  4692  				var typeVar string
  4693  				err = json.Unmarshal(*v, &typeVar)
  4694  				if err != nil {
  4695  					return err
  4696  				}
  4697  				ggcup.Type = &typeVar
  4698  			}
  4699  		case "location":
  4700  			if v != nil {
  4701  				var location string
  4702  				err = json.Unmarshal(*v, &location)
  4703  				if err != nil {
  4704  					return err
  4705  				}
  4706  				ggcup.Location = &location
  4707  			}
  4708  		case "tags":
  4709  			if v != nil {
  4710  				var tags map[string]*string
  4711  				err = json.Unmarshal(*v, &tags)
  4712  				if err != nil {
  4713  					return err
  4714  				}
  4715  				ggcup.Tags = tags
  4716  			}
  4717  		case "identity":
  4718  			if v != nil {
  4719  				var identity ManagedServiceIdentity
  4720  				err = json.Unmarshal(*v, &identity)
  4721  				if err != nil {
  4722  					return err
  4723  				}
  4724  				ggcup.Identity = &identity
  4725  			}
  4726  		}
  4727  	}
  4728  
  4729  	return nil
  4730  }
  4731  
  4732  // GremlinGraphCreateUpdateProperties properties to create and update Azure Cosmos DB Gremlin graph.
  4733  type GremlinGraphCreateUpdateProperties struct {
  4734  	// Resource - The standard JSON format of a Gremlin graph
  4735  	Resource *GremlinGraphResource `json:"resource,omitempty"`
  4736  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
  4737  	Options *CreateUpdateOptions `json:"options,omitempty"`
  4738  }
  4739  
  4740  // GremlinGraphGetProperties the properties of an Azure Cosmos DB Gremlin graph
  4741  type GremlinGraphGetProperties struct {
  4742  	Resource *GremlinGraphGetPropertiesResource `json:"resource,omitempty"`
  4743  	Options  *GremlinGraphGetPropertiesOptions  `json:"options,omitempty"`
  4744  }
  4745  
  4746  // GremlinGraphGetPropertiesOptions ...
  4747  type GremlinGraphGetPropertiesOptions struct {
  4748  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
  4749  	Throughput *int32 `json:"throughput,omitempty"`
  4750  	// AutoscaleSettings - Specifies the Autoscale settings.
  4751  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  4752  }
  4753  
  4754  // GremlinGraphGetPropertiesResource ...
  4755  type GremlinGraphGetPropertiesResource struct {
  4756  	// ID - Name of the Cosmos DB Gremlin graph
  4757  	ID *string `json:"id,omitempty"`
  4758  	// IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph
  4759  	IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"`
  4760  	// PartitionKey - The configuration of the partition key to be used for partitioning data into multiple partitions
  4761  	PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"`
  4762  	// DefaultTTL - Default time to live
  4763  	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
  4764  	// UniqueKeyPolicy - The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
  4765  	UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"`
  4766  	// ConflictResolutionPolicy - The conflict resolution policy for the graph.
  4767  	ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"`
  4768  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  4769  	Rid *string `json:"_rid,omitempty"`
  4770  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  4771  	Ts *float64 `json:"_ts,omitempty"`
  4772  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  4773  	Etag *string `json:"_etag,omitempty"`
  4774  }
  4775  
  4776  // MarshalJSON is the custom marshaler for GremlinGraphGetPropertiesResource.
  4777  func (gggp GremlinGraphGetPropertiesResource) MarshalJSON() ([]byte, error) {
  4778  	objectMap := make(map[string]interface{})
  4779  	if gggp.ID != nil {
  4780  		objectMap["id"] = gggp.ID
  4781  	}
  4782  	if gggp.IndexingPolicy != nil {
  4783  		objectMap["indexingPolicy"] = gggp.IndexingPolicy
  4784  	}
  4785  	if gggp.PartitionKey != nil {
  4786  		objectMap["partitionKey"] = gggp.PartitionKey
  4787  	}
  4788  	if gggp.DefaultTTL != nil {
  4789  		objectMap["defaultTtl"] = gggp.DefaultTTL
  4790  	}
  4791  	if gggp.UniqueKeyPolicy != nil {
  4792  		objectMap["uniqueKeyPolicy"] = gggp.UniqueKeyPolicy
  4793  	}
  4794  	if gggp.ConflictResolutionPolicy != nil {
  4795  		objectMap["conflictResolutionPolicy"] = gggp.ConflictResolutionPolicy
  4796  	}
  4797  	return json.Marshal(objectMap)
  4798  }
  4799  
  4800  // GremlinGraphGetResults an Azure Cosmos DB Gremlin graph.
  4801  type GremlinGraphGetResults struct {
  4802  	autorest.Response `json:"-"`
  4803  	// GremlinGraphGetProperties - The properties of an Azure Cosmos DB Gremlin graph
  4804  	*GremlinGraphGetProperties `json:"properties,omitempty"`
  4805  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  4806  	ID *string `json:"id,omitempty"`
  4807  	// Name - READ-ONLY; The name of the ARM resource.
  4808  	Name *string `json:"name,omitempty"`
  4809  	// Type - READ-ONLY; The type of Azure resource.
  4810  	Type *string `json:"type,omitempty"`
  4811  	// Location - The location of the resource group to which the resource belongs.
  4812  	Location *string                 `json:"location,omitempty"`
  4813  	Tags     map[string]*string      `json:"tags"`
  4814  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
  4815  }
  4816  
  4817  // MarshalJSON is the custom marshaler for GremlinGraphGetResults.
  4818  func (gggr GremlinGraphGetResults) MarshalJSON() ([]byte, error) {
  4819  	objectMap := make(map[string]interface{})
  4820  	if gggr.GremlinGraphGetProperties != nil {
  4821  		objectMap["properties"] = gggr.GremlinGraphGetProperties
  4822  	}
  4823  	if gggr.Location != nil {
  4824  		objectMap["location"] = gggr.Location
  4825  	}
  4826  	if gggr.Tags != nil {
  4827  		objectMap["tags"] = gggr.Tags
  4828  	}
  4829  	if gggr.Identity != nil {
  4830  		objectMap["identity"] = gggr.Identity
  4831  	}
  4832  	return json.Marshal(objectMap)
  4833  }
  4834  
  4835  // UnmarshalJSON is the custom unmarshaler for GremlinGraphGetResults struct.
  4836  func (gggr *GremlinGraphGetResults) UnmarshalJSON(body []byte) error {
  4837  	var m map[string]*json.RawMessage
  4838  	err := json.Unmarshal(body, &m)
  4839  	if err != nil {
  4840  		return err
  4841  	}
  4842  	for k, v := range m {
  4843  		switch k {
  4844  		case "properties":
  4845  			if v != nil {
  4846  				var gremlinGraphGetProperties GremlinGraphGetProperties
  4847  				err = json.Unmarshal(*v, &gremlinGraphGetProperties)
  4848  				if err != nil {
  4849  					return err
  4850  				}
  4851  				gggr.GremlinGraphGetProperties = &gremlinGraphGetProperties
  4852  			}
  4853  		case "id":
  4854  			if v != nil {
  4855  				var ID string
  4856  				err = json.Unmarshal(*v, &ID)
  4857  				if err != nil {
  4858  					return err
  4859  				}
  4860  				gggr.ID = &ID
  4861  			}
  4862  		case "name":
  4863  			if v != nil {
  4864  				var name string
  4865  				err = json.Unmarshal(*v, &name)
  4866  				if err != nil {
  4867  					return err
  4868  				}
  4869  				gggr.Name = &name
  4870  			}
  4871  		case "type":
  4872  			if v != nil {
  4873  				var typeVar string
  4874  				err = json.Unmarshal(*v, &typeVar)
  4875  				if err != nil {
  4876  					return err
  4877  				}
  4878  				gggr.Type = &typeVar
  4879  			}
  4880  		case "location":
  4881  			if v != nil {
  4882  				var location string
  4883  				err = json.Unmarshal(*v, &location)
  4884  				if err != nil {
  4885  					return err
  4886  				}
  4887  				gggr.Location = &location
  4888  			}
  4889  		case "tags":
  4890  			if v != nil {
  4891  				var tags map[string]*string
  4892  				err = json.Unmarshal(*v, &tags)
  4893  				if err != nil {
  4894  					return err
  4895  				}
  4896  				gggr.Tags = tags
  4897  			}
  4898  		case "identity":
  4899  			if v != nil {
  4900  				var identity ManagedServiceIdentity
  4901  				err = json.Unmarshal(*v, &identity)
  4902  				if err != nil {
  4903  					return err
  4904  				}
  4905  				gggr.Identity = &identity
  4906  			}
  4907  		}
  4908  	}
  4909  
  4910  	return nil
  4911  }
  4912  
  4913  // GremlinGraphListResult the List operation response, that contains the graphs and their properties.
  4914  type GremlinGraphListResult struct {
  4915  	autorest.Response `json:"-"`
  4916  	// Value - READ-ONLY; List of graphs and their properties.
  4917  	Value *[]GremlinGraphGetResults `json:"value,omitempty"`
  4918  }
  4919  
  4920  // MarshalJSON is the custom marshaler for GremlinGraphListResult.
  4921  func (gglr GremlinGraphListResult) MarshalJSON() ([]byte, error) {
  4922  	objectMap := make(map[string]interface{})
  4923  	return json.Marshal(objectMap)
  4924  }
  4925  
  4926  // GremlinGraphResource cosmos DB Gremlin graph resource object
  4927  type GremlinGraphResource struct {
  4928  	// ID - Name of the Cosmos DB Gremlin graph
  4929  	ID *string `json:"id,omitempty"`
  4930  	// IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph
  4931  	IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"`
  4932  	// PartitionKey - The configuration of the partition key to be used for partitioning data into multiple partitions
  4933  	PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"`
  4934  	// DefaultTTL - Default time to live
  4935  	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
  4936  	// UniqueKeyPolicy - The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
  4937  	UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"`
  4938  	// ConflictResolutionPolicy - The conflict resolution policy for the graph.
  4939  	ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"`
  4940  }
  4941  
  4942  // GremlinResourcesCreateUpdateGremlinDatabaseFuture an abstraction for monitoring and retrieving the
  4943  // results of a long-running operation.
  4944  type GremlinResourcesCreateUpdateGremlinDatabaseFuture struct {
  4945  	azure.FutureAPI
  4946  	// Result returns the result of the asynchronous operation.
  4947  	// If the operation has not completed it will return an error.
  4948  	Result func(GremlinResourcesClient) (GremlinDatabaseGetResults, error)
  4949  }
  4950  
  4951  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  4952  func (future *GremlinResourcesCreateUpdateGremlinDatabaseFuture) UnmarshalJSON(body []byte) error {
  4953  	var azFuture azure.Future
  4954  	if err := json.Unmarshal(body, &azFuture); err != nil {
  4955  		return err
  4956  	}
  4957  	future.FutureAPI = &azFuture
  4958  	future.Result = future.result
  4959  	return nil
  4960  }
  4961  
  4962  // result is the default implementation for GremlinResourcesCreateUpdateGremlinDatabaseFuture.Result.
  4963  func (future *GremlinResourcesCreateUpdateGremlinDatabaseFuture) result(client GremlinResourcesClient) (gdgr GremlinDatabaseGetResults, err error) {
  4964  	var done bool
  4965  	done, err = future.DoneWithContext(context.Background(), client)
  4966  	if err != nil {
  4967  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesCreateUpdateGremlinDatabaseFuture", "Result", future.Response(), "Polling failure")
  4968  		return
  4969  	}
  4970  	if !done {
  4971  		gdgr.Response.Response = future.Response()
  4972  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesCreateUpdateGremlinDatabaseFuture")
  4973  		return
  4974  	}
  4975  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4976  	if gdgr.Response.Response, err = future.GetResult(sender); err == nil && gdgr.Response.Response.StatusCode != http.StatusNoContent {
  4977  		gdgr, err = client.CreateUpdateGremlinDatabaseResponder(gdgr.Response.Response)
  4978  		if err != nil {
  4979  			err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesCreateUpdateGremlinDatabaseFuture", "Result", gdgr.Response.Response, "Failure responding to request")
  4980  		}
  4981  	}
  4982  	return
  4983  }
  4984  
  4985  // GremlinResourcesCreateUpdateGremlinGraphFuture an abstraction for monitoring and retrieving the results
  4986  // of a long-running operation.
  4987  type GremlinResourcesCreateUpdateGremlinGraphFuture struct {
  4988  	azure.FutureAPI
  4989  	// Result returns the result of the asynchronous operation.
  4990  	// If the operation has not completed it will return an error.
  4991  	Result func(GremlinResourcesClient) (GremlinGraphGetResults, error)
  4992  }
  4993  
  4994  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  4995  func (future *GremlinResourcesCreateUpdateGremlinGraphFuture) UnmarshalJSON(body []byte) error {
  4996  	var azFuture azure.Future
  4997  	if err := json.Unmarshal(body, &azFuture); err != nil {
  4998  		return err
  4999  	}
  5000  	future.FutureAPI = &azFuture
  5001  	future.Result = future.result
  5002  	return nil
  5003  }
  5004  
  5005  // result is the default implementation for GremlinResourcesCreateUpdateGremlinGraphFuture.Result.
  5006  func (future *GremlinResourcesCreateUpdateGremlinGraphFuture) result(client GremlinResourcesClient) (gggr GremlinGraphGetResults, err error) {
  5007  	var done bool
  5008  	done, err = future.DoneWithContext(context.Background(), client)
  5009  	if err != nil {
  5010  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesCreateUpdateGremlinGraphFuture", "Result", future.Response(), "Polling failure")
  5011  		return
  5012  	}
  5013  	if !done {
  5014  		gggr.Response.Response = future.Response()
  5015  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesCreateUpdateGremlinGraphFuture")
  5016  		return
  5017  	}
  5018  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5019  	if gggr.Response.Response, err = future.GetResult(sender); err == nil && gggr.Response.Response.StatusCode != http.StatusNoContent {
  5020  		gggr, err = client.CreateUpdateGremlinGraphResponder(gggr.Response.Response)
  5021  		if err != nil {
  5022  			err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesCreateUpdateGremlinGraphFuture", "Result", gggr.Response.Response, "Failure responding to request")
  5023  		}
  5024  	}
  5025  	return
  5026  }
  5027  
  5028  // GremlinResourcesDeleteGremlinDatabaseFuture an abstraction for monitoring and retrieving the results of
  5029  // a long-running operation.
  5030  type GremlinResourcesDeleteGremlinDatabaseFuture struct {
  5031  	azure.FutureAPI
  5032  	// Result returns the result of the asynchronous operation.
  5033  	// If the operation has not completed it will return an error.
  5034  	Result func(GremlinResourcesClient) (autorest.Response, error)
  5035  }
  5036  
  5037  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  5038  func (future *GremlinResourcesDeleteGremlinDatabaseFuture) UnmarshalJSON(body []byte) error {
  5039  	var azFuture azure.Future
  5040  	if err := json.Unmarshal(body, &azFuture); err != nil {
  5041  		return err
  5042  	}
  5043  	future.FutureAPI = &azFuture
  5044  	future.Result = future.result
  5045  	return nil
  5046  }
  5047  
  5048  // result is the default implementation for GremlinResourcesDeleteGremlinDatabaseFuture.Result.
  5049  func (future *GremlinResourcesDeleteGremlinDatabaseFuture) result(client GremlinResourcesClient) (ar autorest.Response, err error) {
  5050  	var done bool
  5051  	done, err = future.DoneWithContext(context.Background(), client)
  5052  	if err != nil {
  5053  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesDeleteGremlinDatabaseFuture", "Result", future.Response(), "Polling failure")
  5054  		return
  5055  	}
  5056  	if !done {
  5057  		ar.Response = future.Response()
  5058  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesDeleteGremlinDatabaseFuture")
  5059  		return
  5060  	}
  5061  	ar.Response = future.Response()
  5062  	return
  5063  }
  5064  
  5065  // GremlinResourcesDeleteGremlinGraphFuture an abstraction for monitoring and retrieving the results of a
  5066  // long-running operation.
  5067  type GremlinResourcesDeleteGremlinGraphFuture struct {
  5068  	azure.FutureAPI
  5069  	// Result returns the result of the asynchronous operation.
  5070  	// If the operation has not completed it will return an error.
  5071  	Result func(GremlinResourcesClient) (autorest.Response, error)
  5072  }
  5073  
  5074  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  5075  func (future *GremlinResourcesDeleteGremlinGraphFuture) UnmarshalJSON(body []byte) error {
  5076  	var azFuture azure.Future
  5077  	if err := json.Unmarshal(body, &azFuture); err != nil {
  5078  		return err
  5079  	}
  5080  	future.FutureAPI = &azFuture
  5081  	future.Result = future.result
  5082  	return nil
  5083  }
  5084  
  5085  // result is the default implementation for GremlinResourcesDeleteGremlinGraphFuture.Result.
  5086  func (future *GremlinResourcesDeleteGremlinGraphFuture) result(client GremlinResourcesClient) (ar autorest.Response, err error) {
  5087  	var done bool
  5088  	done, err = future.DoneWithContext(context.Background(), client)
  5089  	if err != nil {
  5090  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesDeleteGremlinGraphFuture", "Result", future.Response(), "Polling failure")
  5091  		return
  5092  	}
  5093  	if !done {
  5094  		ar.Response = future.Response()
  5095  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesDeleteGremlinGraphFuture")
  5096  		return
  5097  	}
  5098  	ar.Response = future.Response()
  5099  	return
  5100  }
  5101  
  5102  // GremlinResourcesMigrateGremlinDatabaseToAutoscaleFuture an abstraction for monitoring and retrieving the
  5103  // results of a long-running operation.
  5104  type GremlinResourcesMigrateGremlinDatabaseToAutoscaleFuture struct {
  5105  	azure.FutureAPI
  5106  	// Result returns the result of the asynchronous operation.
  5107  	// If the operation has not completed it will return an error.
  5108  	Result func(GremlinResourcesClient) (ThroughputSettingsGetResults, error)
  5109  }
  5110  
  5111  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  5112  func (future *GremlinResourcesMigrateGremlinDatabaseToAutoscaleFuture) UnmarshalJSON(body []byte) error {
  5113  	var azFuture azure.Future
  5114  	if err := json.Unmarshal(body, &azFuture); err != nil {
  5115  		return err
  5116  	}
  5117  	future.FutureAPI = &azFuture
  5118  	future.Result = future.result
  5119  	return nil
  5120  }
  5121  
  5122  // result is the default implementation for GremlinResourcesMigrateGremlinDatabaseToAutoscaleFuture.Result.
  5123  func (future *GremlinResourcesMigrateGremlinDatabaseToAutoscaleFuture) result(client GremlinResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  5124  	var done bool
  5125  	done, err = future.DoneWithContext(context.Background(), client)
  5126  	if err != nil {
  5127  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesMigrateGremlinDatabaseToAutoscaleFuture", "Result", future.Response(), "Polling failure")
  5128  		return
  5129  	}
  5130  	if !done {
  5131  		tsgr.Response.Response = future.Response()
  5132  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesMigrateGremlinDatabaseToAutoscaleFuture")
  5133  		return
  5134  	}
  5135  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5136  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  5137  		tsgr, err = client.MigrateGremlinDatabaseToAutoscaleResponder(tsgr.Response.Response)
  5138  		if err != nil {
  5139  			err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesMigrateGremlinDatabaseToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  5140  		}
  5141  	}
  5142  	return
  5143  }
  5144  
  5145  // GremlinResourcesMigrateGremlinDatabaseToManualThroughputFuture an abstraction for monitoring and
  5146  // retrieving the results of a long-running operation.
  5147  type GremlinResourcesMigrateGremlinDatabaseToManualThroughputFuture struct {
  5148  	azure.FutureAPI
  5149  	// Result returns the result of the asynchronous operation.
  5150  	// If the operation has not completed it will return an error.
  5151  	Result func(GremlinResourcesClient) (ThroughputSettingsGetResults, error)
  5152  }
  5153  
  5154  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  5155  func (future *GremlinResourcesMigrateGremlinDatabaseToManualThroughputFuture) UnmarshalJSON(body []byte) error {
  5156  	var azFuture azure.Future
  5157  	if err := json.Unmarshal(body, &azFuture); err != nil {
  5158  		return err
  5159  	}
  5160  	future.FutureAPI = &azFuture
  5161  	future.Result = future.result
  5162  	return nil
  5163  }
  5164  
  5165  // result is the default implementation for GremlinResourcesMigrateGremlinDatabaseToManualThroughputFuture.Result.
  5166  func (future *GremlinResourcesMigrateGremlinDatabaseToManualThroughputFuture) result(client GremlinResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  5167  	var done bool
  5168  	done, err = future.DoneWithContext(context.Background(), client)
  5169  	if err != nil {
  5170  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesMigrateGremlinDatabaseToManualThroughputFuture", "Result", future.Response(), "Polling failure")
  5171  		return
  5172  	}
  5173  	if !done {
  5174  		tsgr.Response.Response = future.Response()
  5175  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesMigrateGremlinDatabaseToManualThroughputFuture")
  5176  		return
  5177  	}
  5178  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5179  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  5180  		tsgr, err = client.MigrateGremlinDatabaseToManualThroughputResponder(tsgr.Response.Response)
  5181  		if err != nil {
  5182  			err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesMigrateGremlinDatabaseToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  5183  		}
  5184  	}
  5185  	return
  5186  }
  5187  
  5188  // GremlinResourcesMigrateGremlinGraphToAutoscaleFuture an abstraction for monitoring and retrieving the
  5189  // results of a long-running operation.
  5190  type GremlinResourcesMigrateGremlinGraphToAutoscaleFuture struct {
  5191  	azure.FutureAPI
  5192  	// Result returns the result of the asynchronous operation.
  5193  	// If the operation has not completed it will return an error.
  5194  	Result func(GremlinResourcesClient) (ThroughputSettingsGetResults, error)
  5195  }
  5196  
  5197  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  5198  func (future *GremlinResourcesMigrateGremlinGraphToAutoscaleFuture) UnmarshalJSON(body []byte) error {
  5199  	var azFuture azure.Future
  5200  	if err := json.Unmarshal(body, &azFuture); err != nil {
  5201  		return err
  5202  	}
  5203  	future.FutureAPI = &azFuture
  5204  	future.Result = future.result
  5205  	return nil
  5206  }
  5207  
  5208  // result is the default implementation for GremlinResourcesMigrateGremlinGraphToAutoscaleFuture.Result.
  5209  func (future *GremlinResourcesMigrateGremlinGraphToAutoscaleFuture) result(client GremlinResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  5210  	var done bool
  5211  	done, err = future.DoneWithContext(context.Background(), client)
  5212  	if err != nil {
  5213  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesMigrateGremlinGraphToAutoscaleFuture", "Result", future.Response(), "Polling failure")
  5214  		return
  5215  	}
  5216  	if !done {
  5217  		tsgr.Response.Response = future.Response()
  5218  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesMigrateGremlinGraphToAutoscaleFuture")
  5219  		return
  5220  	}
  5221  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5222  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  5223  		tsgr, err = client.MigrateGremlinGraphToAutoscaleResponder(tsgr.Response.Response)
  5224  		if err != nil {
  5225  			err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesMigrateGremlinGraphToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  5226  		}
  5227  	}
  5228  	return
  5229  }
  5230  
  5231  // GremlinResourcesMigrateGremlinGraphToManualThroughputFuture an abstraction for monitoring and retrieving
  5232  // the results of a long-running operation.
  5233  type GremlinResourcesMigrateGremlinGraphToManualThroughputFuture struct {
  5234  	azure.FutureAPI
  5235  	// Result returns the result of the asynchronous operation.
  5236  	// If the operation has not completed it will return an error.
  5237  	Result func(GremlinResourcesClient) (ThroughputSettingsGetResults, error)
  5238  }
  5239  
  5240  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  5241  func (future *GremlinResourcesMigrateGremlinGraphToManualThroughputFuture) UnmarshalJSON(body []byte) error {
  5242  	var azFuture azure.Future
  5243  	if err := json.Unmarshal(body, &azFuture); err != nil {
  5244  		return err
  5245  	}
  5246  	future.FutureAPI = &azFuture
  5247  	future.Result = future.result
  5248  	return nil
  5249  }
  5250  
  5251  // result is the default implementation for GremlinResourcesMigrateGremlinGraphToManualThroughputFuture.Result.
  5252  func (future *GremlinResourcesMigrateGremlinGraphToManualThroughputFuture) result(client GremlinResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  5253  	var done bool
  5254  	done, err = future.DoneWithContext(context.Background(), client)
  5255  	if err != nil {
  5256  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesMigrateGremlinGraphToManualThroughputFuture", "Result", future.Response(), "Polling failure")
  5257  		return
  5258  	}
  5259  	if !done {
  5260  		tsgr.Response.Response = future.Response()
  5261  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesMigrateGremlinGraphToManualThroughputFuture")
  5262  		return
  5263  	}
  5264  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5265  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  5266  		tsgr, err = client.MigrateGremlinGraphToManualThroughputResponder(tsgr.Response.Response)
  5267  		if err != nil {
  5268  			err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesMigrateGremlinGraphToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  5269  		}
  5270  	}
  5271  	return
  5272  }
  5273  
  5274  // GremlinResourcesUpdateGremlinDatabaseThroughputFuture an abstraction for monitoring and retrieving the
  5275  // results of a long-running operation.
  5276  type GremlinResourcesUpdateGremlinDatabaseThroughputFuture struct {
  5277  	azure.FutureAPI
  5278  	// Result returns the result of the asynchronous operation.
  5279  	// If the operation has not completed it will return an error.
  5280  	Result func(GremlinResourcesClient) (ThroughputSettingsGetResults, error)
  5281  }
  5282  
  5283  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  5284  func (future *GremlinResourcesUpdateGremlinDatabaseThroughputFuture) UnmarshalJSON(body []byte) error {
  5285  	var azFuture azure.Future
  5286  	if err := json.Unmarshal(body, &azFuture); err != nil {
  5287  		return err
  5288  	}
  5289  	future.FutureAPI = &azFuture
  5290  	future.Result = future.result
  5291  	return nil
  5292  }
  5293  
  5294  // result is the default implementation for GremlinResourcesUpdateGremlinDatabaseThroughputFuture.Result.
  5295  func (future *GremlinResourcesUpdateGremlinDatabaseThroughputFuture) result(client GremlinResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  5296  	var done bool
  5297  	done, err = future.DoneWithContext(context.Background(), client)
  5298  	if err != nil {
  5299  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesUpdateGremlinDatabaseThroughputFuture", "Result", future.Response(), "Polling failure")
  5300  		return
  5301  	}
  5302  	if !done {
  5303  		tsgr.Response.Response = future.Response()
  5304  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesUpdateGremlinDatabaseThroughputFuture")
  5305  		return
  5306  	}
  5307  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5308  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  5309  		tsgr, err = client.UpdateGremlinDatabaseThroughputResponder(tsgr.Response.Response)
  5310  		if err != nil {
  5311  			err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesUpdateGremlinDatabaseThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  5312  		}
  5313  	}
  5314  	return
  5315  }
  5316  
  5317  // GremlinResourcesUpdateGremlinGraphThroughputFuture an abstraction for monitoring and retrieving the
  5318  // results of a long-running operation.
  5319  type GremlinResourcesUpdateGremlinGraphThroughputFuture struct {
  5320  	azure.FutureAPI
  5321  	// Result returns the result of the asynchronous operation.
  5322  	// If the operation has not completed it will return an error.
  5323  	Result func(GremlinResourcesClient) (ThroughputSettingsGetResults, error)
  5324  }
  5325  
  5326  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  5327  func (future *GremlinResourcesUpdateGremlinGraphThroughputFuture) UnmarshalJSON(body []byte) error {
  5328  	var azFuture azure.Future
  5329  	if err := json.Unmarshal(body, &azFuture); err != nil {
  5330  		return err
  5331  	}
  5332  	future.FutureAPI = &azFuture
  5333  	future.Result = future.result
  5334  	return nil
  5335  }
  5336  
  5337  // result is the default implementation for GremlinResourcesUpdateGremlinGraphThroughputFuture.Result.
  5338  func (future *GremlinResourcesUpdateGremlinGraphThroughputFuture) result(client GremlinResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  5339  	var done bool
  5340  	done, err = future.DoneWithContext(context.Background(), client)
  5341  	if err != nil {
  5342  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesUpdateGremlinGraphThroughputFuture", "Result", future.Response(), "Polling failure")
  5343  		return
  5344  	}
  5345  	if !done {
  5346  		tsgr.Response.Response = future.Response()
  5347  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesUpdateGremlinGraphThroughputFuture")
  5348  		return
  5349  	}
  5350  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5351  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  5352  		tsgr, err = client.UpdateGremlinGraphThroughputResponder(tsgr.Response.Response)
  5353  		if err != nil {
  5354  			err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesUpdateGremlinGraphThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  5355  		}
  5356  	}
  5357  	return
  5358  }
  5359  
  5360  // IncludedPath the paths that are included in indexing
  5361  type IncludedPath struct {
  5362  	// Path - The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*)
  5363  	Path *string `json:"path,omitempty"`
  5364  	// Indexes - List of indexes for this path
  5365  	Indexes *[]Indexes `json:"indexes,omitempty"`
  5366  }
  5367  
  5368  // Indexes the indexes for the path.
  5369  type Indexes struct {
  5370  	// DataType - The datatype for which the indexing behavior is applied to. Possible values include: 'DataTypeString', 'DataTypeNumber', 'DataTypePoint', 'DataTypePolygon', 'DataTypeLineString', 'DataTypeMultiPolygon'
  5371  	DataType DataType `json:"dataType,omitempty"`
  5372  	// Precision - The precision of the index. -1 is maximum precision.
  5373  	Precision *int32 `json:"precision,omitempty"`
  5374  	// Kind - Indicates the type of index. Possible values include: 'IndexKindHash', 'IndexKindRange', 'IndexKindSpatial'
  5375  	Kind IndexKind `json:"kind,omitempty"`
  5376  }
  5377  
  5378  // IndexingPolicy cosmos DB indexing policy
  5379  type IndexingPolicy struct {
  5380  	// Automatic - Indicates if the indexing policy is automatic
  5381  	Automatic *bool `json:"automatic,omitempty"`
  5382  	// IndexingMode - Indicates the indexing mode. Possible values include: 'IndexingModeConsistent', 'IndexingModeLazy', 'IndexingModeNone'
  5383  	IndexingMode IndexingMode `json:"indexingMode,omitempty"`
  5384  	// IncludedPaths - List of paths to include in the indexing
  5385  	IncludedPaths *[]IncludedPath `json:"includedPaths,omitempty"`
  5386  	// ExcludedPaths - List of paths to exclude from indexing
  5387  	ExcludedPaths *[]ExcludedPath `json:"excludedPaths,omitempty"`
  5388  	// CompositeIndexes - List of composite path list
  5389  	CompositeIndexes *[][]CompositePath `json:"compositeIndexes,omitempty"`
  5390  	// SpatialIndexes - List of spatial specifics
  5391  	SpatialIndexes *[]SpatialSpec `json:"spatialIndexes,omitempty"`
  5392  }
  5393  
  5394  // IPAddressOrRange ipAddressOrRange object
  5395  type IPAddressOrRange struct {
  5396  	// IPAddressOrRange - A single IPv4 address or a single IPv4 address range in CIDR format. Provided IPs must be well-formatted and cannot be contained in one of the following ranges: 10.0.0.0/8, 100.64.0.0/10, 172.16.0.0/12, 192.168.0.0/16, since these are not enforceable by the IP address filter. Example of valid inputs: “23.40.210.245” or “23.40.210.0/8”.
  5397  	IPAddressOrRange *string `json:"ipAddressOrRange,omitempty"`
  5398  }
  5399  
  5400  // ListBackups list of restorable backups for a Cassandra cluster.
  5401  type ListBackups struct {
  5402  	autorest.Response `json:"-"`
  5403  	// Value - READ-ONLY; Container for array of backups.
  5404  	Value *[]BackupResource `json:"value,omitempty"`
  5405  }
  5406  
  5407  // MarshalJSON is the custom marshaler for ListBackups.
  5408  func (lb ListBackups) MarshalJSON() ([]byte, error) {
  5409  	objectMap := make(map[string]interface{})
  5410  	return json.Marshal(objectMap)
  5411  }
  5412  
  5413  // ListClusters list of managed Cassandra clusters.
  5414  type ListClusters struct {
  5415  	autorest.Response `json:"-"`
  5416  	// Value - Container for the array of clusters.
  5417  	Value *[]ClusterResource `json:"value,omitempty"`
  5418  }
  5419  
  5420  // ListDataCenters list of managed Cassandra data centers and their properties.
  5421  type ListDataCenters struct {
  5422  	autorest.Response `json:"-"`
  5423  	// Value - READ-ONLY; Container for array of data centers.
  5424  	Value *[]DataCenterResource `json:"value,omitempty"`
  5425  }
  5426  
  5427  // MarshalJSON is the custom marshaler for ListDataCenters.
  5428  func (ldc ListDataCenters) MarshalJSON() ([]byte, error) {
  5429  	objectMap := make(map[string]interface{})
  5430  	return json.Marshal(objectMap)
  5431  }
  5432  
  5433  // Location a region in which the Azure Cosmos DB database account is deployed.
  5434  type Location struct {
  5435  	// ID - READ-ONLY; The unique identifier of the region within the database account. Example: &lt;accountName&gt;-&lt;locationName&gt;.
  5436  	ID *string `json:"id,omitempty"`
  5437  	// LocationName - The name of the region.
  5438  	LocationName *string `json:"locationName,omitempty"`
  5439  	// DocumentEndpoint - READ-ONLY; The connection endpoint for the specific region. Example: https://&lt;accountName&gt;-&lt;locationName&gt;.documents.azure.com:443/
  5440  	DocumentEndpoint  *string `json:"documentEndpoint,omitempty"`
  5441  	ProvisioningState *string `json:"provisioningState,omitempty"`
  5442  	// FailoverPriority - The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists.
  5443  	FailoverPriority *int32 `json:"failoverPriority,omitempty"`
  5444  	// IsZoneRedundant - Flag to indicate whether or not this region is an AvailabilityZone region
  5445  	IsZoneRedundant *bool `json:"isZoneRedundant,omitempty"`
  5446  }
  5447  
  5448  // MarshalJSON is the custom marshaler for Location.
  5449  func (l Location) MarshalJSON() ([]byte, error) {
  5450  	objectMap := make(map[string]interface{})
  5451  	if l.LocationName != nil {
  5452  		objectMap["locationName"] = l.LocationName
  5453  	}
  5454  	if l.ProvisioningState != nil {
  5455  		objectMap["provisioningState"] = l.ProvisioningState
  5456  	}
  5457  	if l.FailoverPriority != nil {
  5458  		objectMap["failoverPriority"] = l.FailoverPriority
  5459  	}
  5460  	if l.IsZoneRedundant != nil {
  5461  		objectMap["isZoneRedundant"] = l.IsZoneRedundant
  5462  	}
  5463  	return json.Marshal(objectMap)
  5464  }
  5465  
  5466  // LocationGetResult cosmos DB location get result
  5467  type LocationGetResult struct {
  5468  	autorest.Response `json:"-"`
  5469  	// Properties - Cosmos DB location metadata
  5470  	Properties *LocationProperties `json:"properties,omitempty"`
  5471  	// ID - READ-ONLY; The unique resource identifier of the database account.
  5472  	ID *string `json:"id,omitempty"`
  5473  	// Name - READ-ONLY; The name of the database account.
  5474  	Name *string `json:"name,omitempty"`
  5475  	// Type - READ-ONLY; The type of Azure resource.
  5476  	Type *string `json:"type,omitempty"`
  5477  }
  5478  
  5479  // MarshalJSON is the custom marshaler for LocationGetResult.
  5480  func (lgr LocationGetResult) MarshalJSON() ([]byte, error) {
  5481  	objectMap := make(map[string]interface{})
  5482  	if lgr.Properties != nil {
  5483  		objectMap["properties"] = lgr.Properties
  5484  	}
  5485  	return json.Marshal(objectMap)
  5486  }
  5487  
  5488  // LocationListResult the List operation response, that contains Cosmos DB locations and their properties.
  5489  type LocationListResult struct {
  5490  	autorest.Response `json:"-"`
  5491  	// Value - READ-ONLY; List of Cosmos DB locations and their properties.
  5492  	Value *[]LocationGetResult `json:"value,omitempty"`
  5493  }
  5494  
  5495  // MarshalJSON is the custom marshaler for LocationListResult.
  5496  func (llr LocationListResult) MarshalJSON() ([]byte, error) {
  5497  	objectMap := make(map[string]interface{})
  5498  	return json.Marshal(objectMap)
  5499  }
  5500  
  5501  // LocationProperties cosmos DB location metadata
  5502  type LocationProperties struct {
  5503  	// Status - READ-ONLY; The current status of location in Azure.
  5504  	Status *string `json:"status,omitempty"`
  5505  	// SupportsAvailabilityZone - READ-ONLY; Flag indicating whether the location supports availability zones or not.
  5506  	SupportsAvailabilityZone *bool `json:"supportsAvailabilityZone,omitempty"`
  5507  	// IsResidencyRestricted - READ-ONLY; Flag indicating whether the location is residency sensitive.
  5508  	IsResidencyRestricted *bool `json:"isResidencyRestricted,omitempty"`
  5509  	// BackupStorageRedundancies - READ-ONLY; The properties of available backup storage redundancies.
  5510  	BackupStorageRedundancies *[]BackupStorageRedundancy `json:"backupStorageRedundancies,omitempty"`
  5511  }
  5512  
  5513  // MarshalJSON is the custom marshaler for LocationProperties.
  5514  func (lp LocationProperties) MarshalJSON() ([]byte, error) {
  5515  	objectMap := make(map[string]interface{})
  5516  	return json.Marshal(objectMap)
  5517  }
  5518  
  5519  // ManagedServiceIdentity identity for the resource.
  5520  type ManagedServiceIdentity struct {
  5521  	// PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity.
  5522  	PrincipalID *string `json:"principalId,omitempty"`
  5523  	// TenantID - READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity.
  5524  	TenantID *string `json:"tenantId,omitempty"`
  5525  	// Type - The type of identity used for the resource. The type 'SystemAssigned,UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service. Possible values include: 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeUserAssigned', 'ResourceIdentityTypeSystemAssignedUserAssigned', 'ResourceIdentityTypeNone'
  5526  	Type ResourceIdentityType `json:"type,omitempty"`
  5527  	// UserAssignedIdentities - The list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
  5528  	UserAssignedIdentities map[string]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
  5529  }
  5530  
  5531  // MarshalJSON is the custom marshaler for ManagedServiceIdentity.
  5532  func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) {
  5533  	objectMap := make(map[string]interface{})
  5534  	if msi.Type != "" {
  5535  		objectMap["type"] = msi.Type
  5536  	}
  5537  	if msi.UserAssignedIdentities != nil {
  5538  		objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities
  5539  	}
  5540  	return json.Marshal(objectMap)
  5541  }
  5542  
  5543  // ManagedServiceIdentityUserAssignedIdentitiesValue ...
  5544  type ManagedServiceIdentityUserAssignedIdentitiesValue struct {
  5545  	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
  5546  	PrincipalID *string `json:"principalId,omitempty"`
  5547  	// ClientID - READ-ONLY; The client id of user assigned identity.
  5548  	ClientID *string `json:"clientId,omitempty"`
  5549  }
  5550  
  5551  // MarshalJSON is the custom marshaler for ManagedServiceIdentityUserAssignedIdentitiesValue.
  5552  func (msiAiv ManagedServiceIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
  5553  	objectMap := make(map[string]interface{})
  5554  	return json.Marshal(objectMap)
  5555  }
  5556  
  5557  // Metric metric data
  5558  type Metric struct {
  5559  	// StartTime - READ-ONLY; The start time for the metric (ISO-8601 format).
  5560  	StartTime *date.Time `json:"startTime,omitempty"`
  5561  	// EndTime - READ-ONLY; The end time for the metric (ISO-8601 format).
  5562  	EndTime *date.Time `json:"endTime,omitempty"`
  5563  	// TimeGrain - READ-ONLY; The time grain to be used to summarize the metric values.
  5564  	TimeGrain *string `json:"timeGrain,omitempty"`
  5565  	// Unit - The unit of the metric. Possible values include: 'UnitTypeCount', 'UnitTypeBytes', 'UnitTypeSeconds', 'UnitTypePercent', 'UnitTypeCountPerSecond', 'UnitTypeBytesPerSecond', 'UnitTypeMilliseconds'
  5566  	Unit UnitType `json:"unit,omitempty"`
  5567  	// Name - READ-ONLY; The name information for the metric.
  5568  	Name *MetricName `json:"name,omitempty"`
  5569  	// MetricValues - READ-ONLY; The metric values for the specified time window and timestep.
  5570  	MetricValues *[]MetricValue `json:"metricValues,omitempty"`
  5571  }
  5572  
  5573  // MarshalJSON is the custom marshaler for Metric.
  5574  func (mVar Metric) MarshalJSON() ([]byte, error) {
  5575  	objectMap := make(map[string]interface{})
  5576  	if mVar.Unit != "" {
  5577  		objectMap["unit"] = mVar.Unit
  5578  	}
  5579  	return json.Marshal(objectMap)
  5580  }
  5581  
  5582  // MetricAvailability the availability of the metric.
  5583  type MetricAvailability struct {
  5584  	// TimeGrain - READ-ONLY; The time grain to be used to summarize the metric values.
  5585  	TimeGrain *string `json:"timeGrain,omitempty"`
  5586  	// Retention - READ-ONLY; The retention for the metric values.
  5587  	Retention *string `json:"retention,omitempty"`
  5588  }
  5589  
  5590  // MarshalJSON is the custom marshaler for MetricAvailability.
  5591  func (ma MetricAvailability) MarshalJSON() ([]byte, error) {
  5592  	objectMap := make(map[string]interface{})
  5593  	return json.Marshal(objectMap)
  5594  }
  5595  
  5596  // MetricDefinition the definition of a metric.
  5597  type MetricDefinition struct {
  5598  	// MetricAvailabilities - READ-ONLY; The list of metric availabilities for the account.
  5599  	MetricAvailabilities *[]MetricAvailability `json:"metricAvailabilities,omitempty"`
  5600  	// PrimaryAggregationType - READ-ONLY; The primary aggregation type of the metric. Possible values include: 'PrimaryAggregationTypeNone', 'PrimaryAggregationTypeAverage', 'PrimaryAggregationTypeTotal', 'PrimaryAggregationTypeMinimum', 'PrimaryAggregationTypeMaximum', 'PrimaryAggregationTypeLast'
  5601  	PrimaryAggregationType PrimaryAggregationType `json:"primaryAggregationType,omitempty"`
  5602  	// Unit - The unit of the metric. Possible values include: 'UnitTypeCount', 'UnitTypeBytes', 'UnitTypeSeconds', 'UnitTypePercent', 'UnitTypeCountPerSecond', 'UnitTypeBytesPerSecond', 'UnitTypeMilliseconds'
  5603  	Unit UnitType `json:"unit,omitempty"`
  5604  	// ResourceURI - READ-ONLY; The resource uri of the database.
  5605  	ResourceURI *string `json:"resourceUri,omitempty"`
  5606  	// Name - READ-ONLY; The name information for the metric.
  5607  	Name *MetricName `json:"name,omitempty"`
  5608  }
  5609  
  5610  // MarshalJSON is the custom marshaler for MetricDefinition.
  5611  func (md MetricDefinition) MarshalJSON() ([]byte, error) {
  5612  	objectMap := make(map[string]interface{})
  5613  	if md.Unit != "" {
  5614  		objectMap["unit"] = md.Unit
  5615  	}
  5616  	return json.Marshal(objectMap)
  5617  }
  5618  
  5619  // MetricDefinitionsListResult the response to a list metric definitions request.
  5620  type MetricDefinitionsListResult struct {
  5621  	autorest.Response `json:"-"`
  5622  	// Value - READ-ONLY; The list of metric definitions for the account.
  5623  	Value *[]MetricDefinition `json:"value,omitempty"`
  5624  }
  5625  
  5626  // MarshalJSON is the custom marshaler for MetricDefinitionsListResult.
  5627  func (mdlr MetricDefinitionsListResult) MarshalJSON() ([]byte, error) {
  5628  	objectMap := make(map[string]interface{})
  5629  	return json.Marshal(objectMap)
  5630  }
  5631  
  5632  // MetricListResult the response to a list metrics request.
  5633  type MetricListResult struct {
  5634  	autorest.Response `json:"-"`
  5635  	// Value - READ-ONLY; The list of metrics for the account.
  5636  	Value *[]Metric `json:"value,omitempty"`
  5637  }
  5638  
  5639  // MarshalJSON is the custom marshaler for MetricListResult.
  5640  func (mlr MetricListResult) MarshalJSON() ([]byte, error) {
  5641  	objectMap := make(map[string]interface{})
  5642  	return json.Marshal(objectMap)
  5643  }
  5644  
  5645  // MetricName a metric name.
  5646  type MetricName struct {
  5647  	// Value - READ-ONLY; The name of the metric.
  5648  	Value *string `json:"value,omitempty"`
  5649  	// LocalizedValue - READ-ONLY; The friendly name of the metric.
  5650  	LocalizedValue *string `json:"localizedValue,omitempty"`
  5651  }
  5652  
  5653  // MarshalJSON is the custom marshaler for MetricName.
  5654  func (mn MetricName) MarshalJSON() ([]byte, error) {
  5655  	objectMap := make(map[string]interface{})
  5656  	return json.Marshal(objectMap)
  5657  }
  5658  
  5659  // MetricValue represents metrics values.
  5660  type MetricValue struct {
  5661  	// Count - READ-ONLY; The number of values for the metric.
  5662  	Count *float64 `json:"_count,omitempty"`
  5663  	// Average - READ-ONLY; The average value of the metric.
  5664  	Average *float64 `json:"average,omitempty"`
  5665  	// Maximum - READ-ONLY; The max value of the metric.
  5666  	Maximum *float64 `json:"maximum,omitempty"`
  5667  	// Minimum - READ-ONLY; The min value of the metric.
  5668  	Minimum *float64 `json:"minimum,omitempty"`
  5669  	// Timestamp - READ-ONLY; The metric timestamp (ISO-8601 format).
  5670  	Timestamp *date.Time `json:"timestamp,omitempty"`
  5671  	// Total - READ-ONLY; The total value of the metric.
  5672  	Total *float64 `json:"total,omitempty"`
  5673  }
  5674  
  5675  // MarshalJSON is the custom marshaler for MetricValue.
  5676  func (mv MetricValue) MarshalJSON() ([]byte, error) {
  5677  	objectMap := make(map[string]interface{})
  5678  	return json.Marshal(objectMap)
  5679  }
  5680  
  5681  // MongoDBCollectionCreateUpdateParameters parameters to create and update Cosmos DB MongoDB collection.
  5682  type MongoDBCollectionCreateUpdateParameters struct {
  5683  	// MongoDBCollectionCreateUpdateProperties - Properties to create and update Azure Cosmos DB MongoDB collection.
  5684  	*MongoDBCollectionCreateUpdateProperties `json:"properties,omitempty"`
  5685  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  5686  	ID *string `json:"id,omitempty"`
  5687  	// Name - READ-ONLY; The name of the ARM resource.
  5688  	Name *string `json:"name,omitempty"`
  5689  	// Type - READ-ONLY; The type of Azure resource.
  5690  	Type *string `json:"type,omitempty"`
  5691  	// Location - The location of the resource group to which the resource belongs.
  5692  	Location *string                 `json:"location,omitempty"`
  5693  	Tags     map[string]*string      `json:"tags"`
  5694  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
  5695  }
  5696  
  5697  // MarshalJSON is the custom marshaler for MongoDBCollectionCreateUpdateParameters.
  5698  func (mdccup MongoDBCollectionCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  5699  	objectMap := make(map[string]interface{})
  5700  	if mdccup.MongoDBCollectionCreateUpdateProperties != nil {
  5701  		objectMap["properties"] = mdccup.MongoDBCollectionCreateUpdateProperties
  5702  	}
  5703  	if mdccup.Location != nil {
  5704  		objectMap["location"] = mdccup.Location
  5705  	}
  5706  	if mdccup.Tags != nil {
  5707  		objectMap["tags"] = mdccup.Tags
  5708  	}
  5709  	if mdccup.Identity != nil {
  5710  		objectMap["identity"] = mdccup.Identity
  5711  	}
  5712  	return json.Marshal(objectMap)
  5713  }
  5714  
  5715  // UnmarshalJSON is the custom unmarshaler for MongoDBCollectionCreateUpdateParameters struct.
  5716  func (mdccup *MongoDBCollectionCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  5717  	var m map[string]*json.RawMessage
  5718  	err := json.Unmarshal(body, &m)
  5719  	if err != nil {
  5720  		return err
  5721  	}
  5722  	for k, v := range m {
  5723  		switch k {
  5724  		case "properties":
  5725  			if v != nil {
  5726  				var mongoDBCollectionCreateUpdateProperties MongoDBCollectionCreateUpdateProperties
  5727  				err = json.Unmarshal(*v, &mongoDBCollectionCreateUpdateProperties)
  5728  				if err != nil {
  5729  					return err
  5730  				}
  5731  				mdccup.MongoDBCollectionCreateUpdateProperties = &mongoDBCollectionCreateUpdateProperties
  5732  			}
  5733  		case "id":
  5734  			if v != nil {
  5735  				var ID string
  5736  				err = json.Unmarshal(*v, &ID)
  5737  				if err != nil {
  5738  					return err
  5739  				}
  5740  				mdccup.ID = &ID
  5741  			}
  5742  		case "name":
  5743  			if v != nil {
  5744  				var name string
  5745  				err = json.Unmarshal(*v, &name)
  5746  				if err != nil {
  5747  					return err
  5748  				}
  5749  				mdccup.Name = &name
  5750  			}
  5751  		case "type":
  5752  			if v != nil {
  5753  				var typeVar string
  5754  				err = json.Unmarshal(*v, &typeVar)
  5755  				if err != nil {
  5756  					return err
  5757  				}
  5758  				mdccup.Type = &typeVar
  5759  			}
  5760  		case "location":
  5761  			if v != nil {
  5762  				var location string
  5763  				err = json.Unmarshal(*v, &location)
  5764  				if err != nil {
  5765  					return err
  5766  				}
  5767  				mdccup.Location = &location
  5768  			}
  5769  		case "tags":
  5770  			if v != nil {
  5771  				var tags map[string]*string
  5772  				err = json.Unmarshal(*v, &tags)
  5773  				if err != nil {
  5774  					return err
  5775  				}
  5776  				mdccup.Tags = tags
  5777  			}
  5778  		case "identity":
  5779  			if v != nil {
  5780  				var identity ManagedServiceIdentity
  5781  				err = json.Unmarshal(*v, &identity)
  5782  				if err != nil {
  5783  					return err
  5784  				}
  5785  				mdccup.Identity = &identity
  5786  			}
  5787  		}
  5788  	}
  5789  
  5790  	return nil
  5791  }
  5792  
  5793  // MongoDBCollectionCreateUpdateProperties properties to create and update Azure Cosmos DB MongoDB
  5794  // collection.
  5795  type MongoDBCollectionCreateUpdateProperties struct {
  5796  	// Resource - The standard JSON format of a MongoDB collection
  5797  	Resource *MongoDBCollectionResource `json:"resource,omitempty"`
  5798  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
  5799  	Options *CreateUpdateOptions `json:"options,omitempty"`
  5800  }
  5801  
  5802  // MongoDBCollectionGetProperties the properties of an Azure Cosmos DB MongoDB collection
  5803  type MongoDBCollectionGetProperties struct {
  5804  	Resource *MongoDBCollectionGetPropertiesResource `json:"resource,omitempty"`
  5805  	Options  *MongoDBCollectionGetPropertiesOptions  `json:"options,omitempty"`
  5806  }
  5807  
  5808  // MongoDBCollectionGetPropertiesOptions ...
  5809  type MongoDBCollectionGetPropertiesOptions struct {
  5810  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
  5811  	Throughput *int32 `json:"throughput,omitempty"`
  5812  	// AutoscaleSettings - Specifies the Autoscale settings.
  5813  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  5814  }
  5815  
  5816  // MongoDBCollectionGetPropertiesResource ...
  5817  type MongoDBCollectionGetPropertiesResource struct {
  5818  	// ID - Name of the Cosmos DB MongoDB collection
  5819  	ID *string `json:"id,omitempty"`
  5820  	// ShardKey - A key-value pair of shard keys to be applied for the request.
  5821  	ShardKey map[string]*string `json:"shardKey"`
  5822  	// Indexes - List of index keys
  5823  	Indexes *[]MongoIndex `json:"indexes,omitempty"`
  5824  	// AnalyticalStorageTTL - Analytical TTL.
  5825  	AnalyticalStorageTTL *int32 `json:"analyticalStorageTtl,omitempty"`
  5826  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  5827  	Rid *string `json:"_rid,omitempty"`
  5828  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  5829  	Ts *float64 `json:"_ts,omitempty"`
  5830  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  5831  	Etag *string `json:"_etag,omitempty"`
  5832  }
  5833  
  5834  // MarshalJSON is the custom marshaler for MongoDBCollectionGetPropertiesResource.
  5835  func (mdcgp MongoDBCollectionGetPropertiesResource) MarshalJSON() ([]byte, error) {
  5836  	objectMap := make(map[string]interface{})
  5837  	if mdcgp.ID != nil {
  5838  		objectMap["id"] = mdcgp.ID
  5839  	}
  5840  	if mdcgp.ShardKey != nil {
  5841  		objectMap["shardKey"] = mdcgp.ShardKey
  5842  	}
  5843  	if mdcgp.Indexes != nil {
  5844  		objectMap["indexes"] = mdcgp.Indexes
  5845  	}
  5846  	if mdcgp.AnalyticalStorageTTL != nil {
  5847  		objectMap["analyticalStorageTtl"] = mdcgp.AnalyticalStorageTTL
  5848  	}
  5849  	return json.Marshal(objectMap)
  5850  }
  5851  
  5852  // MongoDBCollectionGetResults an Azure Cosmos DB MongoDB collection.
  5853  type MongoDBCollectionGetResults struct {
  5854  	autorest.Response `json:"-"`
  5855  	// MongoDBCollectionGetProperties - The properties of an Azure Cosmos DB MongoDB collection
  5856  	*MongoDBCollectionGetProperties `json:"properties,omitempty"`
  5857  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  5858  	ID *string `json:"id,omitempty"`
  5859  	// Name - READ-ONLY; The name of the ARM resource.
  5860  	Name *string `json:"name,omitempty"`
  5861  	// Type - READ-ONLY; The type of Azure resource.
  5862  	Type *string `json:"type,omitempty"`
  5863  	// Location - The location of the resource group to which the resource belongs.
  5864  	Location *string                 `json:"location,omitempty"`
  5865  	Tags     map[string]*string      `json:"tags"`
  5866  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
  5867  }
  5868  
  5869  // MarshalJSON is the custom marshaler for MongoDBCollectionGetResults.
  5870  func (mdcgr MongoDBCollectionGetResults) MarshalJSON() ([]byte, error) {
  5871  	objectMap := make(map[string]interface{})
  5872  	if mdcgr.MongoDBCollectionGetProperties != nil {
  5873  		objectMap["properties"] = mdcgr.MongoDBCollectionGetProperties
  5874  	}
  5875  	if mdcgr.Location != nil {
  5876  		objectMap["location"] = mdcgr.Location
  5877  	}
  5878  	if mdcgr.Tags != nil {
  5879  		objectMap["tags"] = mdcgr.Tags
  5880  	}
  5881  	if mdcgr.Identity != nil {
  5882  		objectMap["identity"] = mdcgr.Identity
  5883  	}
  5884  	return json.Marshal(objectMap)
  5885  }
  5886  
  5887  // UnmarshalJSON is the custom unmarshaler for MongoDBCollectionGetResults struct.
  5888  func (mdcgr *MongoDBCollectionGetResults) UnmarshalJSON(body []byte) error {
  5889  	var m map[string]*json.RawMessage
  5890  	err := json.Unmarshal(body, &m)
  5891  	if err != nil {
  5892  		return err
  5893  	}
  5894  	for k, v := range m {
  5895  		switch k {
  5896  		case "properties":
  5897  			if v != nil {
  5898  				var mongoDBCollectionGetProperties MongoDBCollectionGetProperties
  5899  				err = json.Unmarshal(*v, &mongoDBCollectionGetProperties)
  5900  				if err != nil {
  5901  					return err
  5902  				}
  5903  				mdcgr.MongoDBCollectionGetProperties = &mongoDBCollectionGetProperties
  5904  			}
  5905  		case "id":
  5906  			if v != nil {
  5907  				var ID string
  5908  				err = json.Unmarshal(*v, &ID)
  5909  				if err != nil {
  5910  					return err
  5911  				}
  5912  				mdcgr.ID = &ID
  5913  			}
  5914  		case "name":
  5915  			if v != nil {
  5916  				var name string
  5917  				err = json.Unmarshal(*v, &name)
  5918  				if err != nil {
  5919  					return err
  5920  				}
  5921  				mdcgr.Name = &name
  5922  			}
  5923  		case "type":
  5924  			if v != nil {
  5925  				var typeVar string
  5926  				err = json.Unmarshal(*v, &typeVar)
  5927  				if err != nil {
  5928  					return err
  5929  				}
  5930  				mdcgr.Type = &typeVar
  5931  			}
  5932  		case "location":
  5933  			if v != nil {
  5934  				var location string
  5935  				err = json.Unmarshal(*v, &location)
  5936  				if err != nil {
  5937  					return err
  5938  				}
  5939  				mdcgr.Location = &location
  5940  			}
  5941  		case "tags":
  5942  			if v != nil {
  5943  				var tags map[string]*string
  5944  				err = json.Unmarshal(*v, &tags)
  5945  				if err != nil {
  5946  					return err
  5947  				}
  5948  				mdcgr.Tags = tags
  5949  			}
  5950  		case "identity":
  5951  			if v != nil {
  5952  				var identity ManagedServiceIdentity
  5953  				err = json.Unmarshal(*v, &identity)
  5954  				if err != nil {
  5955  					return err
  5956  				}
  5957  				mdcgr.Identity = &identity
  5958  			}
  5959  		}
  5960  	}
  5961  
  5962  	return nil
  5963  }
  5964  
  5965  // MongoDBCollectionListResult the List operation response, that contains the MongoDB collections and their
  5966  // properties.
  5967  type MongoDBCollectionListResult struct {
  5968  	autorest.Response `json:"-"`
  5969  	// Value - READ-ONLY; List of MongoDB collections and their properties.
  5970  	Value *[]MongoDBCollectionGetResults `json:"value,omitempty"`
  5971  }
  5972  
  5973  // MarshalJSON is the custom marshaler for MongoDBCollectionListResult.
  5974  func (mdclr MongoDBCollectionListResult) MarshalJSON() ([]byte, error) {
  5975  	objectMap := make(map[string]interface{})
  5976  	return json.Marshal(objectMap)
  5977  }
  5978  
  5979  // MongoDBCollectionResource cosmos DB MongoDB collection resource object
  5980  type MongoDBCollectionResource struct {
  5981  	// ID - Name of the Cosmos DB MongoDB collection
  5982  	ID *string `json:"id,omitempty"`
  5983  	// ShardKey - A key-value pair of shard keys to be applied for the request.
  5984  	ShardKey map[string]*string `json:"shardKey"`
  5985  	// Indexes - List of index keys
  5986  	Indexes *[]MongoIndex `json:"indexes,omitempty"`
  5987  	// AnalyticalStorageTTL - Analytical TTL.
  5988  	AnalyticalStorageTTL *int32 `json:"analyticalStorageTtl,omitempty"`
  5989  }
  5990  
  5991  // MarshalJSON is the custom marshaler for MongoDBCollectionResource.
  5992  func (mdcr MongoDBCollectionResource) MarshalJSON() ([]byte, error) {
  5993  	objectMap := make(map[string]interface{})
  5994  	if mdcr.ID != nil {
  5995  		objectMap["id"] = mdcr.ID
  5996  	}
  5997  	if mdcr.ShardKey != nil {
  5998  		objectMap["shardKey"] = mdcr.ShardKey
  5999  	}
  6000  	if mdcr.Indexes != nil {
  6001  		objectMap["indexes"] = mdcr.Indexes
  6002  	}
  6003  	if mdcr.AnalyticalStorageTTL != nil {
  6004  		objectMap["analyticalStorageTtl"] = mdcr.AnalyticalStorageTTL
  6005  	}
  6006  	return json.Marshal(objectMap)
  6007  }
  6008  
  6009  // MongoDBDatabaseCreateUpdateParameters parameters to create and update Cosmos DB MongoDB database.
  6010  type MongoDBDatabaseCreateUpdateParameters struct {
  6011  	// MongoDBDatabaseCreateUpdateProperties - Properties to create and update Azure Cosmos DB MongoDB database.
  6012  	*MongoDBDatabaseCreateUpdateProperties `json:"properties,omitempty"`
  6013  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  6014  	ID *string `json:"id,omitempty"`
  6015  	// Name - READ-ONLY; The name of the ARM resource.
  6016  	Name *string `json:"name,omitempty"`
  6017  	// Type - READ-ONLY; The type of Azure resource.
  6018  	Type *string `json:"type,omitempty"`
  6019  	// Location - The location of the resource group to which the resource belongs.
  6020  	Location *string                 `json:"location,omitempty"`
  6021  	Tags     map[string]*string      `json:"tags"`
  6022  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
  6023  }
  6024  
  6025  // MarshalJSON is the custom marshaler for MongoDBDatabaseCreateUpdateParameters.
  6026  func (mddcup MongoDBDatabaseCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  6027  	objectMap := make(map[string]interface{})
  6028  	if mddcup.MongoDBDatabaseCreateUpdateProperties != nil {
  6029  		objectMap["properties"] = mddcup.MongoDBDatabaseCreateUpdateProperties
  6030  	}
  6031  	if mddcup.Location != nil {
  6032  		objectMap["location"] = mddcup.Location
  6033  	}
  6034  	if mddcup.Tags != nil {
  6035  		objectMap["tags"] = mddcup.Tags
  6036  	}
  6037  	if mddcup.Identity != nil {
  6038  		objectMap["identity"] = mddcup.Identity
  6039  	}
  6040  	return json.Marshal(objectMap)
  6041  }
  6042  
  6043  // UnmarshalJSON is the custom unmarshaler for MongoDBDatabaseCreateUpdateParameters struct.
  6044  func (mddcup *MongoDBDatabaseCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  6045  	var m map[string]*json.RawMessage
  6046  	err := json.Unmarshal(body, &m)
  6047  	if err != nil {
  6048  		return err
  6049  	}
  6050  	for k, v := range m {
  6051  		switch k {
  6052  		case "properties":
  6053  			if v != nil {
  6054  				var mongoDBDatabaseCreateUpdateProperties MongoDBDatabaseCreateUpdateProperties
  6055  				err = json.Unmarshal(*v, &mongoDBDatabaseCreateUpdateProperties)
  6056  				if err != nil {
  6057  					return err
  6058  				}
  6059  				mddcup.MongoDBDatabaseCreateUpdateProperties = &mongoDBDatabaseCreateUpdateProperties
  6060  			}
  6061  		case "id":
  6062  			if v != nil {
  6063  				var ID string
  6064  				err = json.Unmarshal(*v, &ID)
  6065  				if err != nil {
  6066  					return err
  6067  				}
  6068  				mddcup.ID = &ID
  6069  			}
  6070  		case "name":
  6071  			if v != nil {
  6072  				var name string
  6073  				err = json.Unmarshal(*v, &name)
  6074  				if err != nil {
  6075  					return err
  6076  				}
  6077  				mddcup.Name = &name
  6078  			}
  6079  		case "type":
  6080  			if v != nil {
  6081  				var typeVar string
  6082  				err = json.Unmarshal(*v, &typeVar)
  6083  				if err != nil {
  6084  					return err
  6085  				}
  6086  				mddcup.Type = &typeVar
  6087  			}
  6088  		case "location":
  6089  			if v != nil {
  6090  				var location string
  6091  				err = json.Unmarshal(*v, &location)
  6092  				if err != nil {
  6093  					return err
  6094  				}
  6095  				mddcup.Location = &location
  6096  			}
  6097  		case "tags":
  6098  			if v != nil {
  6099  				var tags map[string]*string
  6100  				err = json.Unmarshal(*v, &tags)
  6101  				if err != nil {
  6102  					return err
  6103  				}
  6104  				mddcup.Tags = tags
  6105  			}
  6106  		case "identity":
  6107  			if v != nil {
  6108  				var identity ManagedServiceIdentity
  6109  				err = json.Unmarshal(*v, &identity)
  6110  				if err != nil {
  6111  					return err
  6112  				}
  6113  				mddcup.Identity = &identity
  6114  			}
  6115  		}
  6116  	}
  6117  
  6118  	return nil
  6119  }
  6120  
  6121  // MongoDBDatabaseCreateUpdateProperties properties to create and update Azure Cosmos DB MongoDB database.
  6122  type MongoDBDatabaseCreateUpdateProperties struct {
  6123  	// Resource - The standard JSON format of a MongoDB database
  6124  	Resource *MongoDBDatabaseResource `json:"resource,omitempty"`
  6125  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
  6126  	Options *CreateUpdateOptions `json:"options,omitempty"`
  6127  }
  6128  
  6129  // MongoDBDatabaseGetProperties the properties of an Azure Cosmos DB MongoDB database
  6130  type MongoDBDatabaseGetProperties struct {
  6131  	Resource *MongoDBDatabaseGetPropertiesResource `json:"resource,omitempty"`
  6132  	Options  *MongoDBDatabaseGetPropertiesOptions  `json:"options,omitempty"`
  6133  }
  6134  
  6135  // MongoDBDatabaseGetPropertiesOptions ...
  6136  type MongoDBDatabaseGetPropertiesOptions struct {
  6137  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
  6138  	Throughput *int32 `json:"throughput,omitempty"`
  6139  	// AutoscaleSettings - Specifies the Autoscale settings.
  6140  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  6141  }
  6142  
  6143  // MongoDBDatabaseGetPropertiesResource ...
  6144  type MongoDBDatabaseGetPropertiesResource struct {
  6145  	// ID - Name of the Cosmos DB MongoDB database
  6146  	ID *string `json:"id,omitempty"`
  6147  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  6148  	Rid *string `json:"_rid,omitempty"`
  6149  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  6150  	Ts *float64 `json:"_ts,omitempty"`
  6151  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  6152  	Etag *string `json:"_etag,omitempty"`
  6153  }
  6154  
  6155  // MarshalJSON is the custom marshaler for MongoDBDatabaseGetPropertiesResource.
  6156  func (mddgp MongoDBDatabaseGetPropertiesResource) MarshalJSON() ([]byte, error) {
  6157  	objectMap := make(map[string]interface{})
  6158  	if mddgp.ID != nil {
  6159  		objectMap["id"] = mddgp.ID
  6160  	}
  6161  	return json.Marshal(objectMap)
  6162  }
  6163  
  6164  // MongoDBDatabaseGetResults an Azure Cosmos DB MongoDB database.
  6165  type MongoDBDatabaseGetResults struct {
  6166  	autorest.Response `json:"-"`
  6167  	// MongoDBDatabaseGetProperties - The properties of an Azure Cosmos DB MongoDB database
  6168  	*MongoDBDatabaseGetProperties `json:"properties,omitempty"`
  6169  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  6170  	ID *string `json:"id,omitempty"`
  6171  	// Name - READ-ONLY; The name of the ARM resource.
  6172  	Name *string `json:"name,omitempty"`
  6173  	// Type - READ-ONLY; The type of Azure resource.
  6174  	Type *string `json:"type,omitempty"`
  6175  	// Location - The location of the resource group to which the resource belongs.
  6176  	Location *string                 `json:"location,omitempty"`
  6177  	Tags     map[string]*string      `json:"tags"`
  6178  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
  6179  }
  6180  
  6181  // MarshalJSON is the custom marshaler for MongoDBDatabaseGetResults.
  6182  func (mddgr MongoDBDatabaseGetResults) MarshalJSON() ([]byte, error) {
  6183  	objectMap := make(map[string]interface{})
  6184  	if mddgr.MongoDBDatabaseGetProperties != nil {
  6185  		objectMap["properties"] = mddgr.MongoDBDatabaseGetProperties
  6186  	}
  6187  	if mddgr.Location != nil {
  6188  		objectMap["location"] = mddgr.Location
  6189  	}
  6190  	if mddgr.Tags != nil {
  6191  		objectMap["tags"] = mddgr.Tags
  6192  	}
  6193  	if mddgr.Identity != nil {
  6194  		objectMap["identity"] = mddgr.Identity
  6195  	}
  6196  	return json.Marshal(objectMap)
  6197  }
  6198  
  6199  // UnmarshalJSON is the custom unmarshaler for MongoDBDatabaseGetResults struct.
  6200  func (mddgr *MongoDBDatabaseGetResults) UnmarshalJSON(body []byte) error {
  6201  	var m map[string]*json.RawMessage
  6202  	err := json.Unmarshal(body, &m)
  6203  	if err != nil {
  6204  		return err
  6205  	}
  6206  	for k, v := range m {
  6207  		switch k {
  6208  		case "properties":
  6209  			if v != nil {
  6210  				var mongoDBDatabaseGetProperties MongoDBDatabaseGetProperties
  6211  				err = json.Unmarshal(*v, &mongoDBDatabaseGetProperties)
  6212  				if err != nil {
  6213  					return err
  6214  				}
  6215  				mddgr.MongoDBDatabaseGetProperties = &mongoDBDatabaseGetProperties
  6216  			}
  6217  		case "id":
  6218  			if v != nil {
  6219  				var ID string
  6220  				err = json.Unmarshal(*v, &ID)
  6221  				if err != nil {
  6222  					return err
  6223  				}
  6224  				mddgr.ID = &ID
  6225  			}
  6226  		case "name":
  6227  			if v != nil {
  6228  				var name string
  6229  				err = json.Unmarshal(*v, &name)
  6230  				if err != nil {
  6231  					return err
  6232  				}
  6233  				mddgr.Name = &name
  6234  			}
  6235  		case "type":
  6236  			if v != nil {
  6237  				var typeVar string
  6238  				err = json.Unmarshal(*v, &typeVar)
  6239  				if err != nil {
  6240  					return err
  6241  				}
  6242  				mddgr.Type = &typeVar
  6243  			}
  6244  		case "location":
  6245  			if v != nil {
  6246  				var location string
  6247  				err = json.Unmarshal(*v, &location)
  6248  				if err != nil {
  6249  					return err
  6250  				}
  6251  				mddgr.Location = &location
  6252  			}
  6253  		case "tags":
  6254  			if v != nil {
  6255  				var tags map[string]*string
  6256  				err = json.Unmarshal(*v, &tags)
  6257  				if err != nil {
  6258  					return err
  6259  				}
  6260  				mddgr.Tags = tags
  6261  			}
  6262  		case "identity":
  6263  			if v != nil {
  6264  				var identity ManagedServiceIdentity
  6265  				err = json.Unmarshal(*v, &identity)
  6266  				if err != nil {
  6267  					return err
  6268  				}
  6269  				mddgr.Identity = &identity
  6270  			}
  6271  		}
  6272  	}
  6273  
  6274  	return nil
  6275  }
  6276  
  6277  // MongoDBDatabaseListResult the List operation response, that contains the MongoDB databases and their
  6278  // properties.
  6279  type MongoDBDatabaseListResult struct {
  6280  	autorest.Response `json:"-"`
  6281  	// Value - READ-ONLY; List of MongoDB databases and their properties.
  6282  	Value *[]MongoDBDatabaseGetResults `json:"value,omitempty"`
  6283  }
  6284  
  6285  // MarshalJSON is the custom marshaler for MongoDBDatabaseListResult.
  6286  func (mddlr MongoDBDatabaseListResult) MarshalJSON() ([]byte, error) {
  6287  	objectMap := make(map[string]interface{})
  6288  	return json.Marshal(objectMap)
  6289  }
  6290  
  6291  // MongoDBDatabaseResource cosmos DB MongoDB database resource object
  6292  type MongoDBDatabaseResource struct {
  6293  	// ID - Name of the Cosmos DB MongoDB database
  6294  	ID *string `json:"id,omitempty"`
  6295  }
  6296  
  6297  // MongoDBResourcesCreateUpdateMongoDBCollectionFuture an abstraction for monitoring and retrieving the
  6298  // results of a long-running operation.
  6299  type MongoDBResourcesCreateUpdateMongoDBCollectionFuture struct {
  6300  	azure.FutureAPI
  6301  	// Result returns the result of the asynchronous operation.
  6302  	// If the operation has not completed it will return an error.
  6303  	Result func(MongoDBResourcesClient) (MongoDBCollectionGetResults, error)
  6304  }
  6305  
  6306  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6307  func (future *MongoDBResourcesCreateUpdateMongoDBCollectionFuture) UnmarshalJSON(body []byte) error {
  6308  	var azFuture azure.Future
  6309  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6310  		return err
  6311  	}
  6312  	future.FutureAPI = &azFuture
  6313  	future.Result = future.result
  6314  	return nil
  6315  }
  6316  
  6317  // result is the default implementation for MongoDBResourcesCreateUpdateMongoDBCollectionFuture.Result.
  6318  func (future *MongoDBResourcesCreateUpdateMongoDBCollectionFuture) result(client MongoDBResourcesClient) (mdcgr MongoDBCollectionGetResults, err error) {
  6319  	var done bool
  6320  	done, err = future.DoneWithContext(context.Background(), client)
  6321  	if err != nil {
  6322  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesCreateUpdateMongoDBCollectionFuture", "Result", future.Response(), "Polling failure")
  6323  		return
  6324  	}
  6325  	if !done {
  6326  		mdcgr.Response.Response = future.Response()
  6327  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesCreateUpdateMongoDBCollectionFuture")
  6328  		return
  6329  	}
  6330  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6331  	if mdcgr.Response.Response, err = future.GetResult(sender); err == nil && mdcgr.Response.Response.StatusCode != http.StatusNoContent {
  6332  		mdcgr, err = client.CreateUpdateMongoDBCollectionResponder(mdcgr.Response.Response)
  6333  		if err != nil {
  6334  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesCreateUpdateMongoDBCollectionFuture", "Result", mdcgr.Response.Response, "Failure responding to request")
  6335  		}
  6336  	}
  6337  	return
  6338  }
  6339  
  6340  // MongoDBResourcesCreateUpdateMongoDBDatabaseFuture an abstraction for monitoring and retrieving the
  6341  // results of a long-running operation.
  6342  type MongoDBResourcesCreateUpdateMongoDBDatabaseFuture struct {
  6343  	azure.FutureAPI
  6344  	// Result returns the result of the asynchronous operation.
  6345  	// If the operation has not completed it will return an error.
  6346  	Result func(MongoDBResourcesClient) (MongoDBDatabaseGetResults, error)
  6347  }
  6348  
  6349  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6350  func (future *MongoDBResourcesCreateUpdateMongoDBDatabaseFuture) UnmarshalJSON(body []byte) error {
  6351  	var azFuture azure.Future
  6352  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6353  		return err
  6354  	}
  6355  	future.FutureAPI = &azFuture
  6356  	future.Result = future.result
  6357  	return nil
  6358  }
  6359  
  6360  // result is the default implementation for MongoDBResourcesCreateUpdateMongoDBDatabaseFuture.Result.
  6361  func (future *MongoDBResourcesCreateUpdateMongoDBDatabaseFuture) result(client MongoDBResourcesClient) (mddgr MongoDBDatabaseGetResults, err error) {
  6362  	var done bool
  6363  	done, err = future.DoneWithContext(context.Background(), client)
  6364  	if err != nil {
  6365  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesCreateUpdateMongoDBDatabaseFuture", "Result", future.Response(), "Polling failure")
  6366  		return
  6367  	}
  6368  	if !done {
  6369  		mddgr.Response.Response = future.Response()
  6370  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesCreateUpdateMongoDBDatabaseFuture")
  6371  		return
  6372  	}
  6373  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6374  	if mddgr.Response.Response, err = future.GetResult(sender); err == nil && mddgr.Response.Response.StatusCode != http.StatusNoContent {
  6375  		mddgr, err = client.CreateUpdateMongoDBDatabaseResponder(mddgr.Response.Response)
  6376  		if err != nil {
  6377  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesCreateUpdateMongoDBDatabaseFuture", "Result", mddgr.Response.Response, "Failure responding to request")
  6378  		}
  6379  	}
  6380  	return
  6381  }
  6382  
  6383  // MongoDBResourcesDeleteMongoDBCollectionFuture an abstraction for monitoring and retrieving the results
  6384  // of a long-running operation.
  6385  type MongoDBResourcesDeleteMongoDBCollectionFuture struct {
  6386  	azure.FutureAPI
  6387  	// Result returns the result of the asynchronous operation.
  6388  	// If the operation has not completed it will return an error.
  6389  	Result func(MongoDBResourcesClient) (autorest.Response, error)
  6390  }
  6391  
  6392  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6393  func (future *MongoDBResourcesDeleteMongoDBCollectionFuture) UnmarshalJSON(body []byte) error {
  6394  	var azFuture azure.Future
  6395  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6396  		return err
  6397  	}
  6398  	future.FutureAPI = &azFuture
  6399  	future.Result = future.result
  6400  	return nil
  6401  }
  6402  
  6403  // result is the default implementation for MongoDBResourcesDeleteMongoDBCollectionFuture.Result.
  6404  func (future *MongoDBResourcesDeleteMongoDBCollectionFuture) result(client MongoDBResourcesClient) (ar autorest.Response, err error) {
  6405  	var done bool
  6406  	done, err = future.DoneWithContext(context.Background(), client)
  6407  	if err != nil {
  6408  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesDeleteMongoDBCollectionFuture", "Result", future.Response(), "Polling failure")
  6409  		return
  6410  	}
  6411  	if !done {
  6412  		ar.Response = future.Response()
  6413  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesDeleteMongoDBCollectionFuture")
  6414  		return
  6415  	}
  6416  	ar.Response = future.Response()
  6417  	return
  6418  }
  6419  
  6420  // MongoDBResourcesDeleteMongoDBDatabaseFuture an abstraction for monitoring and retrieving the results of
  6421  // a long-running operation.
  6422  type MongoDBResourcesDeleteMongoDBDatabaseFuture struct {
  6423  	azure.FutureAPI
  6424  	// Result returns the result of the asynchronous operation.
  6425  	// If the operation has not completed it will return an error.
  6426  	Result func(MongoDBResourcesClient) (autorest.Response, error)
  6427  }
  6428  
  6429  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6430  func (future *MongoDBResourcesDeleteMongoDBDatabaseFuture) UnmarshalJSON(body []byte) error {
  6431  	var azFuture azure.Future
  6432  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6433  		return err
  6434  	}
  6435  	future.FutureAPI = &azFuture
  6436  	future.Result = future.result
  6437  	return nil
  6438  }
  6439  
  6440  // result is the default implementation for MongoDBResourcesDeleteMongoDBDatabaseFuture.Result.
  6441  func (future *MongoDBResourcesDeleteMongoDBDatabaseFuture) result(client MongoDBResourcesClient) (ar autorest.Response, err error) {
  6442  	var done bool
  6443  	done, err = future.DoneWithContext(context.Background(), client)
  6444  	if err != nil {
  6445  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesDeleteMongoDBDatabaseFuture", "Result", future.Response(), "Polling failure")
  6446  		return
  6447  	}
  6448  	if !done {
  6449  		ar.Response = future.Response()
  6450  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesDeleteMongoDBDatabaseFuture")
  6451  		return
  6452  	}
  6453  	ar.Response = future.Response()
  6454  	return
  6455  }
  6456  
  6457  // MongoDBResourcesMigrateMongoDBCollectionToAutoscaleFuture an abstraction for monitoring and retrieving
  6458  // the results of a long-running operation.
  6459  type MongoDBResourcesMigrateMongoDBCollectionToAutoscaleFuture struct {
  6460  	azure.FutureAPI
  6461  	// Result returns the result of the asynchronous operation.
  6462  	// If the operation has not completed it will return an error.
  6463  	Result func(MongoDBResourcesClient) (ThroughputSettingsGetResults, error)
  6464  }
  6465  
  6466  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6467  func (future *MongoDBResourcesMigrateMongoDBCollectionToAutoscaleFuture) UnmarshalJSON(body []byte) error {
  6468  	var azFuture azure.Future
  6469  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6470  		return err
  6471  	}
  6472  	future.FutureAPI = &azFuture
  6473  	future.Result = future.result
  6474  	return nil
  6475  }
  6476  
  6477  // result is the default implementation for MongoDBResourcesMigrateMongoDBCollectionToAutoscaleFuture.Result.
  6478  func (future *MongoDBResourcesMigrateMongoDBCollectionToAutoscaleFuture) result(client MongoDBResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  6479  	var done bool
  6480  	done, err = future.DoneWithContext(context.Background(), client)
  6481  	if err != nil {
  6482  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesMigrateMongoDBCollectionToAutoscaleFuture", "Result", future.Response(), "Polling failure")
  6483  		return
  6484  	}
  6485  	if !done {
  6486  		tsgr.Response.Response = future.Response()
  6487  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesMigrateMongoDBCollectionToAutoscaleFuture")
  6488  		return
  6489  	}
  6490  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6491  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  6492  		tsgr, err = client.MigrateMongoDBCollectionToAutoscaleResponder(tsgr.Response.Response)
  6493  		if err != nil {
  6494  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesMigrateMongoDBCollectionToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  6495  		}
  6496  	}
  6497  	return
  6498  }
  6499  
  6500  // MongoDBResourcesMigrateMongoDBCollectionToManualThroughputFuture an abstraction for monitoring and
  6501  // retrieving the results of a long-running operation.
  6502  type MongoDBResourcesMigrateMongoDBCollectionToManualThroughputFuture struct {
  6503  	azure.FutureAPI
  6504  	// Result returns the result of the asynchronous operation.
  6505  	// If the operation has not completed it will return an error.
  6506  	Result func(MongoDBResourcesClient) (ThroughputSettingsGetResults, error)
  6507  }
  6508  
  6509  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6510  func (future *MongoDBResourcesMigrateMongoDBCollectionToManualThroughputFuture) UnmarshalJSON(body []byte) error {
  6511  	var azFuture azure.Future
  6512  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6513  		return err
  6514  	}
  6515  	future.FutureAPI = &azFuture
  6516  	future.Result = future.result
  6517  	return nil
  6518  }
  6519  
  6520  // result is the default implementation for MongoDBResourcesMigrateMongoDBCollectionToManualThroughputFuture.Result.
  6521  func (future *MongoDBResourcesMigrateMongoDBCollectionToManualThroughputFuture) result(client MongoDBResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  6522  	var done bool
  6523  	done, err = future.DoneWithContext(context.Background(), client)
  6524  	if err != nil {
  6525  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesMigrateMongoDBCollectionToManualThroughputFuture", "Result", future.Response(), "Polling failure")
  6526  		return
  6527  	}
  6528  	if !done {
  6529  		tsgr.Response.Response = future.Response()
  6530  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesMigrateMongoDBCollectionToManualThroughputFuture")
  6531  		return
  6532  	}
  6533  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6534  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  6535  		tsgr, err = client.MigrateMongoDBCollectionToManualThroughputResponder(tsgr.Response.Response)
  6536  		if err != nil {
  6537  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesMigrateMongoDBCollectionToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  6538  		}
  6539  	}
  6540  	return
  6541  }
  6542  
  6543  // MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleFuture an abstraction for monitoring and retrieving the
  6544  // results of a long-running operation.
  6545  type MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleFuture struct {
  6546  	azure.FutureAPI
  6547  	// Result returns the result of the asynchronous operation.
  6548  	// If the operation has not completed it will return an error.
  6549  	Result func(MongoDBResourcesClient) (ThroughputSettingsGetResults, error)
  6550  }
  6551  
  6552  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6553  func (future *MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleFuture) UnmarshalJSON(body []byte) error {
  6554  	var azFuture azure.Future
  6555  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6556  		return err
  6557  	}
  6558  	future.FutureAPI = &azFuture
  6559  	future.Result = future.result
  6560  	return nil
  6561  }
  6562  
  6563  // result is the default implementation for MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleFuture.Result.
  6564  func (future *MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleFuture) result(client MongoDBResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  6565  	var done bool
  6566  	done, err = future.DoneWithContext(context.Background(), client)
  6567  	if err != nil {
  6568  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleFuture", "Result", future.Response(), "Polling failure")
  6569  		return
  6570  	}
  6571  	if !done {
  6572  		tsgr.Response.Response = future.Response()
  6573  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleFuture")
  6574  		return
  6575  	}
  6576  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6577  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  6578  		tsgr, err = client.MigrateMongoDBDatabaseToAutoscaleResponder(tsgr.Response.Response)
  6579  		if err != nil {
  6580  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  6581  		}
  6582  	}
  6583  	return
  6584  }
  6585  
  6586  // MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputFuture an abstraction for monitoring and
  6587  // retrieving the results of a long-running operation.
  6588  type MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputFuture struct {
  6589  	azure.FutureAPI
  6590  	// Result returns the result of the asynchronous operation.
  6591  	// If the operation has not completed it will return an error.
  6592  	Result func(MongoDBResourcesClient) (ThroughputSettingsGetResults, error)
  6593  }
  6594  
  6595  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6596  func (future *MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputFuture) UnmarshalJSON(body []byte) error {
  6597  	var azFuture azure.Future
  6598  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6599  		return err
  6600  	}
  6601  	future.FutureAPI = &azFuture
  6602  	future.Result = future.result
  6603  	return nil
  6604  }
  6605  
  6606  // result is the default implementation for MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputFuture.Result.
  6607  func (future *MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputFuture) result(client MongoDBResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  6608  	var done bool
  6609  	done, err = future.DoneWithContext(context.Background(), client)
  6610  	if err != nil {
  6611  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputFuture", "Result", future.Response(), "Polling failure")
  6612  		return
  6613  	}
  6614  	if !done {
  6615  		tsgr.Response.Response = future.Response()
  6616  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputFuture")
  6617  		return
  6618  	}
  6619  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6620  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  6621  		tsgr, err = client.MigrateMongoDBDatabaseToManualThroughputResponder(tsgr.Response.Response)
  6622  		if err != nil {
  6623  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  6624  		}
  6625  	}
  6626  	return
  6627  }
  6628  
  6629  // MongoDBResourcesUpdateMongoDBCollectionThroughputFuture an abstraction for monitoring and retrieving the
  6630  // results of a long-running operation.
  6631  type MongoDBResourcesUpdateMongoDBCollectionThroughputFuture struct {
  6632  	azure.FutureAPI
  6633  	// Result returns the result of the asynchronous operation.
  6634  	// If the operation has not completed it will return an error.
  6635  	Result func(MongoDBResourcesClient) (ThroughputSettingsGetResults, error)
  6636  }
  6637  
  6638  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6639  func (future *MongoDBResourcesUpdateMongoDBCollectionThroughputFuture) UnmarshalJSON(body []byte) error {
  6640  	var azFuture azure.Future
  6641  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6642  		return err
  6643  	}
  6644  	future.FutureAPI = &azFuture
  6645  	future.Result = future.result
  6646  	return nil
  6647  }
  6648  
  6649  // result is the default implementation for MongoDBResourcesUpdateMongoDBCollectionThroughputFuture.Result.
  6650  func (future *MongoDBResourcesUpdateMongoDBCollectionThroughputFuture) result(client MongoDBResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  6651  	var done bool
  6652  	done, err = future.DoneWithContext(context.Background(), client)
  6653  	if err != nil {
  6654  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesUpdateMongoDBCollectionThroughputFuture", "Result", future.Response(), "Polling failure")
  6655  		return
  6656  	}
  6657  	if !done {
  6658  		tsgr.Response.Response = future.Response()
  6659  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesUpdateMongoDBCollectionThroughputFuture")
  6660  		return
  6661  	}
  6662  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6663  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  6664  		tsgr, err = client.UpdateMongoDBCollectionThroughputResponder(tsgr.Response.Response)
  6665  		if err != nil {
  6666  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesUpdateMongoDBCollectionThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  6667  		}
  6668  	}
  6669  	return
  6670  }
  6671  
  6672  // MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture an abstraction for monitoring and retrieving the
  6673  // results of a long-running operation.
  6674  type MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture struct {
  6675  	azure.FutureAPI
  6676  	// Result returns the result of the asynchronous operation.
  6677  	// If the operation has not completed it will return an error.
  6678  	Result func(MongoDBResourcesClient) (ThroughputSettingsGetResults, error)
  6679  }
  6680  
  6681  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6682  func (future *MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture) UnmarshalJSON(body []byte) error {
  6683  	var azFuture azure.Future
  6684  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6685  		return err
  6686  	}
  6687  	future.FutureAPI = &azFuture
  6688  	future.Result = future.result
  6689  	return nil
  6690  }
  6691  
  6692  // result is the default implementation for MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture.Result.
  6693  func (future *MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture) result(client MongoDBResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  6694  	var done bool
  6695  	done, err = future.DoneWithContext(context.Background(), client)
  6696  	if err != nil {
  6697  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture", "Result", future.Response(), "Polling failure")
  6698  		return
  6699  	}
  6700  	if !done {
  6701  		tsgr.Response.Response = future.Response()
  6702  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture")
  6703  		return
  6704  	}
  6705  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6706  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  6707  		tsgr, err = client.UpdateMongoDBDatabaseThroughputResponder(tsgr.Response.Response)
  6708  		if err != nil {
  6709  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  6710  		}
  6711  	}
  6712  	return
  6713  }
  6714  
  6715  // MongoIndex cosmos DB MongoDB collection index key
  6716  type MongoIndex struct {
  6717  	// Key - Cosmos DB MongoDB collection index keys
  6718  	Key *MongoIndexKeys `json:"key,omitempty"`
  6719  	// Options - Cosmos DB MongoDB collection index key options
  6720  	Options *MongoIndexOptions `json:"options,omitempty"`
  6721  }
  6722  
  6723  // MongoIndexKeys cosmos DB MongoDB collection resource object
  6724  type MongoIndexKeys struct {
  6725  	// Keys - List of keys for each MongoDB collection in the Azure Cosmos DB service
  6726  	Keys *[]string `json:"keys,omitempty"`
  6727  }
  6728  
  6729  // MongoIndexOptions cosmos DB MongoDB collection index options
  6730  type MongoIndexOptions struct {
  6731  	// ExpireAfterSeconds - Expire after seconds
  6732  	ExpireAfterSeconds *int32 `json:"expireAfterSeconds,omitempty"`
  6733  	// Unique - Is unique or not
  6734  	Unique *bool `json:"unique,omitempty"`
  6735  }
  6736  
  6737  // NotebookWorkspace a notebook workspace resource
  6738  type NotebookWorkspace struct {
  6739  	autorest.Response `json:"-"`
  6740  	// NotebookWorkspaceProperties - Resource properties.
  6741  	*NotebookWorkspaceProperties `json:"properties,omitempty"`
  6742  	// ID - READ-ONLY; The unique resource identifier of the database account.
  6743  	ID *string `json:"id,omitempty"`
  6744  	// Name - READ-ONLY; The name of the database account.
  6745  	Name *string `json:"name,omitempty"`
  6746  	// Type - READ-ONLY; The type of Azure resource.
  6747  	Type *string `json:"type,omitempty"`
  6748  }
  6749  
  6750  // MarshalJSON is the custom marshaler for NotebookWorkspace.
  6751  func (nw NotebookWorkspace) MarshalJSON() ([]byte, error) {
  6752  	objectMap := make(map[string]interface{})
  6753  	if nw.NotebookWorkspaceProperties != nil {
  6754  		objectMap["properties"] = nw.NotebookWorkspaceProperties
  6755  	}
  6756  	return json.Marshal(objectMap)
  6757  }
  6758  
  6759  // UnmarshalJSON is the custom unmarshaler for NotebookWorkspace struct.
  6760  func (nw *NotebookWorkspace) UnmarshalJSON(body []byte) error {
  6761  	var m map[string]*json.RawMessage
  6762  	err := json.Unmarshal(body, &m)
  6763  	if err != nil {
  6764  		return err
  6765  	}
  6766  	for k, v := range m {
  6767  		switch k {
  6768  		case "properties":
  6769  			if v != nil {
  6770  				var notebookWorkspaceProperties NotebookWorkspaceProperties
  6771  				err = json.Unmarshal(*v, &notebookWorkspaceProperties)
  6772  				if err != nil {
  6773  					return err
  6774  				}
  6775  				nw.NotebookWorkspaceProperties = &notebookWorkspaceProperties
  6776  			}
  6777  		case "id":
  6778  			if v != nil {
  6779  				var ID string
  6780  				err = json.Unmarshal(*v, &ID)
  6781  				if err != nil {
  6782  					return err
  6783  				}
  6784  				nw.ID = &ID
  6785  			}
  6786  		case "name":
  6787  			if v != nil {
  6788  				var name string
  6789  				err = json.Unmarshal(*v, &name)
  6790  				if err != nil {
  6791  					return err
  6792  				}
  6793  				nw.Name = &name
  6794  			}
  6795  		case "type":
  6796  			if v != nil {
  6797  				var typeVar string
  6798  				err = json.Unmarshal(*v, &typeVar)
  6799  				if err != nil {
  6800  					return err
  6801  				}
  6802  				nw.Type = &typeVar
  6803  			}
  6804  		}
  6805  	}
  6806  
  6807  	return nil
  6808  }
  6809  
  6810  // NotebookWorkspaceConnectionInfoResult the connection info for the given notebook workspace
  6811  type NotebookWorkspaceConnectionInfoResult struct {
  6812  	autorest.Response `json:"-"`
  6813  	// AuthToken - READ-ONLY; Specifies auth token used for connecting to Notebook server (uses token-based auth).
  6814  	AuthToken *string `json:"authToken,omitempty"`
  6815  	// NotebookServerEndpoint - READ-ONLY; Specifies the endpoint of Notebook server.
  6816  	NotebookServerEndpoint *string `json:"notebookServerEndpoint,omitempty"`
  6817  }
  6818  
  6819  // MarshalJSON is the custom marshaler for NotebookWorkspaceConnectionInfoResult.
  6820  func (nwcir NotebookWorkspaceConnectionInfoResult) MarshalJSON() ([]byte, error) {
  6821  	objectMap := make(map[string]interface{})
  6822  	return json.Marshal(objectMap)
  6823  }
  6824  
  6825  // NotebookWorkspaceCreateUpdateParameters parameters to create a notebook workspace resource
  6826  type NotebookWorkspaceCreateUpdateParameters struct {
  6827  	// ID - READ-ONLY; The unique resource identifier of the database account.
  6828  	ID *string `json:"id,omitempty"`
  6829  	// Name - READ-ONLY; The name of the database account.
  6830  	Name *string `json:"name,omitempty"`
  6831  	// Type - READ-ONLY; The type of Azure resource.
  6832  	Type *string `json:"type,omitempty"`
  6833  }
  6834  
  6835  // MarshalJSON is the custom marshaler for NotebookWorkspaceCreateUpdateParameters.
  6836  func (nwcup NotebookWorkspaceCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  6837  	objectMap := make(map[string]interface{})
  6838  	return json.Marshal(objectMap)
  6839  }
  6840  
  6841  // NotebookWorkspaceListResult a list of notebook workspace resources
  6842  type NotebookWorkspaceListResult struct {
  6843  	autorest.Response `json:"-"`
  6844  	// Value - Array of notebook workspace resources
  6845  	Value *[]NotebookWorkspace `json:"value,omitempty"`
  6846  }
  6847  
  6848  // NotebookWorkspaceProperties properties of a notebook workspace resource.
  6849  type NotebookWorkspaceProperties struct {
  6850  	// NotebookServerEndpoint - READ-ONLY; Specifies the endpoint of Notebook server.
  6851  	NotebookServerEndpoint *string `json:"notebookServerEndpoint,omitempty"`
  6852  	// Status - READ-ONLY; Status of the notebook workspace. Possible values are: Creating, Online, Deleting, Failed, Updating.
  6853  	Status *string `json:"status,omitempty"`
  6854  }
  6855  
  6856  // MarshalJSON is the custom marshaler for NotebookWorkspaceProperties.
  6857  func (nwp NotebookWorkspaceProperties) MarshalJSON() ([]byte, error) {
  6858  	objectMap := make(map[string]interface{})
  6859  	return json.Marshal(objectMap)
  6860  }
  6861  
  6862  // NotebookWorkspacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
  6863  // long-running operation.
  6864  type NotebookWorkspacesCreateOrUpdateFuture struct {
  6865  	azure.FutureAPI
  6866  	// Result returns the result of the asynchronous operation.
  6867  	// If the operation has not completed it will return an error.
  6868  	Result func(NotebookWorkspacesClient) (NotebookWorkspace, error)
  6869  }
  6870  
  6871  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6872  func (future *NotebookWorkspacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  6873  	var azFuture azure.Future
  6874  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6875  		return err
  6876  	}
  6877  	future.FutureAPI = &azFuture
  6878  	future.Result = future.result
  6879  	return nil
  6880  }
  6881  
  6882  // result is the default implementation for NotebookWorkspacesCreateOrUpdateFuture.Result.
  6883  func (future *NotebookWorkspacesCreateOrUpdateFuture) result(client NotebookWorkspacesClient) (nw NotebookWorkspace, err error) {
  6884  	var done bool
  6885  	done, err = future.DoneWithContext(context.Background(), client)
  6886  	if err != nil {
  6887  		err = autorest.NewErrorWithError(err, "documentdb.NotebookWorkspacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  6888  		return
  6889  	}
  6890  	if !done {
  6891  		nw.Response.Response = future.Response()
  6892  		err = azure.NewAsyncOpIncompleteError("documentdb.NotebookWorkspacesCreateOrUpdateFuture")
  6893  		return
  6894  	}
  6895  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6896  	if nw.Response.Response, err = future.GetResult(sender); err == nil && nw.Response.Response.StatusCode != http.StatusNoContent {
  6897  		nw, err = client.CreateOrUpdateResponder(nw.Response.Response)
  6898  		if err != nil {
  6899  			err = autorest.NewErrorWithError(err, "documentdb.NotebookWorkspacesCreateOrUpdateFuture", "Result", nw.Response.Response, "Failure responding to request")
  6900  		}
  6901  	}
  6902  	return
  6903  }
  6904  
  6905  // NotebookWorkspacesDeleteFuture an abstraction for monitoring and retrieving the results of a
  6906  // long-running operation.
  6907  type NotebookWorkspacesDeleteFuture struct {
  6908  	azure.FutureAPI
  6909  	// Result returns the result of the asynchronous operation.
  6910  	// If the operation has not completed it will return an error.
  6911  	Result func(NotebookWorkspacesClient) (autorest.Response, error)
  6912  }
  6913  
  6914  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6915  func (future *NotebookWorkspacesDeleteFuture) UnmarshalJSON(body []byte) error {
  6916  	var azFuture azure.Future
  6917  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6918  		return err
  6919  	}
  6920  	future.FutureAPI = &azFuture
  6921  	future.Result = future.result
  6922  	return nil
  6923  }
  6924  
  6925  // result is the default implementation for NotebookWorkspacesDeleteFuture.Result.
  6926  func (future *NotebookWorkspacesDeleteFuture) result(client NotebookWorkspacesClient) (ar autorest.Response, err error) {
  6927  	var done bool
  6928  	done, err = future.DoneWithContext(context.Background(), client)
  6929  	if err != nil {
  6930  		err = autorest.NewErrorWithError(err, "documentdb.NotebookWorkspacesDeleteFuture", "Result", future.Response(), "Polling failure")
  6931  		return
  6932  	}
  6933  	if !done {
  6934  		ar.Response = future.Response()
  6935  		err = azure.NewAsyncOpIncompleteError("documentdb.NotebookWorkspacesDeleteFuture")
  6936  		return
  6937  	}
  6938  	ar.Response = future.Response()
  6939  	return
  6940  }
  6941  
  6942  // NotebookWorkspacesRegenerateAuthTokenFuture an abstraction for monitoring and retrieving the results of
  6943  // a long-running operation.
  6944  type NotebookWorkspacesRegenerateAuthTokenFuture struct {
  6945  	azure.FutureAPI
  6946  	// Result returns the result of the asynchronous operation.
  6947  	// If the operation has not completed it will return an error.
  6948  	Result func(NotebookWorkspacesClient) (autorest.Response, error)
  6949  }
  6950  
  6951  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6952  func (future *NotebookWorkspacesRegenerateAuthTokenFuture) UnmarshalJSON(body []byte) error {
  6953  	var azFuture azure.Future
  6954  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6955  		return err
  6956  	}
  6957  	future.FutureAPI = &azFuture
  6958  	future.Result = future.result
  6959  	return nil
  6960  }
  6961  
  6962  // result is the default implementation for NotebookWorkspacesRegenerateAuthTokenFuture.Result.
  6963  func (future *NotebookWorkspacesRegenerateAuthTokenFuture) result(client NotebookWorkspacesClient) (ar autorest.Response, err error) {
  6964  	var done bool
  6965  	done, err = future.DoneWithContext(context.Background(), client)
  6966  	if err != nil {
  6967  		err = autorest.NewErrorWithError(err, "documentdb.NotebookWorkspacesRegenerateAuthTokenFuture", "Result", future.Response(), "Polling failure")
  6968  		return
  6969  	}
  6970  	if !done {
  6971  		ar.Response = future.Response()
  6972  		err = azure.NewAsyncOpIncompleteError("documentdb.NotebookWorkspacesRegenerateAuthTokenFuture")
  6973  		return
  6974  	}
  6975  	ar.Response = future.Response()
  6976  	return
  6977  }
  6978  
  6979  // NotebookWorkspacesStartFuture an abstraction for monitoring and retrieving the results of a long-running
  6980  // operation.
  6981  type NotebookWorkspacesStartFuture struct {
  6982  	azure.FutureAPI
  6983  	// Result returns the result of the asynchronous operation.
  6984  	// If the operation has not completed it will return an error.
  6985  	Result func(NotebookWorkspacesClient) (autorest.Response, error)
  6986  }
  6987  
  6988  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6989  func (future *NotebookWorkspacesStartFuture) UnmarshalJSON(body []byte) error {
  6990  	var azFuture azure.Future
  6991  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6992  		return err
  6993  	}
  6994  	future.FutureAPI = &azFuture
  6995  	future.Result = future.result
  6996  	return nil
  6997  }
  6998  
  6999  // result is the default implementation for NotebookWorkspacesStartFuture.Result.
  7000  func (future *NotebookWorkspacesStartFuture) result(client NotebookWorkspacesClient) (ar autorest.Response, err error) {
  7001  	var done bool
  7002  	done, err = future.DoneWithContext(context.Background(), client)
  7003  	if err != nil {
  7004  		err = autorest.NewErrorWithError(err, "documentdb.NotebookWorkspacesStartFuture", "Result", future.Response(), "Polling failure")
  7005  		return
  7006  	}
  7007  	if !done {
  7008  		ar.Response = future.Response()
  7009  		err = azure.NewAsyncOpIncompleteError("documentdb.NotebookWorkspacesStartFuture")
  7010  		return
  7011  	}
  7012  	ar.Response = future.Response()
  7013  	return
  7014  }
  7015  
  7016  // Operation REST API operation
  7017  type Operation struct {
  7018  	// Name - Operation name: {provider}/{resource}/{operation}
  7019  	Name *string `json:"name,omitempty"`
  7020  	// Display - The object that represents the operation.
  7021  	Display *OperationDisplay `json:"display,omitempty"`
  7022  }
  7023  
  7024  // OperationDisplay the object that represents the operation.
  7025  type OperationDisplay struct {
  7026  	// Provider - Service provider: Microsoft.ResourceProvider
  7027  	Provider *string `json:"Provider,omitempty"`
  7028  	// Resource - Resource on which the operation is performed: Profile, endpoint, etc.
  7029  	Resource *string `json:"Resource,omitempty"`
  7030  	// Operation - Operation type: Read, write, delete, etc.
  7031  	Operation *string `json:"Operation,omitempty"`
  7032  	// Description - Description of operation
  7033  	Description *string `json:"Description,omitempty"`
  7034  }
  7035  
  7036  // OperationListResult result of the request to list Resource Provider operations. It contains a list of
  7037  // operations and a URL link to get the next set of results.
  7038  type OperationListResult struct {
  7039  	autorest.Response `json:"-"`
  7040  	// Value - List of operations supported by the Resource Provider.
  7041  	Value *[]Operation `json:"value,omitempty"`
  7042  	// NextLink - URL to get the next set of operation list results if there are any.
  7043  	NextLink *string `json:"nextLink,omitempty"`
  7044  }
  7045  
  7046  // OperationListResultIterator provides access to a complete listing of Operation values.
  7047  type OperationListResultIterator struct {
  7048  	i    int
  7049  	page OperationListResultPage
  7050  }
  7051  
  7052  // NextWithContext advances to the next value.  If there was an error making
  7053  // the request the iterator does not advance and the error is returned.
  7054  func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
  7055  	if tracing.IsEnabled() {
  7056  		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
  7057  		defer func() {
  7058  			sc := -1
  7059  			if iter.Response().Response.Response != nil {
  7060  				sc = iter.Response().Response.Response.StatusCode
  7061  			}
  7062  			tracing.EndSpan(ctx, sc, err)
  7063  		}()
  7064  	}
  7065  	iter.i++
  7066  	if iter.i < len(iter.page.Values()) {
  7067  		return nil
  7068  	}
  7069  	err = iter.page.NextWithContext(ctx)
  7070  	if err != nil {
  7071  		iter.i--
  7072  		return err
  7073  	}
  7074  	iter.i = 0
  7075  	return nil
  7076  }
  7077  
  7078  // Next advances to the next value.  If there was an error making
  7079  // the request the iterator does not advance and the error is returned.
  7080  // Deprecated: Use NextWithContext() instead.
  7081  func (iter *OperationListResultIterator) Next() error {
  7082  	return iter.NextWithContext(context.Background())
  7083  }
  7084  
  7085  // NotDone returns true if the enumeration should be started or is not yet complete.
  7086  func (iter OperationListResultIterator) NotDone() bool {
  7087  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  7088  }
  7089  
  7090  // Response returns the raw server response from the last page request.
  7091  func (iter OperationListResultIterator) Response() OperationListResult {
  7092  	return iter.page.Response()
  7093  }
  7094  
  7095  // Value returns the current value or a zero-initialized value if the
  7096  // iterator has advanced beyond the end of the collection.
  7097  func (iter OperationListResultIterator) Value() Operation {
  7098  	if !iter.page.NotDone() {
  7099  		return Operation{}
  7100  	}
  7101  	return iter.page.Values()[iter.i]
  7102  }
  7103  
  7104  // Creates a new instance of the OperationListResultIterator type.
  7105  func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
  7106  	return OperationListResultIterator{page: page}
  7107  }
  7108  
  7109  // IsEmpty returns true if the ListResult contains no values.
  7110  func (olr OperationListResult) IsEmpty() bool {
  7111  	return olr.Value == nil || len(*olr.Value) == 0
  7112  }
  7113  
  7114  // hasNextLink returns true if the NextLink is not empty.
  7115  func (olr OperationListResult) hasNextLink() bool {
  7116  	return olr.NextLink != nil && len(*olr.NextLink) != 0
  7117  }
  7118  
  7119  // operationListResultPreparer prepares a request to retrieve the next set of results.
  7120  // It returns nil if no more results exist.
  7121  func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
  7122  	if !olr.hasNextLink() {
  7123  		return nil, nil
  7124  	}
  7125  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  7126  		autorest.AsJSON(),
  7127  		autorest.AsGet(),
  7128  		autorest.WithBaseURL(to.String(olr.NextLink)))
  7129  }
  7130  
  7131  // OperationListResultPage contains a page of Operation values.
  7132  type OperationListResultPage struct {
  7133  	fn  func(context.Context, OperationListResult) (OperationListResult, error)
  7134  	olr OperationListResult
  7135  }
  7136  
  7137  // NextWithContext advances to the next page of values.  If there was an error making
  7138  // the request the page does not advance and the error is returned.
  7139  func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
  7140  	if tracing.IsEnabled() {
  7141  		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
  7142  		defer func() {
  7143  			sc := -1
  7144  			if page.Response().Response.Response != nil {
  7145  				sc = page.Response().Response.Response.StatusCode
  7146  			}
  7147  			tracing.EndSpan(ctx, sc, err)
  7148  		}()
  7149  	}
  7150  	for {
  7151  		next, err := page.fn(ctx, page.olr)
  7152  		if err != nil {
  7153  			return err
  7154  		}
  7155  		page.olr = next
  7156  		if !next.hasNextLink() || !next.IsEmpty() {
  7157  			break
  7158  		}
  7159  	}
  7160  	return nil
  7161  }
  7162  
  7163  // Next advances to the next page of values.  If there was an error making
  7164  // the request the page does not advance and the error is returned.
  7165  // Deprecated: Use NextWithContext() instead.
  7166  func (page *OperationListResultPage) Next() error {
  7167  	return page.NextWithContext(context.Background())
  7168  }
  7169  
  7170  // NotDone returns true if the page enumeration should be started or is not yet complete.
  7171  func (page OperationListResultPage) NotDone() bool {
  7172  	return !page.olr.IsEmpty()
  7173  }
  7174  
  7175  // Response returns the raw server response from the last page request.
  7176  func (page OperationListResultPage) Response() OperationListResult {
  7177  	return page.olr
  7178  }
  7179  
  7180  // Values returns the slice of values for the current page or nil if there are no values.
  7181  func (page OperationListResultPage) Values() []Operation {
  7182  	if page.olr.IsEmpty() {
  7183  		return nil
  7184  	}
  7185  	return *page.olr.Value
  7186  }
  7187  
  7188  // Creates a new instance of the OperationListResultPage type.
  7189  func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
  7190  	return OperationListResultPage{
  7191  		fn:  getNextPage,
  7192  		olr: cur,
  7193  	}
  7194  }
  7195  
  7196  // OptionsResource cosmos DB options resource object
  7197  type OptionsResource struct {
  7198  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
  7199  	Throughput *int32 `json:"throughput,omitempty"`
  7200  	// AutoscaleSettings - Specifies the Autoscale settings.
  7201  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  7202  }
  7203  
  7204  // PartitionMetric the metric values for a single partition.
  7205  type PartitionMetric struct {
  7206  	// PartitionID - READ-ONLY; The partition id (GUID identifier) of the metric values.
  7207  	PartitionID *string `json:"partitionId,omitempty"`
  7208  	// PartitionKeyRangeID - READ-ONLY; The partition key range id (integer identifier) of the metric values.
  7209  	PartitionKeyRangeID *string `json:"partitionKeyRangeId,omitempty"`
  7210  	// StartTime - READ-ONLY; The start time for the metric (ISO-8601 format).
  7211  	StartTime *date.Time `json:"startTime,omitempty"`
  7212  	// EndTime - READ-ONLY; The end time for the metric (ISO-8601 format).
  7213  	EndTime *date.Time `json:"endTime,omitempty"`
  7214  	// TimeGrain - READ-ONLY; The time grain to be used to summarize the metric values.
  7215  	TimeGrain *string `json:"timeGrain,omitempty"`
  7216  	// Unit - The unit of the metric. Possible values include: 'UnitTypeCount', 'UnitTypeBytes', 'UnitTypeSeconds', 'UnitTypePercent', 'UnitTypeCountPerSecond', 'UnitTypeBytesPerSecond', 'UnitTypeMilliseconds'
  7217  	Unit UnitType `json:"unit,omitempty"`
  7218  	// Name - READ-ONLY; The name information for the metric.
  7219  	Name *MetricName `json:"name,omitempty"`
  7220  	// MetricValues - READ-ONLY; The metric values for the specified time window and timestep.
  7221  	MetricValues *[]MetricValue `json:"metricValues,omitempty"`
  7222  }
  7223  
  7224  // MarshalJSON is the custom marshaler for PartitionMetric.
  7225  func (pm PartitionMetric) MarshalJSON() ([]byte, error) {
  7226  	objectMap := make(map[string]interface{})
  7227  	if pm.Unit != "" {
  7228  		objectMap["unit"] = pm.Unit
  7229  	}
  7230  	return json.Marshal(objectMap)
  7231  }
  7232  
  7233  // PartitionMetricListResult the response to a list partition metrics request.
  7234  type PartitionMetricListResult struct {
  7235  	autorest.Response `json:"-"`
  7236  	// Value - READ-ONLY; The list of partition-level metrics for the account.
  7237  	Value *[]PartitionMetric `json:"value,omitempty"`
  7238  }
  7239  
  7240  // MarshalJSON is the custom marshaler for PartitionMetricListResult.
  7241  func (pmlr PartitionMetricListResult) MarshalJSON() ([]byte, error) {
  7242  	objectMap := make(map[string]interface{})
  7243  	return json.Marshal(objectMap)
  7244  }
  7245  
  7246  // PartitionUsage the partition level usage data for a usage request.
  7247  type PartitionUsage struct {
  7248  	// PartitionID - READ-ONLY; The partition id (GUID identifier) of the usages.
  7249  	PartitionID *string `json:"partitionId,omitempty"`
  7250  	// PartitionKeyRangeID - READ-ONLY; The partition key range id (integer identifier) of the usages.
  7251  	PartitionKeyRangeID *string `json:"partitionKeyRangeId,omitempty"`
  7252  	// Unit - The unit of the metric. Possible values include: 'UnitTypeCount', 'UnitTypeBytes', 'UnitTypeSeconds', 'UnitTypePercent', 'UnitTypeCountPerSecond', 'UnitTypeBytesPerSecond', 'UnitTypeMilliseconds'
  7253  	Unit UnitType `json:"unit,omitempty"`
  7254  	// Name - READ-ONLY; The name information for the metric.
  7255  	Name *MetricName `json:"name,omitempty"`
  7256  	// QuotaPeriod - READ-ONLY; The quota period used to summarize the usage values.
  7257  	QuotaPeriod *string `json:"quotaPeriod,omitempty"`
  7258  	// Limit - READ-ONLY; Maximum value for this metric
  7259  	Limit *int64 `json:"limit,omitempty"`
  7260  	// CurrentValue - READ-ONLY; Current value for this metric
  7261  	CurrentValue *int64 `json:"currentValue,omitempty"`
  7262  }
  7263  
  7264  // MarshalJSON is the custom marshaler for PartitionUsage.
  7265  func (pu PartitionUsage) MarshalJSON() ([]byte, error) {
  7266  	objectMap := make(map[string]interface{})
  7267  	if pu.Unit != "" {
  7268  		objectMap["unit"] = pu.Unit
  7269  	}
  7270  	return json.Marshal(objectMap)
  7271  }
  7272  
  7273  // PartitionUsagesResult the response to a list partition level usage request.
  7274  type PartitionUsagesResult struct {
  7275  	autorest.Response `json:"-"`
  7276  	// Value - READ-ONLY; The list of partition-level usages for the database. A usage is a point in time metric
  7277  	Value *[]PartitionUsage `json:"value,omitempty"`
  7278  }
  7279  
  7280  // MarshalJSON is the custom marshaler for PartitionUsagesResult.
  7281  func (pur PartitionUsagesResult) MarshalJSON() ([]byte, error) {
  7282  	objectMap := make(map[string]interface{})
  7283  	return json.Marshal(objectMap)
  7284  }
  7285  
  7286  // PercentileMetric percentile Metric data
  7287  type PercentileMetric struct {
  7288  	// StartTime - READ-ONLY; The start time for the metric (ISO-8601 format).
  7289  	StartTime *date.Time `json:"startTime,omitempty"`
  7290  	// EndTime - READ-ONLY; The end time for the metric (ISO-8601 format).
  7291  	EndTime *date.Time `json:"endTime,omitempty"`
  7292  	// TimeGrain - READ-ONLY; The time grain to be used to summarize the metric values.
  7293  	TimeGrain *string `json:"timeGrain,omitempty"`
  7294  	// Unit - The unit of the metric. Possible values include: 'UnitTypeCount', 'UnitTypeBytes', 'UnitTypeSeconds', 'UnitTypePercent', 'UnitTypeCountPerSecond', 'UnitTypeBytesPerSecond', 'UnitTypeMilliseconds'
  7295  	Unit UnitType `json:"unit,omitempty"`
  7296  	// Name - READ-ONLY; The name information for the metric.
  7297  	Name *MetricName `json:"name,omitempty"`
  7298  	// MetricValues - READ-ONLY; The percentile metric values for the specified time window and timestep.
  7299  	MetricValues *[]PercentileMetricValue `json:"metricValues,omitempty"`
  7300  }
  7301  
  7302  // MarshalJSON is the custom marshaler for PercentileMetric.
  7303  func (pm PercentileMetric) MarshalJSON() ([]byte, error) {
  7304  	objectMap := make(map[string]interface{})
  7305  	if pm.Unit != "" {
  7306  		objectMap["unit"] = pm.Unit
  7307  	}
  7308  	return json.Marshal(objectMap)
  7309  }
  7310  
  7311  // PercentileMetricListResult the response to a list percentile metrics request.
  7312  type PercentileMetricListResult struct {
  7313  	autorest.Response `json:"-"`
  7314  	// Value - READ-ONLY; The list of percentile metrics for the account.
  7315  	Value *[]PercentileMetric `json:"value,omitempty"`
  7316  }
  7317  
  7318  // MarshalJSON is the custom marshaler for PercentileMetricListResult.
  7319  func (pmlr PercentileMetricListResult) MarshalJSON() ([]byte, error) {
  7320  	objectMap := make(map[string]interface{})
  7321  	return json.Marshal(objectMap)
  7322  }
  7323  
  7324  // PercentileMetricValue represents percentile metrics values.
  7325  type PercentileMetricValue struct {
  7326  	// P10 - READ-ONLY; The 10th percentile value for the metric.
  7327  	P10 *float64 `json:"P10,omitempty"`
  7328  	// P25 - READ-ONLY; The 25th percentile value for the metric.
  7329  	P25 *float64 `json:"P25,omitempty"`
  7330  	// P50 - READ-ONLY; The 50th percentile value for the metric.
  7331  	P50 *float64 `json:"P50,omitempty"`
  7332  	// P75 - READ-ONLY; The 75th percentile value for the metric.
  7333  	P75 *float64 `json:"P75,omitempty"`
  7334  	// P90 - READ-ONLY; The 90th percentile value for the metric.
  7335  	P90 *float64 `json:"P90,omitempty"`
  7336  	// P95 - READ-ONLY; The 95th percentile value for the metric.
  7337  	P95 *float64 `json:"P95,omitempty"`
  7338  	// P99 - READ-ONLY; The 99th percentile value for the metric.
  7339  	P99 *float64 `json:"P99,omitempty"`
  7340  	// Count - READ-ONLY; The number of values for the metric.
  7341  	Count *float64 `json:"_count,omitempty"`
  7342  	// Average - READ-ONLY; The average value of the metric.
  7343  	Average *float64 `json:"average,omitempty"`
  7344  	// Maximum - READ-ONLY; The max value of the metric.
  7345  	Maximum *float64 `json:"maximum,omitempty"`
  7346  	// Minimum - READ-ONLY; The min value of the metric.
  7347  	Minimum *float64 `json:"minimum,omitempty"`
  7348  	// Timestamp - READ-ONLY; The metric timestamp (ISO-8601 format).
  7349  	Timestamp *date.Time `json:"timestamp,omitempty"`
  7350  	// Total - READ-ONLY; The total value of the metric.
  7351  	Total *float64 `json:"total,omitempty"`
  7352  }
  7353  
  7354  // MarshalJSON is the custom marshaler for PercentileMetricValue.
  7355  func (pmv PercentileMetricValue) MarshalJSON() ([]byte, error) {
  7356  	objectMap := make(map[string]interface{})
  7357  	return json.Marshal(objectMap)
  7358  }
  7359  
  7360  // PeriodicModeBackupPolicy the object representing periodic mode backup policy.
  7361  type PeriodicModeBackupPolicy struct {
  7362  	// PeriodicModeProperties - Configuration values for periodic mode backup
  7363  	PeriodicModeProperties *PeriodicModeProperties `json:"periodicModeProperties,omitempty"`
  7364  	// Type - Possible values include: 'TypeBackupPolicy', 'TypePeriodic', 'TypeContinuous'
  7365  	Type Type `json:"type,omitempty"`
  7366  }
  7367  
  7368  // MarshalJSON is the custom marshaler for PeriodicModeBackupPolicy.
  7369  func (pmbp PeriodicModeBackupPolicy) MarshalJSON() ([]byte, error) {
  7370  	pmbp.Type = TypePeriodic
  7371  	objectMap := make(map[string]interface{})
  7372  	if pmbp.PeriodicModeProperties != nil {
  7373  		objectMap["periodicModeProperties"] = pmbp.PeriodicModeProperties
  7374  	}
  7375  	if pmbp.Type != "" {
  7376  		objectMap["type"] = pmbp.Type
  7377  	}
  7378  	return json.Marshal(objectMap)
  7379  }
  7380  
  7381  // AsPeriodicModeBackupPolicy is the BasicBackupPolicy implementation for PeriodicModeBackupPolicy.
  7382  func (pmbp PeriodicModeBackupPolicy) AsPeriodicModeBackupPolicy() (*PeriodicModeBackupPolicy, bool) {
  7383  	return &pmbp, true
  7384  }
  7385  
  7386  // AsContinuousModeBackupPolicy is the BasicBackupPolicy implementation for PeriodicModeBackupPolicy.
  7387  func (pmbp PeriodicModeBackupPolicy) AsContinuousModeBackupPolicy() (*ContinuousModeBackupPolicy, bool) {
  7388  	return nil, false
  7389  }
  7390  
  7391  // AsBackupPolicy is the BasicBackupPolicy implementation for PeriodicModeBackupPolicy.
  7392  func (pmbp PeriodicModeBackupPolicy) AsBackupPolicy() (*BackupPolicy, bool) {
  7393  	return nil, false
  7394  }
  7395  
  7396  // AsBasicBackupPolicy is the BasicBackupPolicy implementation for PeriodicModeBackupPolicy.
  7397  func (pmbp PeriodicModeBackupPolicy) AsBasicBackupPolicy() (BasicBackupPolicy, bool) {
  7398  	return &pmbp, true
  7399  }
  7400  
  7401  // PeriodicModeProperties configuration values for periodic mode backup
  7402  type PeriodicModeProperties struct {
  7403  	// BackupIntervalInMinutes - An integer representing the interval in minutes between two backups
  7404  	BackupIntervalInMinutes *int32 `json:"backupIntervalInMinutes,omitempty"`
  7405  	// BackupRetentionIntervalInHours - An integer representing the time (in hours) that each backup is retained
  7406  	BackupRetentionIntervalInHours *int32 `json:"backupRetentionIntervalInHours,omitempty"`
  7407  	// BackupStorageRedundancy - Enum to indicate type of backup residency. Possible values include: 'BackupStorageRedundancyGeo', 'BackupStorageRedundancyLocal', 'BackupStorageRedundancyZone'
  7408  	BackupStorageRedundancy BackupStorageRedundancy `json:"backupStorageRedundancy,omitempty"`
  7409  }
  7410  
  7411  // Permission the set of data plane operations permitted through this Role Definition.
  7412  type Permission struct {
  7413  	// DataActions - An array of data actions that are allowed.
  7414  	DataActions *[]string `json:"dataActions,omitempty"`
  7415  	// NotDataActions - An array of data actions that are denied.
  7416  	NotDataActions *[]string `json:"notDataActions,omitempty"`
  7417  }
  7418  
  7419  // PrivateEndpointConnection a private endpoint connection
  7420  type PrivateEndpointConnection struct {
  7421  	autorest.Response `json:"-"`
  7422  	// PrivateEndpointConnectionProperties - Resource properties.
  7423  	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
  7424  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  7425  	ID *string `json:"id,omitempty"`
  7426  	// Name - READ-ONLY; The name of the resource
  7427  	Name *string `json:"name,omitempty"`
  7428  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  7429  	Type *string `json:"type,omitempty"`
  7430  }
  7431  
  7432  // MarshalJSON is the custom marshaler for PrivateEndpointConnection.
  7433  func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
  7434  	objectMap := make(map[string]interface{})
  7435  	if pec.PrivateEndpointConnectionProperties != nil {
  7436  		objectMap["properties"] = pec.PrivateEndpointConnectionProperties
  7437  	}
  7438  	return json.Marshal(objectMap)
  7439  }
  7440  
  7441  // UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
  7442  func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
  7443  	var m map[string]*json.RawMessage
  7444  	err := json.Unmarshal(body, &m)
  7445  	if err != nil {
  7446  		return err
  7447  	}
  7448  	for k, v := range m {
  7449  		switch k {
  7450  		case "properties":
  7451  			if v != nil {
  7452  				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
  7453  				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
  7454  				if err != nil {
  7455  					return err
  7456  				}
  7457  				pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
  7458  			}
  7459  		case "id":
  7460  			if v != nil {
  7461  				var ID string
  7462  				err = json.Unmarshal(*v, &ID)
  7463  				if err != nil {
  7464  					return err
  7465  				}
  7466  				pec.ID = &ID
  7467  			}
  7468  		case "name":
  7469  			if v != nil {
  7470  				var name string
  7471  				err = json.Unmarshal(*v, &name)
  7472  				if err != nil {
  7473  					return err
  7474  				}
  7475  				pec.Name = &name
  7476  			}
  7477  		case "type":
  7478  			if v != nil {
  7479  				var typeVar string
  7480  				err = json.Unmarshal(*v, &typeVar)
  7481  				if err != nil {
  7482  					return err
  7483  				}
  7484  				pec.Type = &typeVar
  7485  			}
  7486  		}
  7487  	}
  7488  
  7489  	return nil
  7490  }
  7491  
  7492  // PrivateEndpointConnectionListResult a list of private endpoint connections
  7493  type PrivateEndpointConnectionListResult struct {
  7494  	autorest.Response `json:"-"`
  7495  	// Value - Array of private endpoint connections
  7496  	Value *[]PrivateEndpointConnection `json:"value,omitempty"`
  7497  }
  7498  
  7499  // PrivateEndpointConnectionProperties properties of a private endpoint connection.
  7500  type PrivateEndpointConnectionProperties struct {
  7501  	// PrivateEndpoint - Private endpoint which the connection belongs to.
  7502  	PrivateEndpoint *PrivateEndpointProperty `json:"privateEndpoint,omitempty"`
  7503  	// PrivateLinkServiceConnectionState - Connection State of the Private Endpoint Connection.
  7504  	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty `json:"privateLinkServiceConnectionState,omitempty"`
  7505  	// GroupID - Group id of the private endpoint.
  7506  	GroupID *string `json:"groupId,omitempty"`
  7507  	// ProvisioningState - Provisioning state of the private endpoint.
  7508  	ProvisioningState *string `json:"provisioningState,omitempty"`
  7509  }
  7510  
  7511  // PrivateEndpointConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
  7512  // of a long-running operation.
  7513  type PrivateEndpointConnectionsCreateOrUpdateFuture struct {
  7514  	azure.FutureAPI
  7515  	// Result returns the result of the asynchronous operation.
  7516  	// If the operation has not completed it will return an error.
  7517  	Result func(PrivateEndpointConnectionsClient) (PrivateEndpointConnection, error)
  7518  }
  7519  
  7520  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  7521  func (future *PrivateEndpointConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  7522  	var azFuture azure.Future
  7523  	if err := json.Unmarshal(body, &azFuture); err != nil {
  7524  		return err
  7525  	}
  7526  	future.FutureAPI = &azFuture
  7527  	future.Result = future.result
  7528  	return nil
  7529  }
  7530  
  7531  // result is the default implementation for PrivateEndpointConnectionsCreateOrUpdateFuture.Result.
  7532  func (future *PrivateEndpointConnectionsCreateOrUpdateFuture) result(client PrivateEndpointConnectionsClient) (pec PrivateEndpointConnection, err error) {
  7533  	var done bool
  7534  	done, err = future.DoneWithContext(context.Background(), client)
  7535  	if err != nil {
  7536  		err = autorest.NewErrorWithError(err, "documentdb.PrivateEndpointConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  7537  		return
  7538  	}
  7539  	if !done {
  7540  		pec.Response.Response = future.Response()
  7541  		err = azure.NewAsyncOpIncompleteError("documentdb.PrivateEndpointConnectionsCreateOrUpdateFuture")
  7542  		return
  7543  	}
  7544  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  7545  	if pec.Response.Response, err = future.GetResult(sender); err == nil && pec.Response.Response.StatusCode != http.StatusNoContent {
  7546  		pec, err = client.CreateOrUpdateResponder(pec.Response.Response)
  7547  		if err != nil {
  7548  			err = autorest.NewErrorWithError(err, "documentdb.PrivateEndpointConnectionsCreateOrUpdateFuture", "Result", pec.Response.Response, "Failure responding to request")
  7549  		}
  7550  	}
  7551  	return
  7552  }
  7553  
  7554  // PrivateEndpointConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
  7555  // long-running operation.
  7556  type PrivateEndpointConnectionsDeleteFuture struct {
  7557  	azure.FutureAPI
  7558  	// Result returns the result of the asynchronous operation.
  7559  	// If the operation has not completed it will return an error.
  7560  	Result func(PrivateEndpointConnectionsClient) (autorest.Response, error)
  7561  }
  7562  
  7563  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  7564  func (future *PrivateEndpointConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
  7565  	var azFuture azure.Future
  7566  	if err := json.Unmarshal(body, &azFuture); err != nil {
  7567  		return err
  7568  	}
  7569  	future.FutureAPI = &azFuture
  7570  	future.Result = future.result
  7571  	return nil
  7572  }
  7573  
  7574  // result is the default implementation for PrivateEndpointConnectionsDeleteFuture.Result.
  7575  func (future *PrivateEndpointConnectionsDeleteFuture) result(client PrivateEndpointConnectionsClient) (ar autorest.Response, err error) {
  7576  	var done bool
  7577  	done, err = future.DoneWithContext(context.Background(), client)
  7578  	if err != nil {
  7579  		err = autorest.NewErrorWithError(err, "documentdb.PrivateEndpointConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
  7580  		return
  7581  	}
  7582  	if !done {
  7583  		ar.Response = future.Response()
  7584  		err = azure.NewAsyncOpIncompleteError("documentdb.PrivateEndpointConnectionsDeleteFuture")
  7585  		return
  7586  	}
  7587  	ar.Response = future.Response()
  7588  	return
  7589  }
  7590  
  7591  // PrivateEndpointProperty private endpoint which the connection belongs to.
  7592  type PrivateEndpointProperty struct {
  7593  	// ID - Resource id of the private endpoint.
  7594  	ID *string `json:"id,omitempty"`
  7595  }
  7596  
  7597  // PrivateLinkResource a private link resource
  7598  type PrivateLinkResource struct {
  7599  	autorest.Response `json:"-"`
  7600  	// PrivateLinkResourceProperties - Resource properties.
  7601  	*PrivateLinkResourceProperties `json:"properties,omitempty"`
  7602  	// ID - READ-ONLY; The unique resource identifier of the database account.
  7603  	ID *string `json:"id,omitempty"`
  7604  	// Name - READ-ONLY; The name of the database account.
  7605  	Name *string `json:"name,omitempty"`
  7606  	// Type - READ-ONLY; The type of Azure resource.
  7607  	Type *string `json:"type,omitempty"`
  7608  }
  7609  
  7610  // MarshalJSON is the custom marshaler for PrivateLinkResource.
  7611  func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) {
  7612  	objectMap := make(map[string]interface{})
  7613  	if plr.PrivateLinkResourceProperties != nil {
  7614  		objectMap["properties"] = plr.PrivateLinkResourceProperties
  7615  	}
  7616  	return json.Marshal(objectMap)
  7617  }
  7618  
  7619  // UnmarshalJSON is the custom unmarshaler for PrivateLinkResource struct.
  7620  func (plr *PrivateLinkResource) UnmarshalJSON(body []byte) error {
  7621  	var m map[string]*json.RawMessage
  7622  	err := json.Unmarshal(body, &m)
  7623  	if err != nil {
  7624  		return err
  7625  	}
  7626  	for k, v := range m {
  7627  		switch k {
  7628  		case "properties":
  7629  			if v != nil {
  7630  				var privateLinkResourceProperties PrivateLinkResourceProperties
  7631  				err = json.Unmarshal(*v, &privateLinkResourceProperties)
  7632  				if err != nil {
  7633  					return err
  7634  				}
  7635  				plr.PrivateLinkResourceProperties = &privateLinkResourceProperties
  7636  			}
  7637  		case "id":
  7638  			if v != nil {
  7639  				var ID string
  7640  				err = json.Unmarshal(*v, &ID)
  7641  				if err != nil {
  7642  					return err
  7643  				}
  7644  				plr.ID = &ID
  7645  			}
  7646  		case "name":
  7647  			if v != nil {
  7648  				var name string
  7649  				err = json.Unmarshal(*v, &name)
  7650  				if err != nil {
  7651  					return err
  7652  				}
  7653  				plr.Name = &name
  7654  			}
  7655  		case "type":
  7656  			if v != nil {
  7657  				var typeVar string
  7658  				err = json.Unmarshal(*v, &typeVar)
  7659  				if err != nil {
  7660  					return err
  7661  				}
  7662  				plr.Type = &typeVar
  7663  			}
  7664  		}
  7665  	}
  7666  
  7667  	return nil
  7668  }
  7669  
  7670  // PrivateLinkResourceListResult a list of private link resources
  7671  type PrivateLinkResourceListResult struct {
  7672  	autorest.Response `json:"-"`
  7673  	// Value - Array of private link resources
  7674  	Value *[]PrivateLinkResource `json:"value,omitempty"`
  7675  }
  7676  
  7677  // PrivateLinkResourceProperties properties of a private link resource.
  7678  type PrivateLinkResourceProperties struct {
  7679  	// GroupID - READ-ONLY; The private link resource group id.
  7680  	GroupID *string `json:"groupId,omitempty"`
  7681  	// RequiredMembers - READ-ONLY; The private link resource required member names.
  7682  	RequiredMembers *[]string `json:"requiredMembers,omitempty"`
  7683  	// RequiredZoneNames - READ-ONLY; The private link resource required zone names.
  7684  	RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"`
  7685  }
  7686  
  7687  // MarshalJSON is the custom marshaler for PrivateLinkResourceProperties.
  7688  func (plrp PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) {
  7689  	objectMap := make(map[string]interface{})
  7690  	return json.Marshal(objectMap)
  7691  }
  7692  
  7693  // PrivateLinkServiceConnectionStateProperty connection State of the Private Endpoint Connection.
  7694  type PrivateLinkServiceConnectionStateProperty struct {
  7695  	// Status - The private link service connection status.
  7696  	Status *string `json:"status,omitempty"`
  7697  	// Description - The private link service connection description.
  7698  	Description *string `json:"description,omitempty"`
  7699  	// ActionsRequired - READ-ONLY; Any action that is required beyond basic workflow (approve/ reject/ disconnect)
  7700  	ActionsRequired *string `json:"actionsRequired,omitempty"`
  7701  }
  7702  
  7703  // MarshalJSON is the custom marshaler for PrivateLinkServiceConnectionStateProperty.
  7704  func (plscsp PrivateLinkServiceConnectionStateProperty) MarshalJSON() ([]byte, error) {
  7705  	objectMap := make(map[string]interface{})
  7706  	if plscsp.Status != nil {
  7707  		objectMap["status"] = plscsp.Status
  7708  	}
  7709  	if plscsp.Description != nil {
  7710  		objectMap["description"] = plscsp.Description
  7711  	}
  7712  	return json.Marshal(objectMap)
  7713  }
  7714  
  7715  // ProxyResource the resource model definition for a Azure Resource Manager proxy resource. It will not
  7716  // have tags and a location
  7717  type ProxyResource struct {
  7718  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  7719  	ID *string `json:"id,omitempty"`
  7720  	// Name - READ-ONLY; The name of the resource
  7721  	Name *string `json:"name,omitempty"`
  7722  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  7723  	Type *string `json:"type,omitempty"`
  7724  }
  7725  
  7726  // MarshalJSON is the custom marshaler for ProxyResource.
  7727  func (pr ProxyResource) MarshalJSON() ([]byte, error) {
  7728  	objectMap := make(map[string]interface{})
  7729  	return json.Marshal(objectMap)
  7730  }
  7731  
  7732  // RegionalServiceResource resource for a regional service location.
  7733  type RegionalServiceResource struct {
  7734  	// Name - READ-ONLY; The regional service name.
  7735  	Name *string `json:"name,omitempty"`
  7736  	// Location - READ-ONLY; The location name.
  7737  	Location *string `json:"location,omitempty"`
  7738  	// Status - READ-ONLY; Possible values include: 'ServiceStatusCreating', 'ServiceStatusRunning', 'ServiceStatusUpdating', 'ServiceStatusDeleting', 'ServiceStatusError', 'ServiceStatusStopped'
  7739  	Status ServiceStatus `json:"status,omitempty"`
  7740  }
  7741  
  7742  // MarshalJSON is the custom marshaler for RegionalServiceResource.
  7743  func (rsr RegionalServiceResource) MarshalJSON() ([]byte, error) {
  7744  	objectMap := make(map[string]interface{})
  7745  	return json.Marshal(objectMap)
  7746  }
  7747  
  7748  // RegionForOnlineOffline cosmos DB region to online or offline.
  7749  type RegionForOnlineOffline struct {
  7750  	// Region - Cosmos DB region, with spaces between words and each word capitalized.
  7751  	Region *string `json:"region,omitempty"`
  7752  }
  7753  
  7754  // RepairPostBody specification of the keyspaces and tables to run repair on.
  7755  type RepairPostBody struct {
  7756  	// Keyspace - The name of the keyspace that repair should be run on.
  7757  	Keyspace *string `json:"keyspace,omitempty"`
  7758  	// Tables - List of tables in the keyspace to repair. If omitted, repair all tables in the keyspace.
  7759  	Tables *[]string `json:"tables,omitempty"`
  7760  }
  7761  
  7762  // Resource common fields that are returned in the response for all Azure Resource Manager resources
  7763  type Resource struct {
  7764  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  7765  	ID *string `json:"id,omitempty"`
  7766  	// Name - READ-ONLY; The name of the resource
  7767  	Name *string `json:"name,omitempty"`
  7768  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  7769  	Type *string `json:"type,omitempty"`
  7770  }
  7771  
  7772  // MarshalJSON is the custom marshaler for Resource.
  7773  func (r Resource) MarshalJSON() ([]byte, error) {
  7774  	objectMap := make(map[string]interface{})
  7775  	return json.Marshal(objectMap)
  7776  }
  7777  
  7778  // RestorableDatabaseAccountGetResult a Azure Cosmos DB restorable database account.
  7779  type RestorableDatabaseAccountGetResult struct {
  7780  	autorest.Response `json:"-"`
  7781  	// RestorableDatabaseAccountProperties - The properties of a restorable database account.
  7782  	*RestorableDatabaseAccountProperties `json:"properties,omitempty"`
  7783  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  7784  	ID *string `json:"id,omitempty"`
  7785  	// Name - READ-ONLY; The name of the ARM resource.
  7786  	Name *string `json:"name,omitempty"`
  7787  	// Type - READ-ONLY; The type of Azure resource.
  7788  	Type *string `json:"type,omitempty"`
  7789  	// Location - The location of the resource group to which the resource belongs.
  7790  	Location *string `json:"location,omitempty"`
  7791  }
  7792  
  7793  // MarshalJSON is the custom marshaler for RestorableDatabaseAccountGetResult.
  7794  func (rdagr RestorableDatabaseAccountGetResult) MarshalJSON() ([]byte, error) {
  7795  	objectMap := make(map[string]interface{})
  7796  	if rdagr.RestorableDatabaseAccountProperties != nil {
  7797  		objectMap["properties"] = rdagr.RestorableDatabaseAccountProperties
  7798  	}
  7799  	if rdagr.Location != nil {
  7800  		objectMap["location"] = rdagr.Location
  7801  	}
  7802  	return json.Marshal(objectMap)
  7803  }
  7804  
  7805  // UnmarshalJSON is the custom unmarshaler for RestorableDatabaseAccountGetResult struct.
  7806  func (rdagr *RestorableDatabaseAccountGetResult) UnmarshalJSON(body []byte) error {
  7807  	var m map[string]*json.RawMessage
  7808  	err := json.Unmarshal(body, &m)
  7809  	if err != nil {
  7810  		return err
  7811  	}
  7812  	for k, v := range m {
  7813  		switch k {
  7814  		case "properties":
  7815  			if v != nil {
  7816  				var restorableDatabaseAccountProperties RestorableDatabaseAccountProperties
  7817  				err = json.Unmarshal(*v, &restorableDatabaseAccountProperties)
  7818  				if err != nil {
  7819  					return err
  7820  				}
  7821  				rdagr.RestorableDatabaseAccountProperties = &restorableDatabaseAccountProperties
  7822  			}
  7823  		case "id":
  7824  			if v != nil {
  7825  				var ID string
  7826  				err = json.Unmarshal(*v, &ID)
  7827  				if err != nil {
  7828  					return err
  7829  				}
  7830  				rdagr.ID = &ID
  7831  			}
  7832  		case "name":
  7833  			if v != nil {
  7834  				var name string
  7835  				err = json.Unmarshal(*v, &name)
  7836  				if err != nil {
  7837  					return err
  7838  				}
  7839  				rdagr.Name = &name
  7840  			}
  7841  		case "type":
  7842  			if v != nil {
  7843  				var typeVar string
  7844  				err = json.Unmarshal(*v, &typeVar)
  7845  				if err != nil {
  7846  					return err
  7847  				}
  7848  				rdagr.Type = &typeVar
  7849  			}
  7850  		case "location":
  7851  			if v != nil {
  7852  				var location string
  7853  				err = json.Unmarshal(*v, &location)
  7854  				if err != nil {
  7855  					return err
  7856  				}
  7857  				rdagr.Location = &location
  7858  			}
  7859  		}
  7860  	}
  7861  
  7862  	return nil
  7863  }
  7864  
  7865  // RestorableDatabaseAccountProperties the properties of a restorable database account.
  7866  type RestorableDatabaseAccountProperties struct {
  7867  	// AccountName - The name of the global database account
  7868  	AccountName *string `json:"accountName,omitempty"`
  7869  	// CreationTime - The creation time of the restorable database account (ISO-8601 format).
  7870  	CreationTime *date.Time `json:"creationTime,omitempty"`
  7871  	// DeletionTime - The time at which the restorable database account has been deleted (ISO-8601 format).
  7872  	DeletionTime *date.Time `json:"deletionTime,omitempty"`
  7873  	// APIType - READ-ONLY; The API type of the restorable database account. Possible values include: 'APITypeMongoDB', 'APITypeGremlin', 'APITypeCassandra', 'APITypeTable', 'APITypeSQL', 'APITypeGremlinV2'
  7874  	APIType APIType `json:"apiType,omitempty"`
  7875  	// RestorableLocations - READ-ONLY; List of regions where the of the database account can be restored from.
  7876  	RestorableLocations *[]RestorableLocationResource `json:"restorableLocations,omitempty"`
  7877  }
  7878  
  7879  // MarshalJSON is the custom marshaler for RestorableDatabaseAccountProperties.
  7880  func (rdap RestorableDatabaseAccountProperties) MarshalJSON() ([]byte, error) {
  7881  	objectMap := make(map[string]interface{})
  7882  	if rdap.AccountName != nil {
  7883  		objectMap["accountName"] = rdap.AccountName
  7884  	}
  7885  	if rdap.CreationTime != nil {
  7886  		objectMap["creationTime"] = rdap.CreationTime
  7887  	}
  7888  	if rdap.DeletionTime != nil {
  7889  		objectMap["deletionTime"] = rdap.DeletionTime
  7890  	}
  7891  	return json.Marshal(objectMap)
  7892  }
  7893  
  7894  // RestorableDatabaseAccountsListResult the List operation response, that contains the restorable database
  7895  // accounts and their properties.
  7896  type RestorableDatabaseAccountsListResult struct {
  7897  	autorest.Response `json:"-"`
  7898  	// Value - READ-ONLY; List of restorable database accounts and their properties.
  7899  	Value *[]RestorableDatabaseAccountGetResult `json:"value,omitempty"`
  7900  }
  7901  
  7902  // MarshalJSON is the custom marshaler for RestorableDatabaseAccountsListResult.
  7903  func (rdalr RestorableDatabaseAccountsListResult) MarshalJSON() ([]byte, error) {
  7904  	objectMap := make(map[string]interface{})
  7905  	return json.Marshal(objectMap)
  7906  }
  7907  
  7908  // RestorableLocationResource properties of the regional restorable account.
  7909  type RestorableLocationResource struct {
  7910  	// LocationName - READ-ONLY; The location of the regional restorable account.
  7911  	LocationName *string `json:"locationName,omitempty"`
  7912  	// RegionalDatabaseAccountInstanceID - READ-ONLY; The instance id of the regional restorable account.
  7913  	RegionalDatabaseAccountInstanceID *string `json:"regionalDatabaseAccountInstanceId,omitempty"`
  7914  	// CreationTime - READ-ONLY; The creation time of the regional restorable database account (ISO-8601 format).
  7915  	CreationTime *date.Time `json:"creationTime,omitempty"`
  7916  	// DeletionTime - READ-ONLY; The time at which the regional restorable database account has been deleted (ISO-8601 format).
  7917  	DeletionTime *date.Time `json:"deletionTime,omitempty"`
  7918  }
  7919  
  7920  // MarshalJSON is the custom marshaler for RestorableLocationResource.
  7921  func (rlr RestorableLocationResource) MarshalJSON() ([]byte, error) {
  7922  	objectMap := make(map[string]interface{})
  7923  	return json.Marshal(objectMap)
  7924  }
  7925  
  7926  // RestorableMongodbCollectionGetResult an Azure Cosmos DB MongoDB collection event
  7927  type RestorableMongodbCollectionGetResult struct {
  7928  	// RestorableMongodbCollectionProperties - The properties of a MongoDB collection event.
  7929  	*RestorableMongodbCollectionProperties `json:"properties,omitempty"`
  7930  	// ID - READ-ONLY; The unique resource Identifier of the ARM resource.
  7931  	ID *string `json:"id,omitempty"`
  7932  	// Name - READ-ONLY; The name of the ARM resource.
  7933  	Name *string `json:"name,omitempty"`
  7934  	// Type - READ-ONLY; The type of Azure resource.
  7935  	Type *string `json:"type,omitempty"`
  7936  }
  7937  
  7938  // MarshalJSON is the custom marshaler for RestorableMongodbCollectionGetResult.
  7939  func (rmcgr RestorableMongodbCollectionGetResult) MarshalJSON() ([]byte, error) {
  7940  	objectMap := make(map[string]interface{})
  7941  	if rmcgr.RestorableMongodbCollectionProperties != nil {
  7942  		objectMap["properties"] = rmcgr.RestorableMongodbCollectionProperties
  7943  	}
  7944  	return json.Marshal(objectMap)
  7945  }
  7946  
  7947  // UnmarshalJSON is the custom unmarshaler for RestorableMongodbCollectionGetResult struct.
  7948  func (rmcgr *RestorableMongodbCollectionGetResult) UnmarshalJSON(body []byte) error {
  7949  	var m map[string]*json.RawMessage
  7950  	err := json.Unmarshal(body, &m)
  7951  	if err != nil {
  7952  		return err
  7953  	}
  7954  	for k, v := range m {
  7955  		switch k {
  7956  		case "properties":
  7957  			if v != nil {
  7958  				var restorableMongodbCollectionProperties RestorableMongodbCollectionProperties
  7959  				err = json.Unmarshal(*v, &restorableMongodbCollectionProperties)
  7960  				if err != nil {
  7961  					return err
  7962  				}
  7963  				rmcgr.RestorableMongodbCollectionProperties = &restorableMongodbCollectionProperties
  7964  			}
  7965  		case "id":
  7966  			if v != nil {
  7967  				var ID string
  7968  				err = json.Unmarshal(*v, &ID)
  7969  				if err != nil {
  7970  					return err
  7971  				}
  7972  				rmcgr.ID = &ID
  7973  			}
  7974  		case "name":
  7975  			if v != nil {
  7976  				var name string
  7977  				err = json.Unmarshal(*v, &name)
  7978  				if err != nil {
  7979  					return err
  7980  				}
  7981  				rmcgr.Name = &name
  7982  			}
  7983  		case "type":
  7984  			if v != nil {
  7985  				var typeVar string
  7986  				err = json.Unmarshal(*v, &typeVar)
  7987  				if err != nil {
  7988  					return err
  7989  				}
  7990  				rmcgr.Type = &typeVar
  7991  			}
  7992  		}
  7993  	}
  7994  
  7995  	return nil
  7996  }
  7997  
  7998  // RestorableMongodbCollectionProperties the properties of an Azure Cosmos DB MongoDB collection event
  7999  type RestorableMongodbCollectionProperties struct {
  8000  	// Resource - The resource of an Azure Cosmos DB MongoDB collection event
  8001  	Resource *RestorableMongodbCollectionPropertiesResource `json:"resource,omitempty"`
  8002  }
  8003  
  8004  // RestorableMongodbCollectionPropertiesResource the resource of an Azure Cosmos DB MongoDB collection
  8005  // event
  8006  type RestorableMongodbCollectionPropertiesResource struct {
  8007  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  8008  	Rid *string `json:"_rid,omitempty"`
  8009  	// OperationType - READ-ONLY; The operation type of this collection event. Possible values include: 'OperationTypeCreate', 'OperationTypeReplace', 'OperationTypeDelete', 'OperationTypeSystemOperation'
  8010  	OperationType OperationType `json:"operationType,omitempty"`
  8011  	// EventTimestamp - READ-ONLY; The time when this collection event happened.
  8012  	EventTimestamp *string `json:"eventTimestamp,omitempty"`
  8013  	// OwnerID - READ-ONLY; The name of this MongoDB collection.
  8014  	OwnerID *string `json:"ownerId,omitempty"`
  8015  	// OwnerResourceID - READ-ONLY; The resource ID of this MongoDB collection.
  8016  	OwnerResourceID *string `json:"ownerResourceId,omitempty"`
  8017  }
  8018  
  8019  // MarshalJSON is the custom marshaler for RestorableMongodbCollectionPropertiesResource.
  8020  func (rmcp RestorableMongodbCollectionPropertiesResource) MarshalJSON() ([]byte, error) {
  8021  	objectMap := make(map[string]interface{})
  8022  	return json.Marshal(objectMap)
  8023  }
  8024  
  8025  // RestorableMongodbCollectionsListResult the List operation response, that contains the MongoDB collection
  8026  // events and their properties.
  8027  type RestorableMongodbCollectionsListResult struct {
  8028  	autorest.Response `json:"-"`
  8029  	// Value - READ-ONLY; List of MongoDB collection events and their properties.
  8030  	Value *[]RestorableMongodbCollectionGetResult `json:"value,omitempty"`
  8031  }
  8032  
  8033  // MarshalJSON is the custom marshaler for RestorableMongodbCollectionsListResult.
  8034  func (rmclr RestorableMongodbCollectionsListResult) MarshalJSON() ([]byte, error) {
  8035  	objectMap := make(map[string]interface{})
  8036  	return json.Marshal(objectMap)
  8037  }
  8038  
  8039  // RestorableMongodbDatabaseGetResult an Azure Cosmos DB MongoDB database event
  8040  type RestorableMongodbDatabaseGetResult struct {
  8041  	// RestorableMongodbDatabaseProperties - The properties of a MongoDB database event.
  8042  	*RestorableMongodbDatabaseProperties `json:"properties,omitempty"`
  8043  	// ID - READ-ONLY; The unique resource Identifier of the ARM resource.
  8044  	ID *string `json:"id,omitempty"`
  8045  	// Name - READ-ONLY; The name of the ARM resource.
  8046  	Name *string `json:"name,omitempty"`
  8047  	// Type - READ-ONLY; The type of Azure resource.
  8048  	Type *string `json:"type,omitempty"`
  8049  }
  8050  
  8051  // MarshalJSON is the custom marshaler for RestorableMongodbDatabaseGetResult.
  8052  func (rmdgr RestorableMongodbDatabaseGetResult) MarshalJSON() ([]byte, error) {
  8053  	objectMap := make(map[string]interface{})
  8054  	if rmdgr.RestorableMongodbDatabaseProperties != nil {
  8055  		objectMap["properties"] = rmdgr.RestorableMongodbDatabaseProperties
  8056  	}
  8057  	return json.Marshal(objectMap)
  8058  }
  8059  
  8060  // UnmarshalJSON is the custom unmarshaler for RestorableMongodbDatabaseGetResult struct.
  8061  func (rmdgr *RestorableMongodbDatabaseGetResult) UnmarshalJSON(body []byte) error {
  8062  	var m map[string]*json.RawMessage
  8063  	err := json.Unmarshal(body, &m)
  8064  	if err != nil {
  8065  		return err
  8066  	}
  8067  	for k, v := range m {
  8068  		switch k {
  8069  		case "properties":
  8070  			if v != nil {
  8071  				var restorableMongodbDatabaseProperties RestorableMongodbDatabaseProperties
  8072  				err = json.Unmarshal(*v, &restorableMongodbDatabaseProperties)
  8073  				if err != nil {
  8074  					return err
  8075  				}
  8076  				rmdgr.RestorableMongodbDatabaseProperties = &restorableMongodbDatabaseProperties
  8077  			}
  8078  		case "id":
  8079  			if v != nil {
  8080  				var ID string
  8081  				err = json.Unmarshal(*v, &ID)
  8082  				if err != nil {
  8083  					return err
  8084  				}
  8085  				rmdgr.ID = &ID
  8086  			}
  8087  		case "name":
  8088  			if v != nil {
  8089  				var name string
  8090  				err = json.Unmarshal(*v, &name)
  8091  				if err != nil {
  8092  					return err
  8093  				}
  8094  				rmdgr.Name = &name
  8095  			}
  8096  		case "type":
  8097  			if v != nil {
  8098  				var typeVar string
  8099  				err = json.Unmarshal(*v, &typeVar)
  8100  				if err != nil {
  8101  					return err
  8102  				}
  8103  				rmdgr.Type = &typeVar
  8104  			}
  8105  		}
  8106  	}
  8107  
  8108  	return nil
  8109  }
  8110  
  8111  // RestorableMongodbDatabaseProperties the properties of an Azure Cosmos DB MongoDB database event
  8112  type RestorableMongodbDatabaseProperties struct {
  8113  	// Resource - The resource of an Azure Cosmos DB MongoDB database event
  8114  	Resource *RestorableMongodbDatabasePropertiesResource `json:"resource,omitempty"`
  8115  }
  8116  
  8117  // RestorableMongodbDatabasePropertiesResource the resource of an Azure Cosmos DB MongoDB database event
  8118  type RestorableMongodbDatabasePropertiesResource struct {
  8119  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  8120  	Rid *string `json:"_rid,omitempty"`
  8121  	// OperationType - READ-ONLY; The operation type of this database event. Possible values include: 'OperationTypeCreate', 'OperationTypeReplace', 'OperationTypeDelete', 'OperationTypeSystemOperation'
  8122  	OperationType OperationType `json:"operationType,omitempty"`
  8123  	// EventTimestamp - READ-ONLY; The time when this database event happened.
  8124  	EventTimestamp *string `json:"eventTimestamp,omitempty"`
  8125  	// OwnerID - READ-ONLY; The name of this MongoDB database.
  8126  	OwnerID *string `json:"ownerId,omitempty"`
  8127  	// OwnerResourceID - READ-ONLY; The resource ID of this MongoDB database.
  8128  	OwnerResourceID *string `json:"ownerResourceId,omitempty"`
  8129  }
  8130  
  8131  // MarshalJSON is the custom marshaler for RestorableMongodbDatabasePropertiesResource.
  8132  func (rmdp RestorableMongodbDatabasePropertiesResource) MarshalJSON() ([]byte, error) {
  8133  	objectMap := make(map[string]interface{})
  8134  	return json.Marshal(objectMap)
  8135  }
  8136  
  8137  // RestorableMongodbDatabasesListResult the List operation response, that contains the MongoDB database
  8138  // events and their properties.
  8139  type RestorableMongodbDatabasesListResult struct {
  8140  	autorest.Response `json:"-"`
  8141  	// Value - READ-ONLY; List of MongoDB database events and their properties.
  8142  	Value *[]RestorableMongodbDatabaseGetResult `json:"value,omitempty"`
  8143  }
  8144  
  8145  // MarshalJSON is the custom marshaler for RestorableMongodbDatabasesListResult.
  8146  func (rmdlr RestorableMongodbDatabasesListResult) MarshalJSON() ([]byte, error) {
  8147  	objectMap := make(map[string]interface{})
  8148  	return json.Marshal(objectMap)
  8149  }
  8150  
  8151  // RestorableMongodbResourcesListResult the List operation response, that contains the restorable MongoDB
  8152  // resources.
  8153  type RestorableMongodbResourcesListResult struct {
  8154  	autorest.Response `json:"-"`
  8155  	// Value - READ-ONLY; List of restorable MongoDB resources, including the database and collection names.
  8156  	Value *[]DatabaseRestoreResource `json:"value,omitempty"`
  8157  }
  8158  
  8159  // MarshalJSON is the custom marshaler for RestorableMongodbResourcesListResult.
  8160  func (rmrlr RestorableMongodbResourcesListResult) MarshalJSON() ([]byte, error) {
  8161  	objectMap := make(map[string]interface{})
  8162  	return json.Marshal(objectMap)
  8163  }
  8164  
  8165  // RestorableSQLContainerGetResult an Azure Cosmos DB SQL container event
  8166  type RestorableSQLContainerGetResult struct {
  8167  	// RestorableSQLContainerProperties - The properties of a SQL container event.
  8168  	*RestorableSQLContainerProperties `json:"properties,omitempty"`
  8169  	// ID - READ-ONLY; The unique resource Identifier of the ARM resource.
  8170  	ID *string `json:"id,omitempty"`
  8171  	// Name - READ-ONLY; The name of the ARM resource.
  8172  	Name *string `json:"name,omitempty"`
  8173  	// Type - READ-ONLY; The type of Azure resource.
  8174  	Type *string `json:"type,omitempty"`
  8175  }
  8176  
  8177  // MarshalJSON is the custom marshaler for RestorableSQLContainerGetResult.
  8178  func (rscgr RestorableSQLContainerGetResult) MarshalJSON() ([]byte, error) {
  8179  	objectMap := make(map[string]interface{})
  8180  	if rscgr.RestorableSQLContainerProperties != nil {
  8181  		objectMap["properties"] = rscgr.RestorableSQLContainerProperties
  8182  	}
  8183  	return json.Marshal(objectMap)
  8184  }
  8185  
  8186  // UnmarshalJSON is the custom unmarshaler for RestorableSQLContainerGetResult struct.
  8187  func (rscgr *RestorableSQLContainerGetResult) UnmarshalJSON(body []byte) error {
  8188  	var m map[string]*json.RawMessage
  8189  	err := json.Unmarshal(body, &m)
  8190  	if err != nil {
  8191  		return err
  8192  	}
  8193  	for k, v := range m {
  8194  		switch k {
  8195  		case "properties":
  8196  			if v != nil {
  8197  				var restorableSQLContainerProperties RestorableSQLContainerProperties
  8198  				err = json.Unmarshal(*v, &restorableSQLContainerProperties)
  8199  				if err != nil {
  8200  					return err
  8201  				}
  8202  				rscgr.RestorableSQLContainerProperties = &restorableSQLContainerProperties
  8203  			}
  8204  		case "id":
  8205  			if v != nil {
  8206  				var ID string
  8207  				err = json.Unmarshal(*v, &ID)
  8208  				if err != nil {
  8209  					return err
  8210  				}
  8211  				rscgr.ID = &ID
  8212  			}
  8213  		case "name":
  8214  			if v != nil {
  8215  				var name string
  8216  				err = json.Unmarshal(*v, &name)
  8217  				if err != nil {
  8218  					return err
  8219  				}
  8220  				rscgr.Name = &name
  8221  			}
  8222  		case "type":
  8223  			if v != nil {
  8224  				var typeVar string
  8225  				err = json.Unmarshal(*v, &typeVar)
  8226  				if err != nil {
  8227  					return err
  8228  				}
  8229  				rscgr.Type = &typeVar
  8230  			}
  8231  		}
  8232  	}
  8233  
  8234  	return nil
  8235  }
  8236  
  8237  // RestorableSQLContainerProperties the properties of an Azure Cosmos DB SQL container event
  8238  type RestorableSQLContainerProperties struct {
  8239  	// Resource - The resource of an Azure Cosmos DB SQL container event
  8240  	Resource *RestorableSQLContainerPropertiesResource `json:"resource,omitempty"`
  8241  }
  8242  
  8243  // RestorableSQLContainerPropertiesResource the resource of an Azure Cosmos DB SQL container event
  8244  type RestorableSQLContainerPropertiesResource struct {
  8245  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  8246  	Rid *string `json:"_rid,omitempty"`
  8247  	// OperationType - READ-ONLY; The operation type of this container event. Possible values include: 'OperationTypeCreate', 'OperationTypeReplace', 'OperationTypeDelete', 'OperationTypeSystemOperation'
  8248  	OperationType OperationType `json:"operationType,omitempty"`
  8249  	// EventTimestamp - READ-ONLY; The when this container event happened.
  8250  	EventTimestamp *string `json:"eventTimestamp,omitempty"`
  8251  	// OwnerID - READ-ONLY; The name of this SQL container.
  8252  	OwnerID *string `json:"ownerId,omitempty"`
  8253  	// OwnerResourceID - READ-ONLY; The resource ID of this SQL container.
  8254  	OwnerResourceID *string `json:"ownerResourceId,omitempty"`
  8255  	// Container - Cosmos DB SQL container resource object
  8256  	Container *RestorableSQLContainerPropertiesResourceContainer `json:"container,omitempty"`
  8257  }
  8258  
  8259  // MarshalJSON is the custom marshaler for RestorableSQLContainerPropertiesResource.
  8260  func (rscp RestorableSQLContainerPropertiesResource) MarshalJSON() ([]byte, error) {
  8261  	objectMap := make(map[string]interface{})
  8262  	if rscp.Container != nil {
  8263  		objectMap["container"] = rscp.Container
  8264  	}
  8265  	return json.Marshal(objectMap)
  8266  }
  8267  
  8268  // RestorableSQLContainerPropertiesResourceContainer cosmos DB SQL container resource object
  8269  type RestorableSQLContainerPropertiesResourceContainer struct {
  8270  	// ID - Name of the Cosmos DB SQL container
  8271  	ID *string `json:"id,omitempty"`
  8272  	// IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container
  8273  	IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"`
  8274  	// PartitionKey - The configuration of the partition key to be used for partitioning data into multiple partitions
  8275  	PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"`
  8276  	// DefaultTTL - Default time to live
  8277  	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
  8278  	// UniqueKeyPolicy - The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
  8279  	UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"`
  8280  	// ConflictResolutionPolicy - The conflict resolution policy for the container.
  8281  	ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"`
  8282  	// AnalyticalStorageTTL - Analytical TTL.
  8283  	AnalyticalStorageTTL *int64 `json:"analyticalStorageTtl,omitempty"`
  8284  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  8285  	Rid *string `json:"_rid,omitempty"`
  8286  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  8287  	Ts *float64 `json:"_ts,omitempty"`
  8288  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  8289  	Etag *string `json:"_etag,omitempty"`
  8290  	// Self - READ-ONLY; A system generated property that specifies the addressable path of the container resource.
  8291  	Self *string `json:"_self,omitempty"`
  8292  }
  8293  
  8294  // MarshalJSON is the custom marshaler for RestorableSQLContainerPropertiesResourceContainer.
  8295  func (rscp RestorableSQLContainerPropertiesResourceContainer) MarshalJSON() ([]byte, error) {
  8296  	objectMap := make(map[string]interface{})
  8297  	if rscp.ID != nil {
  8298  		objectMap["id"] = rscp.ID
  8299  	}
  8300  	if rscp.IndexingPolicy != nil {
  8301  		objectMap["indexingPolicy"] = rscp.IndexingPolicy
  8302  	}
  8303  	if rscp.PartitionKey != nil {
  8304  		objectMap["partitionKey"] = rscp.PartitionKey
  8305  	}
  8306  	if rscp.DefaultTTL != nil {
  8307  		objectMap["defaultTtl"] = rscp.DefaultTTL
  8308  	}
  8309  	if rscp.UniqueKeyPolicy != nil {
  8310  		objectMap["uniqueKeyPolicy"] = rscp.UniqueKeyPolicy
  8311  	}
  8312  	if rscp.ConflictResolutionPolicy != nil {
  8313  		objectMap["conflictResolutionPolicy"] = rscp.ConflictResolutionPolicy
  8314  	}
  8315  	if rscp.AnalyticalStorageTTL != nil {
  8316  		objectMap["analyticalStorageTtl"] = rscp.AnalyticalStorageTTL
  8317  	}
  8318  	return json.Marshal(objectMap)
  8319  }
  8320  
  8321  // RestorableSQLContainersListResult the List operation response, that contains the SQL container events
  8322  // and their properties.
  8323  type RestorableSQLContainersListResult struct {
  8324  	autorest.Response `json:"-"`
  8325  	// Value - READ-ONLY; List of SQL container events and their properties.
  8326  	Value *[]RestorableSQLContainerGetResult `json:"value,omitempty"`
  8327  }
  8328  
  8329  // MarshalJSON is the custom marshaler for RestorableSQLContainersListResult.
  8330  func (rsclr RestorableSQLContainersListResult) MarshalJSON() ([]byte, error) {
  8331  	objectMap := make(map[string]interface{})
  8332  	return json.Marshal(objectMap)
  8333  }
  8334  
  8335  // RestorableSQLDatabaseGetResult an Azure Cosmos DB SQL database event
  8336  type RestorableSQLDatabaseGetResult struct {
  8337  	// RestorableSQLDatabaseProperties - The properties of a SQL database event.
  8338  	*RestorableSQLDatabaseProperties `json:"properties,omitempty"`
  8339  	// ID - READ-ONLY; The unique resource Identifier of the ARM resource.
  8340  	ID *string `json:"id,omitempty"`
  8341  	// Name - READ-ONLY; The name of the ARM resource.
  8342  	Name *string `json:"name,omitempty"`
  8343  	// Type - READ-ONLY; The type of Azure resource.
  8344  	Type *string `json:"type,omitempty"`
  8345  }
  8346  
  8347  // MarshalJSON is the custom marshaler for RestorableSQLDatabaseGetResult.
  8348  func (rsdgr RestorableSQLDatabaseGetResult) MarshalJSON() ([]byte, error) {
  8349  	objectMap := make(map[string]interface{})
  8350  	if rsdgr.RestorableSQLDatabaseProperties != nil {
  8351  		objectMap["properties"] = rsdgr.RestorableSQLDatabaseProperties
  8352  	}
  8353  	return json.Marshal(objectMap)
  8354  }
  8355  
  8356  // UnmarshalJSON is the custom unmarshaler for RestorableSQLDatabaseGetResult struct.
  8357  func (rsdgr *RestorableSQLDatabaseGetResult) UnmarshalJSON(body []byte) error {
  8358  	var m map[string]*json.RawMessage
  8359  	err := json.Unmarshal(body, &m)
  8360  	if err != nil {
  8361  		return err
  8362  	}
  8363  	for k, v := range m {
  8364  		switch k {
  8365  		case "properties":
  8366  			if v != nil {
  8367  				var restorableSQLDatabaseProperties RestorableSQLDatabaseProperties
  8368  				err = json.Unmarshal(*v, &restorableSQLDatabaseProperties)
  8369  				if err != nil {
  8370  					return err
  8371  				}
  8372  				rsdgr.RestorableSQLDatabaseProperties = &restorableSQLDatabaseProperties
  8373  			}
  8374  		case "id":
  8375  			if v != nil {
  8376  				var ID string
  8377  				err = json.Unmarshal(*v, &ID)
  8378  				if err != nil {
  8379  					return err
  8380  				}
  8381  				rsdgr.ID = &ID
  8382  			}
  8383  		case "name":
  8384  			if v != nil {
  8385  				var name string
  8386  				err = json.Unmarshal(*v, &name)
  8387  				if err != nil {
  8388  					return err
  8389  				}
  8390  				rsdgr.Name = &name
  8391  			}
  8392  		case "type":
  8393  			if v != nil {
  8394  				var typeVar string
  8395  				err = json.Unmarshal(*v, &typeVar)
  8396  				if err != nil {
  8397  					return err
  8398  				}
  8399  				rsdgr.Type = &typeVar
  8400  			}
  8401  		}
  8402  	}
  8403  
  8404  	return nil
  8405  }
  8406  
  8407  // RestorableSQLDatabaseProperties the properties of an Azure Cosmos DB SQL database event
  8408  type RestorableSQLDatabaseProperties struct {
  8409  	// Resource - The resource of an Azure Cosmos DB SQL database event
  8410  	Resource *RestorableSQLDatabasePropertiesResource `json:"resource,omitempty"`
  8411  }
  8412  
  8413  // RestorableSQLDatabasePropertiesResource the resource of an Azure Cosmos DB SQL database event
  8414  type RestorableSQLDatabasePropertiesResource struct {
  8415  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  8416  	Rid *string `json:"_rid,omitempty"`
  8417  	// OperationType - READ-ONLY; The operation type of this database event. Possible values include: 'OperationTypeCreate', 'OperationTypeReplace', 'OperationTypeDelete', 'OperationTypeSystemOperation'
  8418  	OperationType OperationType `json:"operationType,omitempty"`
  8419  	// EventTimestamp - READ-ONLY; The time when this database event happened.
  8420  	EventTimestamp *string `json:"eventTimestamp,omitempty"`
  8421  	// OwnerID - READ-ONLY; The name of the SQL database.
  8422  	OwnerID *string `json:"ownerId,omitempty"`
  8423  	// OwnerResourceID - READ-ONLY; The resource ID of the SQL database.
  8424  	OwnerResourceID *string `json:"ownerResourceId,omitempty"`
  8425  	// Database - Cosmos DB SQL database resource object
  8426  	Database *RestorableSQLDatabasePropertiesResourceDatabase `json:"database,omitempty"`
  8427  }
  8428  
  8429  // MarshalJSON is the custom marshaler for RestorableSQLDatabasePropertiesResource.
  8430  func (rsdp RestorableSQLDatabasePropertiesResource) MarshalJSON() ([]byte, error) {
  8431  	objectMap := make(map[string]interface{})
  8432  	if rsdp.Database != nil {
  8433  		objectMap["database"] = rsdp.Database
  8434  	}
  8435  	return json.Marshal(objectMap)
  8436  }
  8437  
  8438  // RestorableSQLDatabasePropertiesResourceDatabase cosmos DB SQL database resource object
  8439  type RestorableSQLDatabasePropertiesResourceDatabase struct {
  8440  	// ID - Name of the Cosmos DB SQL database
  8441  	ID *string `json:"id,omitempty"`
  8442  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  8443  	Rid *string `json:"_rid,omitempty"`
  8444  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  8445  	Ts *float64 `json:"_ts,omitempty"`
  8446  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  8447  	Etag *string `json:"_etag,omitempty"`
  8448  	// Colls - READ-ONLY; A system generated property that specified the addressable path of the collections resource.
  8449  	Colls *string `json:"_colls,omitempty"`
  8450  	// Users - READ-ONLY; A system generated property that specifies the addressable path of the users resource.
  8451  	Users *string `json:"_users,omitempty"`
  8452  	// Self - READ-ONLY; A system generated property that specifies the addressable path of the database resource.
  8453  	Self *string `json:"_self,omitempty"`
  8454  }
  8455  
  8456  // MarshalJSON is the custom marshaler for RestorableSQLDatabasePropertiesResourceDatabase.
  8457  func (rsdp RestorableSQLDatabasePropertiesResourceDatabase) MarshalJSON() ([]byte, error) {
  8458  	objectMap := make(map[string]interface{})
  8459  	if rsdp.ID != nil {
  8460  		objectMap["id"] = rsdp.ID
  8461  	}
  8462  	return json.Marshal(objectMap)
  8463  }
  8464  
  8465  // RestorableSQLDatabasesListResult the List operation response, that contains the SQL database events and
  8466  // their properties.
  8467  type RestorableSQLDatabasesListResult struct {
  8468  	autorest.Response `json:"-"`
  8469  	// Value - READ-ONLY; List of SQL database events and their properties.
  8470  	Value *[]RestorableSQLDatabaseGetResult `json:"value,omitempty"`
  8471  }
  8472  
  8473  // MarshalJSON is the custom marshaler for RestorableSQLDatabasesListResult.
  8474  func (rsdlr RestorableSQLDatabasesListResult) MarshalJSON() ([]byte, error) {
  8475  	objectMap := make(map[string]interface{})
  8476  	return json.Marshal(objectMap)
  8477  }
  8478  
  8479  // RestorableSQLResourcesListResult the List operation response, that contains the restorable SQL
  8480  // resources.
  8481  type RestorableSQLResourcesListResult struct {
  8482  	autorest.Response `json:"-"`
  8483  	// Value - READ-ONLY; List of restorable SQL resources, including the database and collection names.
  8484  	Value *[]DatabaseRestoreResource `json:"value,omitempty"`
  8485  }
  8486  
  8487  // MarshalJSON is the custom marshaler for RestorableSQLResourcesListResult.
  8488  func (rsrlr RestorableSQLResourcesListResult) MarshalJSON() ([]byte, error) {
  8489  	objectMap := make(map[string]interface{})
  8490  	return json.Marshal(objectMap)
  8491  }
  8492  
  8493  // RestoreParameters parameters to indicate the information about the restore.
  8494  type RestoreParameters struct {
  8495  	// RestoreMode - Describes the mode of the restore. Possible values include: 'RestoreModePointInTime'
  8496  	RestoreMode RestoreMode `json:"restoreMode,omitempty"`
  8497  	// RestoreSource - The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}
  8498  	RestoreSource *string `json:"restoreSource,omitempty"`
  8499  	// RestoreTimestampInUtc - Time to which the account has to be restored (ISO-8601 format).
  8500  	RestoreTimestampInUtc *date.Time `json:"restoreTimestampInUtc,omitempty"`
  8501  	// DatabasesToRestore - List of specific databases available for restore.
  8502  	DatabasesToRestore *[]DatabaseRestoreResource `json:"databasesToRestore,omitempty"`
  8503  }
  8504  
  8505  // RestoreReqeustDatabaseAccountCreateUpdateProperties properties to restore Azure Cosmos DB database
  8506  // account.
  8507  type RestoreReqeustDatabaseAccountCreateUpdateProperties struct {
  8508  	// RestoreParameters - Parameters to indicate the information about the restore.
  8509  	RestoreParameters *RestoreParameters `json:"restoreParameters,omitempty"`
  8510  	// ConsistencyPolicy - The consistency policy for the Cosmos DB account.
  8511  	ConsistencyPolicy *ConsistencyPolicy `json:"consistencyPolicy,omitempty"`
  8512  	// Locations - An array that contains the georeplication locations enabled for the Cosmos DB account.
  8513  	Locations *[]Location `json:"locations,omitempty"`
  8514  	// DatabaseAccountOfferType - The offer type for the database
  8515  	DatabaseAccountOfferType *string `json:"databaseAccountOfferType,omitempty"`
  8516  	// IPRules - List of IpRules.
  8517  	IPRules *[]IPAddressOrRange `json:"ipRules,omitempty"`
  8518  	// IsVirtualNetworkFilterEnabled - Flag to indicate whether to enable/disable Virtual Network ACL rules.
  8519  	IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty"`
  8520  	// EnableAutomaticFailover - Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account.
  8521  	EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty"`
  8522  	// Capabilities - List of Cosmos DB capabilities for the account
  8523  	Capabilities *[]Capability `json:"capabilities,omitempty"`
  8524  	// VirtualNetworkRules - List of Virtual Network ACL rules configured for the Cosmos DB account.
  8525  	VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"`
  8526  	// EnableMultipleWriteLocations - Enables the account to write in multiple locations
  8527  	EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"`
  8528  	// EnableCassandraConnector - Enables the cassandra connector on the Cosmos DB C* account
  8529  	EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"`
  8530  	// ConnectorOffer - The cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'ConnectorOfferSmall'
  8531  	ConnectorOffer ConnectorOffer `json:"connectorOffer,omitempty"`
  8532  	// DisableKeyBasedMetadataWriteAccess - Disable write operations on metadata resources (databases, containers, throughput) via account keys
  8533  	DisableKeyBasedMetadataWriteAccess *bool `json:"disableKeyBasedMetadataWriteAccess,omitempty"`
  8534  	// KeyVaultKeyURI - The URI of the key vault
  8535  	KeyVaultKeyURI *string `json:"keyVaultKeyUri,omitempty"`
  8536  	// DefaultIdentity - The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more.
  8537  	DefaultIdentity *string `json:"defaultIdentity,omitempty"`
  8538  	// PublicNetworkAccess - Whether requests from Public Network are allowed. Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled'
  8539  	PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`
  8540  	// EnableFreeTier - Flag to indicate whether Free Tier is enabled.
  8541  	EnableFreeTier *bool `json:"enableFreeTier,omitempty"`
  8542  	// APIProperties - API specific properties. Currently, supported only for MongoDB API.
  8543  	APIProperties *APIProperties `json:"apiProperties,omitempty"`
  8544  	// EnableAnalyticalStorage - Flag to indicate whether to enable storage analytics.
  8545  	EnableAnalyticalStorage *bool `json:"enableAnalyticalStorage,omitempty"`
  8546  	// BackupPolicy - The object representing the policy for taking backups on an account.
  8547  	BackupPolicy BasicBackupPolicy `json:"backupPolicy,omitempty"`
  8548  	// Cors - The CORS policy for the Cosmos DB database account.
  8549  	Cors *[]CorsPolicy `json:"cors,omitempty"`
  8550  	// NetworkACLBypass - Indicates what services are allowed to bypass firewall checks. Possible values include: 'NetworkACLBypassNone', 'NetworkACLBypassAzureServices'
  8551  	NetworkACLBypass NetworkACLBypass `json:"networkAclBypass,omitempty"`
  8552  	// NetworkACLBypassResourceIds - An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account.
  8553  	NetworkACLBypassResourceIds *[]string `json:"networkAclBypassResourceIds,omitempty"`
  8554  	// CreateMode - Possible values include: 'CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDatabaseAccountCreateUpdateProperties', 'CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDefault', 'CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeRestore'
  8555  	CreateMode CreateModeBasicDatabaseAccountCreateUpdateProperties `json:"createMode,omitempty"`
  8556  }
  8557  
  8558  // MarshalJSON is the custom marshaler for RestoreReqeustDatabaseAccountCreateUpdateProperties.
  8559  func (rrdacup RestoreReqeustDatabaseAccountCreateUpdateProperties) MarshalJSON() ([]byte, error) {
  8560  	rrdacup.CreateMode = CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeRestore
  8561  	objectMap := make(map[string]interface{})
  8562  	if rrdacup.RestoreParameters != nil {
  8563  		objectMap["restoreParameters"] = rrdacup.RestoreParameters
  8564  	}
  8565  	if rrdacup.ConsistencyPolicy != nil {
  8566  		objectMap["consistencyPolicy"] = rrdacup.ConsistencyPolicy
  8567  	}
  8568  	if rrdacup.Locations != nil {
  8569  		objectMap["locations"] = rrdacup.Locations
  8570  	}
  8571  	if rrdacup.DatabaseAccountOfferType != nil {
  8572  		objectMap["databaseAccountOfferType"] = rrdacup.DatabaseAccountOfferType
  8573  	}
  8574  	if rrdacup.IPRules != nil {
  8575  		objectMap["ipRules"] = rrdacup.IPRules
  8576  	}
  8577  	if rrdacup.IsVirtualNetworkFilterEnabled != nil {
  8578  		objectMap["isVirtualNetworkFilterEnabled"] = rrdacup.IsVirtualNetworkFilterEnabled
  8579  	}
  8580  	if rrdacup.EnableAutomaticFailover != nil {
  8581  		objectMap["enableAutomaticFailover"] = rrdacup.EnableAutomaticFailover
  8582  	}
  8583  	if rrdacup.Capabilities != nil {
  8584  		objectMap["capabilities"] = rrdacup.Capabilities
  8585  	}
  8586  	if rrdacup.VirtualNetworkRules != nil {
  8587  		objectMap["virtualNetworkRules"] = rrdacup.VirtualNetworkRules
  8588  	}
  8589  	if rrdacup.EnableMultipleWriteLocations != nil {
  8590  		objectMap["enableMultipleWriteLocations"] = rrdacup.EnableMultipleWriteLocations
  8591  	}
  8592  	if rrdacup.EnableCassandraConnector != nil {
  8593  		objectMap["enableCassandraConnector"] = rrdacup.EnableCassandraConnector
  8594  	}
  8595  	if rrdacup.ConnectorOffer != "" {
  8596  		objectMap["connectorOffer"] = rrdacup.ConnectorOffer
  8597  	}
  8598  	if rrdacup.DisableKeyBasedMetadataWriteAccess != nil {
  8599  		objectMap["disableKeyBasedMetadataWriteAccess"] = rrdacup.DisableKeyBasedMetadataWriteAccess
  8600  	}
  8601  	if rrdacup.KeyVaultKeyURI != nil {
  8602  		objectMap["keyVaultKeyUri"] = rrdacup.KeyVaultKeyURI
  8603  	}
  8604  	if rrdacup.DefaultIdentity != nil {
  8605  		objectMap["defaultIdentity"] = rrdacup.DefaultIdentity
  8606  	}
  8607  	if rrdacup.PublicNetworkAccess != "" {
  8608  		objectMap["publicNetworkAccess"] = rrdacup.PublicNetworkAccess
  8609  	}
  8610  	if rrdacup.EnableFreeTier != nil {
  8611  		objectMap["enableFreeTier"] = rrdacup.EnableFreeTier
  8612  	}
  8613  	if rrdacup.APIProperties != nil {
  8614  		objectMap["apiProperties"] = rrdacup.APIProperties
  8615  	}
  8616  	if rrdacup.EnableAnalyticalStorage != nil {
  8617  		objectMap["enableAnalyticalStorage"] = rrdacup.EnableAnalyticalStorage
  8618  	}
  8619  	objectMap["backupPolicy"] = rrdacup.BackupPolicy
  8620  	if rrdacup.Cors != nil {
  8621  		objectMap["cors"] = rrdacup.Cors
  8622  	}
  8623  	if rrdacup.NetworkACLBypass != "" {
  8624  		objectMap["networkAclBypass"] = rrdacup.NetworkACLBypass
  8625  	}
  8626  	if rrdacup.NetworkACLBypassResourceIds != nil {
  8627  		objectMap["networkAclBypassResourceIds"] = rrdacup.NetworkACLBypassResourceIds
  8628  	}
  8629  	if rrdacup.CreateMode != "" {
  8630  		objectMap["createMode"] = rrdacup.CreateMode
  8631  	}
  8632  	return json.Marshal(objectMap)
  8633  }
  8634  
  8635  // AsDefaultRequestDatabaseAccountCreateUpdateProperties is the BasicDatabaseAccountCreateUpdateProperties implementation for RestoreReqeustDatabaseAccountCreateUpdateProperties.
  8636  func (rrdacup RestoreReqeustDatabaseAccountCreateUpdateProperties) AsDefaultRequestDatabaseAccountCreateUpdateProperties() (*DefaultRequestDatabaseAccountCreateUpdateProperties, bool) {
  8637  	return nil, false
  8638  }
  8639  
  8640  // AsRestoreReqeustDatabaseAccountCreateUpdateProperties is the BasicDatabaseAccountCreateUpdateProperties implementation for RestoreReqeustDatabaseAccountCreateUpdateProperties.
  8641  func (rrdacup RestoreReqeustDatabaseAccountCreateUpdateProperties) AsRestoreReqeustDatabaseAccountCreateUpdateProperties() (*RestoreReqeustDatabaseAccountCreateUpdateProperties, bool) {
  8642  	return &rrdacup, true
  8643  }
  8644  
  8645  // AsDatabaseAccountCreateUpdateProperties is the BasicDatabaseAccountCreateUpdateProperties implementation for RestoreReqeustDatabaseAccountCreateUpdateProperties.
  8646  func (rrdacup RestoreReqeustDatabaseAccountCreateUpdateProperties) AsDatabaseAccountCreateUpdateProperties() (*DatabaseAccountCreateUpdateProperties, bool) {
  8647  	return nil, false
  8648  }
  8649  
  8650  // AsBasicDatabaseAccountCreateUpdateProperties is the BasicDatabaseAccountCreateUpdateProperties implementation for RestoreReqeustDatabaseAccountCreateUpdateProperties.
  8651  func (rrdacup RestoreReqeustDatabaseAccountCreateUpdateProperties) AsBasicDatabaseAccountCreateUpdateProperties() (BasicDatabaseAccountCreateUpdateProperties, bool) {
  8652  	return &rrdacup, true
  8653  }
  8654  
  8655  // UnmarshalJSON is the custom unmarshaler for RestoreReqeustDatabaseAccountCreateUpdateProperties struct.
  8656  func (rrdacup *RestoreReqeustDatabaseAccountCreateUpdateProperties) UnmarshalJSON(body []byte) error {
  8657  	var m map[string]*json.RawMessage
  8658  	err := json.Unmarshal(body, &m)
  8659  	if err != nil {
  8660  		return err
  8661  	}
  8662  	for k, v := range m {
  8663  		switch k {
  8664  		case "restoreParameters":
  8665  			if v != nil {
  8666  				var restoreParameters RestoreParameters
  8667  				err = json.Unmarshal(*v, &restoreParameters)
  8668  				if err != nil {
  8669  					return err
  8670  				}
  8671  				rrdacup.RestoreParameters = &restoreParameters
  8672  			}
  8673  		case "consistencyPolicy":
  8674  			if v != nil {
  8675  				var consistencyPolicy ConsistencyPolicy
  8676  				err = json.Unmarshal(*v, &consistencyPolicy)
  8677  				if err != nil {
  8678  					return err
  8679  				}
  8680  				rrdacup.ConsistencyPolicy = &consistencyPolicy
  8681  			}
  8682  		case "locations":
  8683  			if v != nil {
  8684  				var locations []Location
  8685  				err = json.Unmarshal(*v, &locations)
  8686  				if err != nil {
  8687  					return err
  8688  				}
  8689  				rrdacup.Locations = &locations
  8690  			}
  8691  		case "databaseAccountOfferType":
  8692  			if v != nil {
  8693  				var databaseAccountOfferType string
  8694  				err = json.Unmarshal(*v, &databaseAccountOfferType)
  8695  				if err != nil {
  8696  					return err
  8697  				}
  8698  				rrdacup.DatabaseAccountOfferType = &databaseAccountOfferType
  8699  			}
  8700  		case "ipRules":
  8701  			if v != nil {
  8702  				var IPRules []IPAddressOrRange
  8703  				err = json.Unmarshal(*v, &IPRules)
  8704  				if err != nil {
  8705  					return err
  8706  				}
  8707  				rrdacup.IPRules = &IPRules
  8708  			}
  8709  		case "isVirtualNetworkFilterEnabled":
  8710  			if v != nil {
  8711  				var isVirtualNetworkFilterEnabled bool
  8712  				err = json.Unmarshal(*v, &isVirtualNetworkFilterEnabled)
  8713  				if err != nil {
  8714  					return err
  8715  				}
  8716  				rrdacup.IsVirtualNetworkFilterEnabled = &isVirtualNetworkFilterEnabled
  8717  			}
  8718  		case "enableAutomaticFailover":
  8719  			if v != nil {
  8720  				var enableAutomaticFailover bool
  8721  				err = json.Unmarshal(*v, &enableAutomaticFailover)
  8722  				if err != nil {
  8723  					return err
  8724  				}
  8725  				rrdacup.EnableAutomaticFailover = &enableAutomaticFailover
  8726  			}
  8727  		case "capabilities":
  8728  			if v != nil {
  8729  				var capabilities []Capability
  8730  				err = json.Unmarshal(*v, &capabilities)
  8731  				if err != nil {
  8732  					return err
  8733  				}
  8734  				rrdacup.Capabilities = &capabilities
  8735  			}
  8736  		case "virtualNetworkRules":
  8737  			if v != nil {
  8738  				var virtualNetworkRules []VirtualNetworkRule
  8739  				err = json.Unmarshal(*v, &virtualNetworkRules)
  8740  				if err != nil {
  8741  					return err
  8742  				}
  8743  				rrdacup.VirtualNetworkRules = &virtualNetworkRules
  8744  			}
  8745  		case "enableMultipleWriteLocations":
  8746  			if v != nil {
  8747  				var enableMultipleWriteLocations bool
  8748  				err = json.Unmarshal(*v, &enableMultipleWriteLocations)
  8749  				if err != nil {
  8750  					return err
  8751  				}
  8752  				rrdacup.EnableMultipleWriteLocations = &enableMultipleWriteLocations
  8753  			}
  8754  		case "enableCassandraConnector":
  8755  			if v != nil {
  8756  				var enableCassandraConnector bool
  8757  				err = json.Unmarshal(*v, &enableCassandraConnector)
  8758  				if err != nil {
  8759  					return err
  8760  				}
  8761  				rrdacup.EnableCassandraConnector = &enableCassandraConnector
  8762  			}
  8763  		case "connectorOffer":
  8764  			if v != nil {
  8765  				var connectorOffer ConnectorOffer
  8766  				err = json.Unmarshal(*v, &connectorOffer)
  8767  				if err != nil {
  8768  					return err
  8769  				}
  8770  				rrdacup.ConnectorOffer = connectorOffer
  8771  			}
  8772  		case "disableKeyBasedMetadataWriteAccess":
  8773  			if v != nil {
  8774  				var disableKeyBasedMetadataWriteAccess bool
  8775  				err = json.Unmarshal(*v, &disableKeyBasedMetadataWriteAccess)
  8776  				if err != nil {
  8777  					return err
  8778  				}
  8779  				rrdacup.DisableKeyBasedMetadataWriteAccess = &disableKeyBasedMetadataWriteAccess
  8780  			}
  8781  		case "keyVaultKeyUri":
  8782  			if v != nil {
  8783  				var keyVaultKeyURI string
  8784  				err = json.Unmarshal(*v, &keyVaultKeyURI)
  8785  				if err != nil {
  8786  					return err
  8787  				}
  8788  				rrdacup.KeyVaultKeyURI = &keyVaultKeyURI
  8789  			}
  8790  		case "defaultIdentity":
  8791  			if v != nil {
  8792  				var defaultIdentity string
  8793  				err = json.Unmarshal(*v, &defaultIdentity)
  8794  				if err != nil {
  8795  					return err
  8796  				}
  8797  				rrdacup.DefaultIdentity = &defaultIdentity
  8798  			}
  8799  		case "publicNetworkAccess":
  8800  			if v != nil {
  8801  				var publicNetworkAccess PublicNetworkAccess
  8802  				err = json.Unmarshal(*v, &publicNetworkAccess)
  8803  				if err != nil {
  8804  					return err
  8805  				}
  8806  				rrdacup.PublicNetworkAccess = publicNetworkAccess
  8807  			}
  8808  		case "enableFreeTier":
  8809  			if v != nil {
  8810  				var enableFreeTier bool
  8811  				err = json.Unmarshal(*v, &enableFreeTier)
  8812  				if err != nil {
  8813  					return err
  8814  				}
  8815  				rrdacup.EnableFreeTier = &enableFreeTier
  8816  			}
  8817  		case "apiProperties":
  8818  			if v != nil {
  8819  				var APIProperties APIProperties
  8820  				err = json.Unmarshal(*v, &APIProperties)
  8821  				if err != nil {
  8822  					return err
  8823  				}
  8824  				rrdacup.APIProperties = &APIProperties
  8825  			}
  8826  		case "enableAnalyticalStorage":
  8827  			if v != nil {
  8828  				var enableAnalyticalStorage bool
  8829  				err = json.Unmarshal(*v, &enableAnalyticalStorage)
  8830  				if err != nil {
  8831  					return err
  8832  				}
  8833  				rrdacup.EnableAnalyticalStorage = &enableAnalyticalStorage
  8834  			}
  8835  		case "backupPolicy":
  8836  			if v != nil {
  8837  				backupPolicy, err := unmarshalBasicBackupPolicy(*v)
  8838  				if err != nil {
  8839  					return err
  8840  				}
  8841  				rrdacup.BackupPolicy = backupPolicy
  8842  			}
  8843  		case "cors":
  8844  			if v != nil {
  8845  				var cors []CorsPolicy
  8846  				err = json.Unmarshal(*v, &cors)
  8847  				if err != nil {
  8848  					return err
  8849  				}
  8850  				rrdacup.Cors = &cors
  8851  			}
  8852  		case "networkAclBypass":
  8853  			if v != nil {
  8854  				var networkACLBypass NetworkACLBypass
  8855  				err = json.Unmarshal(*v, &networkACLBypass)
  8856  				if err != nil {
  8857  					return err
  8858  				}
  8859  				rrdacup.NetworkACLBypass = networkACLBypass
  8860  			}
  8861  		case "networkAclBypassResourceIds":
  8862  			if v != nil {
  8863  				var networkACLBypassResourceIds []string
  8864  				err = json.Unmarshal(*v, &networkACLBypassResourceIds)
  8865  				if err != nil {
  8866  					return err
  8867  				}
  8868  				rrdacup.NetworkACLBypassResourceIds = &networkACLBypassResourceIds
  8869  			}
  8870  		case "createMode":
  8871  			if v != nil {
  8872  				var createMode CreateModeBasicDatabaseAccountCreateUpdateProperties
  8873  				err = json.Unmarshal(*v, &createMode)
  8874  				if err != nil {
  8875  					return err
  8876  				}
  8877  				rrdacup.CreateMode = createMode
  8878  			}
  8879  		}
  8880  	}
  8881  
  8882  	return nil
  8883  }
  8884  
  8885  // SeedNode ...
  8886  type SeedNode struct {
  8887  	// IPAddress - IP address of this seed node.
  8888  	IPAddress *string `json:"ipAddress,omitempty"`
  8889  }
  8890  
  8891  // ServiceCreateFuture an abstraction for monitoring and retrieving the results of a long-running
  8892  // operation.
  8893  type ServiceCreateFuture struct {
  8894  	azure.FutureAPI
  8895  	// Result returns the result of the asynchronous operation.
  8896  	// If the operation has not completed it will return an error.
  8897  	Result func(ServiceClient) (ServiceResource, error)
  8898  }
  8899  
  8900  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8901  func (future *ServiceCreateFuture) UnmarshalJSON(body []byte) error {
  8902  	var azFuture azure.Future
  8903  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8904  		return err
  8905  	}
  8906  	future.FutureAPI = &azFuture
  8907  	future.Result = future.result
  8908  	return nil
  8909  }
  8910  
  8911  // result is the default implementation for ServiceCreateFuture.Result.
  8912  func (future *ServiceCreateFuture) result(client ServiceClient) (sr ServiceResource, err error) {
  8913  	var done bool
  8914  	done, err = future.DoneWithContext(context.Background(), client)
  8915  	if err != nil {
  8916  		err = autorest.NewErrorWithError(err, "documentdb.ServiceCreateFuture", "Result", future.Response(), "Polling failure")
  8917  		return
  8918  	}
  8919  	if !done {
  8920  		sr.Response.Response = future.Response()
  8921  		err = azure.NewAsyncOpIncompleteError("documentdb.ServiceCreateFuture")
  8922  		return
  8923  	}
  8924  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  8925  	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
  8926  		sr, err = client.CreateResponder(sr.Response.Response)
  8927  		if err != nil {
  8928  			err = autorest.NewErrorWithError(err, "documentdb.ServiceCreateFuture", "Result", sr.Response.Response, "Failure responding to request")
  8929  		}
  8930  	}
  8931  	return
  8932  }
  8933  
  8934  // ServiceDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
  8935  // operation.
  8936  type ServiceDeleteFuture struct {
  8937  	azure.FutureAPI
  8938  	// Result returns the result of the asynchronous operation.
  8939  	// If the operation has not completed it will return an error.
  8940  	Result func(ServiceClient) (autorest.Response, error)
  8941  }
  8942  
  8943  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8944  func (future *ServiceDeleteFuture) UnmarshalJSON(body []byte) error {
  8945  	var azFuture azure.Future
  8946  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8947  		return err
  8948  	}
  8949  	future.FutureAPI = &azFuture
  8950  	future.Result = future.result
  8951  	return nil
  8952  }
  8953  
  8954  // result is the default implementation for ServiceDeleteFuture.Result.
  8955  func (future *ServiceDeleteFuture) result(client ServiceClient) (ar autorest.Response, err error) {
  8956  	var done bool
  8957  	done, err = future.DoneWithContext(context.Background(), client)
  8958  	if err != nil {
  8959  		err = autorest.NewErrorWithError(err, "documentdb.ServiceDeleteFuture", "Result", future.Response(), "Polling failure")
  8960  		return
  8961  	}
  8962  	if !done {
  8963  		ar.Response = future.Response()
  8964  		err = azure.NewAsyncOpIncompleteError("documentdb.ServiceDeleteFuture")
  8965  		return
  8966  	}
  8967  	ar.Response = future.Response()
  8968  	return
  8969  }
  8970  
  8971  // ServiceResource properties for the database account.
  8972  type ServiceResource struct {
  8973  	autorest.Response `json:"-"`
  8974  	Properties        BasicServiceResourceProperties `json:"properties,omitempty"`
  8975  	// ID - READ-ONLY; The unique resource identifier of the database account.
  8976  	ID *string `json:"id,omitempty"`
  8977  	// Name - READ-ONLY; The name of the database account.
  8978  	Name *string `json:"name,omitempty"`
  8979  	// Type - READ-ONLY; The type of Azure resource.
  8980  	Type *string `json:"type,omitempty"`
  8981  }
  8982  
  8983  // MarshalJSON is the custom marshaler for ServiceResource.
  8984  func (sr ServiceResource) MarshalJSON() ([]byte, error) {
  8985  	objectMap := make(map[string]interface{})
  8986  	objectMap["properties"] = sr.Properties
  8987  	return json.Marshal(objectMap)
  8988  }
  8989  
  8990  // UnmarshalJSON is the custom unmarshaler for ServiceResource struct.
  8991  func (sr *ServiceResource) UnmarshalJSON(body []byte) error {
  8992  	var m map[string]*json.RawMessage
  8993  	err := json.Unmarshal(body, &m)
  8994  	if err != nil {
  8995  		return err
  8996  	}
  8997  	for k, v := range m {
  8998  		switch k {
  8999  		case "properties":
  9000  			if v != nil {
  9001  				properties, err := unmarshalBasicServiceResourceProperties(*v)
  9002  				if err != nil {
  9003  					return err
  9004  				}
  9005  				sr.Properties = properties
  9006  			}
  9007  		case "id":
  9008  			if v != nil {
  9009  				var ID string
  9010  				err = json.Unmarshal(*v, &ID)
  9011  				if err != nil {
  9012  					return err
  9013  				}
  9014  				sr.ID = &ID
  9015  			}
  9016  		case "name":
  9017  			if v != nil {
  9018  				var name string
  9019  				err = json.Unmarshal(*v, &name)
  9020  				if err != nil {
  9021  					return err
  9022  				}
  9023  				sr.Name = &name
  9024  			}
  9025  		case "type":
  9026  			if v != nil {
  9027  				var typeVar string
  9028  				err = json.Unmarshal(*v, &typeVar)
  9029  				if err != nil {
  9030  					return err
  9031  				}
  9032  				sr.Type = &typeVar
  9033  			}
  9034  		}
  9035  	}
  9036  
  9037  	return nil
  9038  }
  9039  
  9040  // ServiceResourceListResult the List operation response, that contains the Service Resource and their
  9041  // properties.
  9042  type ServiceResourceListResult struct {
  9043  	autorest.Response `json:"-"`
  9044  	// Value - READ-ONLY; List of Service Resource and their properties.
  9045  	Value *[]ServiceResource `json:"value,omitempty"`
  9046  }
  9047  
  9048  // MarshalJSON is the custom marshaler for ServiceResourceListResult.
  9049  func (srlr ServiceResourceListResult) MarshalJSON() ([]byte, error) {
  9050  	objectMap := make(map[string]interface{})
  9051  	return json.Marshal(objectMap)
  9052  }
  9053  
  9054  // BasicServiceResourceProperties services response resource.
  9055  type BasicServiceResourceProperties interface {
  9056  	AsDataTransferServiceResourceProperties() (*DataTransferServiceResourceProperties, bool)
  9057  	AsSQLDedicatedGatewayServiceResourceProperties() (*SQLDedicatedGatewayServiceResourceProperties, bool)
  9058  	AsServiceResourceProperties() (*ServiceResourceProperties, bool)
  9059  }
  9060  
  9061  // ServiceResourceProperties services response resource.
  9062  type ServiceResourceProperties struct {
  9063  	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
  9064  	AdditionalProperties map[string]interface{} `json:""`
  9065  	// CreationTime - READ-ONLY; Time of the last state change (ISO-8601 format).
  9066  	CreationTime *date.Time `json:"creationTime,omitempty"`
  9067  	// InstanceSize - Possible values include: 'ServiceSizeCosmosD4s', 'ServiceSizeCosmosD8s', 'ServiceSizeCosmosD16s'
  9068  	InstanceSize ServiceSize `json:"instanceSize,omitempty"`
  9069  	// InstanceCount - Instance count for the service.
  9070  	InstanceCount *int32 `json:"instanceCount,omitempty"`
  9071  	// Status - READ-ONLY; Possible values include: 'ServiceStatusCreating', 'ServiceStatusRunning', 'ServiceStatusUpdating', 'ServiceStatusDeleting', 'ServiceStatusError', 'ServiceStatusStopped'
  9072  	Status ServiceStatus `json:"status,omitempty"`
  9073  	// ServiceType - Possible values include: 'ServiceTypeBasicServiceResourcePropertiesServiceTypeServiceResourceProperties', 'ServiceTypeBasicServiceResourcePropertiesServiceTypeDataTransferServiceResourceProperties', 'ServiceTypeBasicServiceResourcePropertiesServiceTypeSQLDedicatedGatewayServiceResourceProperties'
  9074  	ServiceType ServiceTypeBasicServiceResourceProperties `json:"serviceType,omitempty"`
  9075  }
  9076  
  9077  func unmarshalBasicServiceResourceProperties(body []byte) (BasicServiceResourceProperties, error) {
  9078  	var m map[string]interface{}
  9079  	err := json.Unmarshal(body, &m)
  9080  	if err != nil {
  9081  		return nil, err
  9082  	}
  9083  
  9084  	switch m["serviceType"] {
  9085  	case string(ServiceTypeBasicServiceResourcePropertiesServiceTypeDataTransferServiceResourceProperties):
  9086  		var dtsrp DataTransferServiceResourceProperties
  9087  		err := json.Unmarshal(body, &dtsrp)
  9088  		return dtsrp, err
  9089  	case string(ServiceTypeBasicServiceResourcePropertiesServiceTypeSQLDedicatedGatewayServiceResourceProperties):
  9090  		var sdgsrp SQLDedicatedGatewayServiceResourceProperties
  9091  		err := json.Unmarshal(body, &sdgsrp)
  9092  		return sdgsrp, err
  9093  	default:
  9094  		var srp ServiceResourceProperties
  9095  		err := json.Unmarshal(body, &srp)
  9096  		return srp, err
  9097  	}
  9098  }
  9099  func unmarshalBasicServiceResourcePropertiesArray(body []byte) ([]BasicServiceResourceProperties, error) {
  9100  	var rawMessages []*json.RawMessage
  9101  	err := json.Unmarshal(body, &rawMessages)
  9102  	if err != nil {
  9103  		return nil, err
  9104  	}
  9105  
  9106  	srpArray := make([]BasicServiceResourceProperties, len(rawMessages))
  9107  
  9108  	for index, rawMessage := range rawMessages {
  9109  		srp, err := unmarshalBasicServiceResourceProperties(*rawMessage)
  9110  		if err != nil {
  9111  			return nil, err
  9112  		}
  9113  		srpArray[index] = srp
  9114  	}
  9115  	return srpArray, nil
  9116  }
  9117  
  9118  // MarshalJSON is the custom marshaler for ServiceResourceProperties.
  9119  func (srp ServiceResourceProperties) MarshalJSON() ([]byte, error) {
  9120  	srp.ServiceType = ServiceTypeBasicServiceResourcePropertiesServiceTypeServiceResourceProperties
  9121  	objectMap := make(map[string]interface{})
  9122  	if srp.InstanceSize != "" {
  9123  		objectMap["instanceSize"] = srp.InstanceSize
  9124  	}
  9125  	if srp.InstanceCount != nil {
  9126  		objectMap["instanceCount"] = srp.InstanceCount
  9127  	}
  9128  	if srp.ServiceType != "" {
  9129  		objectMap["serviceType"] = srp.ServiceType
  9130  	}
  9131  	for k, v := range srp.AdditionalProperties {
  9132  		objectMap[k] = v
  9133  	}
  9134  	return json.Marshal(objectMap)
  9135  }
  9136  
  9137  // AsDataTransferServiceResourceProperties is the BasicServiceResourceProperties implementation for ServiceResourceProperties.
  9138  func (srp ServiceResourceProperties) AsDataTransferServiceResourceProperties() (*DataTransferServiceResourceProperties, bool) {
  9139  	return nil, false
  9140  }
  9141  
  9142  // AsSQLDedicatedGatewayServiceResourceProperties is the BasicServiceResourceProperties implementation for ServiceResourceProperties.
  9143  func (srp ServiceResourceProperties) AsSQLDedicatedGatewayServiceResourceProperties() (*SQLDedicatedGatewayServiceResourceProperties, bool) {
  9144  	return nil, false
  9145  }
  9146  
  9147  // AsServiceResourceProperties is the BasicServiceResourceProperties implementation for ServiceResourceProperties.
  9148  func (srp ServiceResourceProperties) AsServiceResourceProperties() (*ServiceResourceProperties, bool) {
  9149  	return &srp, true
  9150  }
  9151  
  9152  // AsBasicServiceResourceProperties is the BasicServiceResourceProperties implementation for ServiceResourceProperties.
  9153  func (srp ServiceResourceProperties) AsBasicServiceResourceProperties() (BasicServiceResourceProperties, bool) {
  9154  	return &srp, true
  9155  }
  9156  
  9157  // UnmarshalJSON is the custom unmarshaler for ServiceResourceProperties struct.
  9158  func (srp *ServiceResourceProperties) UnmarshalJSON(body []byte) error {
  9159  	var m map[string]*json.RawMessage
  9160  	err := json.Unmarshal(body, &m)
  9161  	if err != nil {
  9162  		return err
  9163  	}
  9164  	for k, v := range m {
  9165  		switch k {
  9166  		default:
  9167  			if v != nil {
  9168  				var additionalProperties interface{}
  9169  				err = json.Unmarshal(*v, &additionalProperties)
  9170  				if err != nil {
  9171  					return err
  9172  				}
  9173  				if srp.AdditionalProperties == nil {
  9174  					srp.AdditionalProperties = make(map[string]interface{})
  9175  				}
  9176  				srp.AdditionalProperties[k] = additionalProperties
  9177  			}
  9178  		case "creationTime":
  9179  			if v != nil {
  9180  				var creationTime date.Time
  9181  				err = json.Unmarshal(*v, &creationTime)
  9182  				if err != nil {
  9183  					return err
  9184  				}
  9185  				srp.CreationTime = &creationTime
  9186  			}
  9187  		case "instanceSize":
  9188  			if v != nil {
  9189  				var instanceSize ServiceSize
  9190  				err = json.Unmarshal(*v, &instanceSize)
  9191  				if err != nil {
  9192  					return err
  9193  				}
  9194  				srp.InstanceSize = instanceSize
  9195  			}
  9196  		case "instanceCount":
  9197  			if v != nil {
  9198  				var instanceCount int32
  9199  				err = json.Unmarshal(*v, &instanceCount)
  9200  				if err != nil {
  9201  					return err
  9202  				}
  9203  				srp.InstanceCount = &instanceCount
  9204  			}
  9205  		case "status":
  9206  			if v != nil {
  9207  				var status ServiceStatus
  9208  				err = json.Unmarshal(*v, &status)
  9209  				if err != nil {
  9210  					return err
  9211  				}
  9212  				srp.Status = status
  9213  			}
  9214  		case "serviceType":
  9215  			if v != nil {
  9216  				var serviceType ServiceTypeBasicServiceResourceProperties
  9217  				err = json.Unmarshal(*v, &serviceType)
  9218  				if err != nil {
  9219  					return err
  9220  				}
  9221  				srp.ServiceType = serviceType
  9222  			}
  9223  		}
  9224  	}
  9225  
  9226  	return nil
  9227  }
  9228  
  9229  // SpatialSpec ...
  9230  type SpatialSpec struct {
  9231  	// Path - The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*)
  9232  	Path *string `json:"path,omitempty"`
  9233  	// Types - List of path's spatial type
  9234  	Types *[]SpatialType `json:"types,omitempty"`
  9235  }
  9236  
  9237  // SQLContainerCreateUpdateParameters parameters to create and update Cosmos DB container.
  9238  type SQLContainerCreateUpdateParameters struct {
  9239  	// SQLContainerCreateUpdateProperties - Properties to create and update Azure Cosmos DB container.
  9240  	*SQLContainerCreateUpdateProperties `json:"properties,omitempty"`
  9241  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  9242  	ID *string `json:"id,omitempty"`
  9243  	// Name - READ-ONLY; The name of the ARM resource.
  9244  	Name *string `json:"name,omitempty"`
  9245  	// Type - READ-ONLY; The type of Azure resource.
  9246  	Type *string `json:"type,omitempty"`
  9247  	// Location - The location of the resource group to which the resource belongs.
  9248  	Location *string                 `json:"location,omitempty"`
  9249  	Tags     map[string]*string      `json:"tags"`
  9250  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
  9251  }
  9252  
  9253  // MarshalJSON is the custom marshaler for SQLContainerCreateUpdateParameters.
  9254  func (sccup SQLContainerCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  9255  	objectMap := make(map[string]interface{})
  9256  	if sccup.SQLContainerCreateUpdateProperties != nil {
  9257  		objectMap["properties"] = sccup.SQLContainerCreateUpdateProperties
  9258  	}
  9259  	if sccup.Location != nil {
  9260  		objectMap["location"] = sccup.Location
  9261  	}
  9262  	if sccup.Tags != nil {
  9263  		objectMap["tags"] = sccup.Tags
  9264  	}
  9265  	if sccup.Identity != nil {
  9266  		objectMap["identity"] = sccup.Identity
  9267  	}
  9268  	return json.Marshal(objectMap)
  9269  }
  9270  
  9271  // UnmarshalJSON is the custom unmarshaler for SQLContainerCreateUpdateParameters struct.
  9272  func (sccup *SQLContainerCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  9273  	var m map[string]*json.RawMessage
  9274  	err := json.Unmarshal(body, &m)
  9275  	if err != nil {
  9276  		return err
  9277  	}
  9278  	for k, v := range m {
  9279  		switch k {
  9280  		case "properties":
  9281  			if v != nil {
  9282  				var SQLContainerCreateUpdateProperties SQLContainerCreateUpdateProperties
  9283  				err = json.Unmarshal(*v, &SQLContainerCreateUpdateProperties)
  9284  				if err != nil {
  9285  					return err
  9286  				}
  9287  				sccup.SQLContainerCreateUpdateProperties = &SQLContainerCreateUpdateProperties
  9288  			}
  9289  		case "id":
  9290  			if v != nil {
  9291  				var ID string
  9292  				err = json.Unmarshal(*v, &ID)
  9293  				if err != nil {
  9294  					return err
  9295  				}
  9296  				sccup.ID = &ID
  9297  			}
  9298  		case "name":
  9299  			if v != nil {
  9300  				var name string
  9301  				err = json.Unmarshal(*v, &name)
  9302  				if err != nil {
  9303  					return err
  9304  				}
  9305  				sccup.Name = &name
  9306  			}
  9307  		case "type":
  9308  			if v != nil {
  9309  				var typeVar string
  9310  				err = json.Unmarshal(*v, &typeVar)
  9311  				if err != nil {
  9312  					return err
  9313  				}
  9314  				sccup.Type = &typeVar
  9315  			}
  9316  		case "location":
  9317  			if v != nil {
  9318  				var location string
  9319  				err = json.Unmarshal(*v, &location)
  9320  				if err != nil {
  9321  					return err
  9322  				}
  9323  				sccup.Location = &location
  9324  			}
  9325  		case "tags":
  9326  			if v != nil {
  9327  				var tags map[string]*string
  9328  				err = json.Unmarshal(*v, &tags)
  9329  				if err != nil {
  9330  					return err
  9331  				}
  9332  				sccup.Tags = tags
  9333  			}
  9334  		case "identity":
  9335  			if v != nil {
  9336  				var identity ManagedServiceIdentity
  9337  				err = json.Unmarshal(*v, &identity)
  9338  				if err != nil {
  9339  					return err
  9340  				}
  9341  				sccup.Identity = &identity
  9342  			}
  9343  		}
  9344  	}
  9345  
  9346  	return nil
  9347  }
  9348  
  9349  // SQLContainerCreateUpdateProperties properties to create and update Azure Cosmos DB container.
  9350  type SQLContainerCreateUpdateProperties struct {
  9351  	// Resource - The standard JSON format of a container
  9352  	Resource *SQLContainerResource `json:"resource,omitempty"`
  9353  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
  9354  	Options *CreateUpdateOptions `json:"options,omitempty"`
  9355  }
  9356  
  9357  // SQLContainerGetProperties the properties of an Azure Cosmos DB container
  9358  type SQLContainerGetProperties struct {
  9359  	Resource *SQLContainerGetPropertiesResource `json:"resource,omitempty"`
  9360  	Options  *SQLContainerGetPropertiesOptions  `json:"options,omitempty"`
  9361  }
  9362  
  9363  // SQLContainerGetPropertiesOptions ...
  9364  type SQLContainerGetPropertiesOptions struct {
  9365  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
  9366  	Throughput *int32 `json:"throughput,omitempty"`
  9367  	// AutoscaleSettings - Specifies the Autoscale settings.
  9368  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  9369  }
  9370  
  9371  // SQLContainerGetPropertiesResource ...
  9372  type SQLContainerGetPropertiesResource struct {
  9373  	// ID - Name of the Cosmos DB SQL container
  9374  	ID *string `json:"id,omitempty"`
  9375  	// IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container
  9376  	IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"`
  9377  	// PartitionKey - The configuration of the partition key to be used for partitioning data into multiple partitions
  9378  	PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"`
  9379  	// DefaultTTL - Default time to live
  9380  	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
  9381  	// UniqueKeyPolicy - The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
  9382  	UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"`
  9383  	// ConflictResolutionPolicy - The conflict resolution policy for the container.
  9384  	ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"`
  9385  	// AnalyticalStorageTTL - Analytical TTL.
  9386  	AnalyticalStorageTTL *int64 `json:"analyticalStorageTtl,omitempty"`
  9387  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  9388  	Rid *string `json:"_rid,omitempty"`
  9389  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  9390  	Ts *float64 `json:"_ts,omitempty"`
  9391  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  9392  	Etag *string `json:"_etag,omitempty"`
  9393  }
  9394  
  9395  // MarshalJSON is the custom marshaler for SQLContainerGetPropertiesResource.
  9396  func (scgp SQLContainerGetPropertiesResource) MarshalJSON() ([]byte, error) {
  9397  	objectMap := make(map[string]interface{})
  9398  	if scgp.ID != nil {
  9399  		objectMap["id"] = scgp.ID
  9400  	}
  9401  	if scgp.IndexingPolicy != nil {
  9402  		objectMap["indexingPolicy"] = scgp.IndexingPolicy
  9403  	}
  9404  	if scgp.PartitionKey != nil {
  9405  		objectMap["partitionKey"] = scgp.PartitionKey
  9406  	}
  9407  	if scgp.DefaultTTL != nil {
  9408  		objectMap["defaultTtl"] = scgp.DefaultTTL
  9409  	}
  9410  	if scgp.UniqueKeyPolicy != nil {
  9411  		objectMap["uniqueKeyPolicy"] = scgp.UniqueKeyPolicy
  9412  	}
  9413  	if scgp.ConflictResolutionPolicy != nil {
  9414  		objectMap["conflictResolutionPolicy"] = scgp.ConflictResolutionPolicy
  9415  	}
  9416  	if scgp.AnalyticalStorageTTL != nil {
  9417  		objectMap["analyticalStorageTtl"] = scgp.AnalyticalStorageTTL
  9418  	}
  9419  	return json.Marshal(objectMap)
  9420  }
  9421  
  9422  // SQLContainerGetResults an Azure Cosmos DB container.
  9423  type SQLContainerGetResults struct {
  9424  	autorest.Response `json:"-"`
  9425  	// SQLContainerGetProperties - The properties of an Azure Cosmos DB container
  9426  	*SQLContainerGetProperties `json:"properties,omitempty"`
  9427  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  9428  	ID *string `json:"id,omitempty"`
  9429  	// Name - READ-ONLY; The name of the ARM resource.
  9430  	Name *string `json:"name,omitempty"`
  9431  	// Type - READ-ONLY; The type of Azure resource.
  9432  	Type *string `json:"type,omitempty"`
  9433  	// Location - The location of the resource group to which the resource belongs.
  9434  	Location *string                 `json:"location,omitempty"`
  9435  	Tags     map[string]*string      `json:"tags"`
  9436  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
  9437  }
  9438  
  9439  // MarshalJSON is the custom marshaler for SQLContainerGetResults.
  9440  func (scgr SQLContainerGetResults) MarshalJSON() ([]byte, error) {
  9441  	objectMap := make(map[string]interface{})
  9442  	if scgr.SQLContainerGetProperties != nil {
  9443  		objectMap["properties"] = scgr.SQLContainerGetProperties
  9444  	}
  9445  	if scgr.Location != nil {
  9446  		objectMap["location"] = scgr.Location
  9447  	}
  9448  	if scgr.Tags != nil {
  9449  		objectMap["tags"] = scgr.Tags
  9450  	}
  9451  	if scgr.Identity != nil {
  9452  		objectMap["identity"] = scgr.Identity
  9453  	}
  9454  	return json.Marshal(objectMap)
  9455  }
  9456  
  9457  // UnmarshalJSON is the custom unmarshaler for SQLContainerGetResults struct.
  9458  func (scgr *SQLContainerGetResults) UnmarshalJSON(body []byte) error {
  9459  	var m map[string]*json.RawMessage
  9460  	err := json.Unmarshal(body, &m)
  9461  	if err != nil {
  9462  		return err
  9463  	}
  9464  	for k, v := range m {
  9465  		switch k {
  9466  		case "properties":
  9467  			if v != nil {
  9468  				var SQLContainerGetProperties SQLContainerGetProperties
  9469  				err = json.Unmarshal(*v, &SQLContainerGetProperties)
  9470  				if err != nil {
  9471  					return err
  9472  				}
  9473  				scgr.SQLContainerGetProperties = &SQLContainerGetProperties
  9474  			}
  9475  		case "id":
  9476  			if v != nil {
  9477  				var ID string
  9478  				err = json.Unmarshal(*v, &ID)
  9479  				if err != nil {
  9480  					return err
  9481  				}
  9482  				scgr.ID = &ID
  9483  			}
  9484  		case "name":
  9485  			if v != nil {
  9486  				var name string
  9487  				err = json.Unmarshal(*v, &name)
  9488  				if err != nil {
  9489  					return err
  9490  				}
  9491  				scgr.Name = &name
  9492  			}
  9493  		case "type":
  9494  			if v != nil {
  9495  				var typeVar string
  9496  				err = json.Unmarshal(*v, &typeVar)
  9497  				if err != nil {
  9498  					return err
  9499  				}
  9500  				scgr.Type = &typeVar
  9501  			}
  9502  		case "location":
  9503  			if v != nil {
  9504  				var location string
  9505  				err = json.Unmarshal(*v, &location)
  9506  				if err != nil {
  9507  					return err
  9508  				}
  9509  				scgr.Location = &location
  9510  			}
  9511  		case "tags":
  9512  			if v != nil {
  9513  				var tags map[string]*string
  9514  				err = json.Unmarshal(*v, &tags)
  9515  				if err != nil {
  9516  					return err
  9517  				}
  9518  				scgr.Tags = tags
  9519  			}
  9520  		case "identity":
  9521  			if v != nil {
  9522  				var identity ManagedServiceIdentity
  9523  				err = json.Unmarshal(*v, &identity)
  9524  				if err != nil {
  9525  					return err
  9526  				}
  9527  				scgr.Identity = &identity
  9528  			}
  9529  		}
  9530  	}
  9531  
  9532  	return nil
  9533  }
  9534  
  9535  // SQLContainerListResult the List operation response, that contains the containers and their properties.
  9536  type SQLContainerListResult struct {
  9537  	autorest.Response `json:"-"`
  9538  	// Value - READ-ONLY; List of containers and their properties.
  9539  	Value *[]SQLContainerGetResults `json:"value,omitempty"`
  9540  }
  9541  
  9542  // MarshalJSON is the custom marshaler for SQLContainerListResult.
  9543  func (sclr SQLContainerListResult) MarshalJSON() ([]byte, error) {
  9544  	objectMap := make(map[string]interface{})
  9545  	return json.Marshal(objectMap)
  9546  }
  9547  
  9548  // SQLContainerResource cosmos DB SQL container resource object
  9549  type SQLContainerResource struct {
  9550  	// ID - Name of the Cosmos DB SQL container
  9551  	ID *string `json:"id,omitempty"`
  9552  	// IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container
  9553  	IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"`
  9554  	// PartitionKey - The configuration of the partition key to be used for partitioning data into multiple partitions
  9555  	PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"`
  9556  	// DefaultTTL - Default time to live
  9557  	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
  9558  	// UniqueKeyPolicy - The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
  9559  	UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"`
  9560  	// ConflictResolutionPolicy - The conflict resolution policy for the container.
  9561  	ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"`
  9562  	// AnalyticalStorageTTL - Analytical TTL.
  9563  	AnalyticalStorageTTL *int64 `json:"analyticalStorageTtl,omitempty"`
  9564  }
  9565  
  9566  // SQLDatabaseCreateUpdateParameters parameters to create and update Cosmos DB SQL database.
  9567  type SQLDatabaseCreateUpdateParameters struct {
  9568  	// SQLDatabaseCreateUpdateProperties - Properties to create and update Azure Cosmos DB SQL database.
  9569  	*SQLDatabaseCreateUpdateProperties `json:"properties,omitempty"`
  9570  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  9571  	ID *string `json:"id,omitempty"`
  9572  	// Name - READ-ONLY; The name of the ARM resource.
  9573  	Name *string `json:"name,omitempty"`
  9574  	// Type - READ-ONLY; The type of Azure resource.
  9575  	Type *string `json:"type,omitempty"`
  9576  	// Location - The location of the resource group to which the resource belongs.
  9577  	Location *string                 `json:"location,omitempty"`
  9578  	Tags     map[string]*string      `json:"tags"`
  9579  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
  9580  }
  9581  
  9582  // MarshalJSON is the custom marshaler for SQLDatabaseCreateUpdateParameters.
  9583  func (sdcup SQLDatabaseCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  9584  	objectMap := make(map[string]interface{})
  9585  	if sdcup.SQLDatabaseCreateUpdateProperties != nil {
  9586  		objectMap["properties"] = sdcup.SQLDatabaseCreateUpdateProperties
  9587  	}
  9588  	if sdcup.Location != nil {
  9589  		objectMap["location"] = sdcup.Location
  9590  	}
  9591  	if sdcup.Tags != nil {
  9592  		objectMap["tags"] = sdcup.Tags
  9593  	}
  9594  	if sdcup.Identity != nil {
  9595  		objectMap["identity"] = sdcup.Identity
  9596  	}
  9597  	return json.Marshal(objectMap)
  9598  }
  9599  
  9600  // UnmarshalJSON is the custom unmarshaler for SQLDatabaseCreateUpdateParameters struct.
  9601  func (sdcup *SQLDatabaseCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  9602  	var m map[string]*json.RawMessage
  9603  	err := json.Unmarshal(body, &m)
  9604  	if err != nil {
  9605  		return err
  9606  	}
  9607  	for k, v := range m {
  9608  		switch k {
  9609  		case "properties":
  9610  			if v != nil {
  9611  				var SQLDatabaseCreateUpdateProperties SQLDatabaseCreateUpdateProperties
  9612  				err = json.Unmarshal(*v, &SQLDatabaseCreateUpdateProperties)
  9613  				if err != nil {
  9614  					return err
  9615  				}
  9616  				sdcup.SQLDatabaseCreateUpdateProperties = &SQLDatabaseCreateUpdateProperties
  9617  			}
  9618  		case "id":
  9619  			if v != nil {
  9620  				var ID string
  9621  				err = json.Unmarshal(*v, &ID)
  9622  				if err != nil {
  9623  					return err
  9624  				}
  9625  				sdcup.ID = &ID
  9626  			}
  9627  		case "name":
  9628  			if v != nil {
  9629  				var name string
  9630  				err = json.Unmarshal(*v, &name)
  9631  				if err != nil {
  9632  					return err
  9633  				}
  9634  				sdcup.Name = &name
  9635  			}
  9636  		case "type":
  9637  			if v != nil {
  9638  				var typeVar string
  9639  				err = json.Unmarshal(*v, &typeVar)
  9640  				if err != nil {
  9641  					return err
  9642  				}
  9643  				sdcup.Type = &typeVar
  9644  			}
  9645  		case "location":
  9646  			if v != nil {
  9647  				var location string
  9648  				err = json.Unmarshal(*v, &location)
  9649  				if err != nil {
  9650  					return err
  9651  				}
  9652  				sdcup.Location = &location
  9653  			}
  9654  		case "tags":
  9655  			if v != nil {
  9656  				var tags map[string]*string
  9657  				err = json.Unmarshal(*v, &tags)
  9658  				if err != nil {
  9659  					return err
  9660  				}
  9661  				sdcup.Tags = tags
  9662  			}
  9663  		case "identity":
  9664  			if v != nil {
  9665  				var identity ManagedServiceIdentity
  9666  				err = json.Unmarshal(*v, &identity)
  9667  				if err != nil {
  9668  					return err
  9669  				}
  9670  				sdcup.Identity = &identity
  9671  			}
  9672  		}
  9673  	}
  9674  
  9675  	return nil
  9676  }
  9677  
  9678  // SQLDatabaseCreateUpdateProperties properties to create and update Azure Cosmos DB SQL database.
  9679  type SQLDatabaseCreateUpdateProperties struct {
  9680  	// Resource - The standard JSON format of a SQL database
  9681  	Resource *SQLDatabaseResource `json:"resource,omitempty"`
  9682  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
  9683  	Options *CreateUpdateOptions `json:"options,omitempty"`
  9684  }
  9685  
  9686  // SQLDatabaseGetProperties the properties of an Azure Cosmos DB SQL database
  9687  type SQLDatabaseGetProperties struct {
  9688  	Resource *SQLDatabaseGetPropertiesResource `json:"resource,omitempty"`
  9689  	Options  *SQLDatabaseGetPropertiesOptions  `json:"options,omitempty"`
  9690  }
  9691  
  9692  // SQLDatabaseGetPropertiesOptions ...
  9693  type SQLDatabaseGetPropertiesOptions struct {
  9694  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
  9695  	Throughput *int32 `json:"throughput,omitempty"`
  9696  	// AutoscaleSettings - Specifies the Autoscale settings.
  9697  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  9698  }
  9699  
  9700  // SQLDatabaseGetPropertiesResource ...
  9701  type SQLDatabaseGetPropertiesResource struct {
  9702  	// ID - Name of the Cosmos DB SQL database
  9703  	ID *string `json:"id,omitempty"`
  9704  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  9705  	Rid *string `json:"_rid,omitempty"`
  9706  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  9707  	Ts *float64 `json:"_ts,omitempty"`
  9708  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  9709  	Etag *string `json:"_etag,omitempty"`
  9710  	// Colls - A system generated property that specified the addressable path of the collections resource.
  9711  	Colls *string `json:"_colls,omitempty"`
  9712  	// Users - A system generated property that specifies the addressable path of the users resource.
  9713  	Users *string `json:"_users,omitempty"`
  9714  }
  9715  
  9716  // MarshalJSON is the custom marshaler for SQLDatabaseGetPropertiesResource.
  9717  func (sdgp SQLDatabaseGetPropertiesResource) MarshalJSON() ([]byte, error) {
  9718  	objectMap := make(map[string]interface{})
  9719  	if sdgp.ID != nil {
  9720  		objectMap["id"] = sdgp.ID
  9721  	}
  9722  	if sdgp.Colls != nil {
  9723  		objectMap["_colls"] = sdgp.Colls
  9724  	}
  9725  	if sdgp.Users != nil {
  9726  		objectMap["_users"] = sdgp.Users
  9727  	}
  9728  	return json.Marshal(objectMap)
  9729  }
  9730  
  9731  // SQLDatabaseGetResults an Azure Cosmos DB SQL database.
  9732  type SQLDatabaseGetResults struct {
  9733  	autorest.Response `json:"-"`
  9734  	// SQLDatabaseGetProperties - The properties of an Azure Cosmos DB SQL database
  9735  	*SQLDatabaseGetProperties `json:"properties,omitempty"`
  9736  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  9737  	ID *string `json:"id,omitempty"`
  9738  	// Name - READ-ONLY; The name of the ARM resource.
  9739  	Name *string `json:"name,omitempty"`
  9740  	// Type - READ-ONLY; The type of Azure resource.
  9741  	Type *string `json:"type,omitempty"`
  9742  	// Location - The location of the resource group to which the resource belongs.
  9743  	Location *string                 `json:"location,omitempty"`
  9744  	Tags     map[string]*string      `json:"tags"`
  9745  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
  9746  }
  9747  
  9748  // MarshalJSON is the custom marshaler for SQLDatabaseGetResults.
  9749  func (sdgr SQLDatabaseGetResults) MarshalJSON() ([]byte, error) {
  9750  	objectMap := make(map[string]interface{})
  9751  	if sdgr.SQLDatabaseGetProperties != nil {
  9752  		objectMap["properties"] = sdgr.SQLDatabaseGetProperties
  9753  	}
  9754  	if sdgr.Location != nil {
  9755  		objectMap["location"] = sdgr.Location
  9756  	}
  9757  	if sdgr.Tags != nil {
  9758  		objectMap["tags"] = sdgr.Tags
  9759  	}
  9760  	if sdgr.Identity != nil {
  9761  		objectMap["identity"] = sdgr.Identity
  9762  	}
  9763  	return json.Marshal(objectMap)
  9764  }
  9765  
  9766  // UnmarshalJSON is the custom unmarshaler for SQLDatabaseGetResults struct.
  9767  func (sdgr *SQLDatabaseGetResults) UnmarshalJSON(body []byte) error {
  9768  	var m map[string]*json.RawMessage
  9769  	err := json.Unmarshal(body, &m)
  9770  	if err != nil {
  9771  		return err
  9772  	}
  9773  	for k, v := range m {
  9774  		switch k {
  9775  		case "properties":
  9776  			if v != nil {
  9777  				var SQLDatabaseGetProperties SQLDatabaseGetProperties
  9778  				err = json.Unmarshal(*v, &SQLDatabaseGetProperties)
  9779  				if err != nil {
  9780  					return err
  9781  				}
  9782  				sdgr.SQLDatabaseGetProperties = &SQLDatabaseGetProperties
  9783  			}
  9784  		case "id":
  9785  			if v != nil {
  9786  				var ID string
  9787  				err = json.Unmarshal(*v, &ID)
  9788  				if err != nil {
  9789  					return err
  9790  				}
  9791  				sdgr.ID = &ID
  9792  			}
  9793  		case "name":
  9794  			if v != nil {
  9795  				var name string
  9796  				err = json.Unmarshal(*v, &name)
  9797  				if err != nil {
  9798  					return err
  9799  				}
  9800  				sdgr.Name = &name
  9801  			}
  9802  		case "type":
  9803  			if v != nil {
  9804  				var typeVar string
  9805  				err = json.Unmarshal(*v, &typeVar)
  9806  				if err != nil {
  9807  					return err
  9808  				}
  9809  				sdgr.Type = &typeVar
  9810  			}
  9811  		case "location":
  9812  			if v != nil {
  9813  				var location string
  9814  				err = json.Unmarshal(*v, &location)
  9815  				if err != nil {
  9816  					return err
  9817  				}
  9818  				sdgr.Location = &location
  9819  			}
  9820  		case "tags":
  9821  			if v != nil {
  9822  				var tags map[string]*string
  9823  				err = json.Unmarshal(*v, &tags)
  9824  				if err != nil {
  9825  					return err
  9826  				}
  9827  				sdgr.Tags = tags
  9828  			}
  9829  		case "identity":
  9830  			if v != nil {
  9831  				var identity ManagedServiceIdentity
  9832  				err = json.Unmarshal(*v, &identity)
  9833  				if err != nil {
  9834  					return err
  9835  				}
  9836  				sdgr.Identity = &identity
  9837  			}
  9838  		}
  9839  	}
  9840  
  9841  	return nil
  9842  }
  9843  
  9844  // SQLDatabaseListResult the List operation response, that contains the SQL databases and their properties.
  9845  type SQLDatabaseListResult struct {
  9846  	autorest.Response `json:"-"`
  9847  	// Value - READ-ONLY; List of SQL databases and their properties.
  9848  	Value *[]SQLDatabaseGetResults `json:"value,omitempty"`
  9849  }
  9850  
  9851  // MarshalJSON is the custom marshaler for SQLDatabaseListResult.
  9852  func (sdlr SQLDatabaseListResult) MarshalJSON() ([]byte, error) {
  9853  	objectMap := make(map[string]interface{})
  9854  	return json.Marshal(objectMap)
  9855  }
  9856  
  9857  // SQLDatabaseResource cosmos DB SQL database resource object
  9858  type SQLDatabaseResource struct {
  9859  	// ID - Name of the Cosmos DB SQL database
  9860  	ID *string `json:"id,omitempty"`
  9861  }
  9862  
  9863  // SQLDedicatedGatewayRegionalServiceResource resource for a regional service location.
  9864  type SQLDedicatedGatewayRegionalServiceResource struct {
  9865  	// SQLDedicatedGatewayEndpoint - READ-ONLY; The regional endpoint for SqlDedicatedGateway.
  9866  	SQLDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"`
  9867  	// Name - READ-ONLY; The regional service name.
  9868  	Name *string `json:"name,omitempty"`
  9869  	// Location - READ-ONLY; The location name.
  9870  	Location *string `json:"location,omitempty"`
  9871  	// Status - READ-ONLY; Possible values include: 'ServiceStatusCreating', 'ServiceStatusRunning', 'ServiceStatusUpdating', 'ServiceStatusDeleting', 'ServiceStatusError', 'ServiceStatusStopped'
  9872  	Status ServiceStatus `json:"status,omitempty"`
  9873  }
  9874  
  9875  // MarshalJSON is the custom marshaler for SQLDedicatedGatewayRegionalServiceResource.
  9876  func (sdgrsr SQLDedicatedGatewayRegionalServiceResource) MarshalJSON() ([]byte, error) {
  9877  	objectMap := make(map[string]interface{})
  9878  	return json.Marshal(objectMap)
  9879  }
  9880  
  9881  // SQLDedicatedGatewayServiceResource describes the service response property for SqlDedicatedGateway.
  9882  type SQLDedicatedGatewayServiceResource struct {
  9883  	Properties *SQLDedicatedGatewayServiceResourceProperties `json:"properties,omitempty"`
  9884  }
  9885  
  9886  // SQLDedicatedGatewayServiceResourceProperties properties for SqlDedicatedGatewayServiceResource.
  9887  type SQLDedicatedGatewayServiceResourceProperties struct {
  9888  	// SQLDedicatedGatewayEndpoint - SqlDedicatedGateway endpoint for the service.
  9889  	SQLDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"`
  9890  	// Locations - READ-ONLY; An array that contains all of the locations for the service.
  9891  	Locations *[]SQLDedicatedGatewayRegionalServiceResource `json:"locations,omitempty"`
  9892  	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
  9893  	AdditionalProperties map[string]interface{} `json:""`
  9894  	// CreationTime - READ-ONLY; Time of the last state change (ISO-8601 format).
  9895  	CreationTime *date.Time `json:"creationTime,omitempty"`
  9896  	// InstanceSize - Possible values include: 'ServiceSizeCosmosD4s', 'ServiceSizeCosmosD8s', 'ServiceSizeCosmosD16s'
  9897  	InstanceSize ServiceSize `json:"instanceSize,omitempty"`
  9898  	// InstanceCount - Instance count for the service.
  9899  	InstanceCount *int32 `json:"instanceCount,omitempty"`
  9900  	// Status - READ-ONLY; Possible values include: 'ServiceStatusCreating', 'ServiceStatusRunning', 'ServiceStatusUpdating', 'ServiceStatusDeleting', 'ServiceStatusError', 'ServiceStatusStopped'
  9901  	Status ServiceStatus `json:"status,omitempty"`
  9902  	// ServiceType - Possible values include: 'ServiceTypeBasicServiceResourcePropertiesServiceTypeServiceResourceProperties', 'ServiceTypeBasicServiceResourcePropertiesServiceTypeDataTransferServiceResourceProperties', 'ServiceTypeBasicServiceResourcePropertiesServiceTypeSQLDedicatedGatewayServiceResourceProperties'
  9903  	ServiceType ServiceTypeBasicServiceResourceProperties `json:"serviceType,omitempty"`
  9904  }
  9905  
  9906  // MarshalJSON is the custom marshaler for SQLDedicatedGatewayServiceResourceProperties.
  9907  func (sdgsrp SQLDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, error) {
  9908  	sdgsrp.ServiceType = ServiceTypeBasicServiceResourcePropertiesServiceTypeSQLDedicatedGatewayServiceResourceProperties
  9909  	objectMap := make(map[string]interface{})
  9910  	if sdgsrp.SQLDedicatedGatewayEndpoint != nil {
  9911  		objectMap["sqlDedicatedGatewayEndpoint"] = sdgsrp.SQLDedicatedGatewayEndpoint
  9912  	}
  9913  	if sdgsrp.InstanceSize != "" {
  9914  		objectMap["instanceSize"] = sdgsrp.InstanceSize
  9915  	}
  9916  	if sdgsrp.InstanceCount != nil {
  9917  		objectMap["instanceCount"] = sdgsrp.InstanceCount
  9918  	}
  9919  	if sdgsrp.ServiceType != "" {
  9920  		objectMap["serviceType"] = sdgsrp.ServiceType
  9921  	}
  9922  	for k, v := range sdgsrp.AdditionalProperties {
  9923  		objectMap[k] = v
  9924  	}
  9925  	return json.Marshal(objectMap)
  9926  }
  9927  
  9928  // AsDataTransferServiceResourceProperties is the BasicServiceResourceProperties implementation for SQLDedicatedGatewayServiceResourceProperties.
  9929  func (sdgsrp SQLDedicatedGatewayServiceResourceProperties) AsDataTransferServiceResourceProperties() (*DataTransferServiceResourceProperties, bool) {
  9930  	return nil, false
  9931  }
  9932  
  9933  // AsSQLDedicatedGatewayServiceResourceProperties is the BasicServiceResourceProperties implementation for SQLDedicatedGatewayServiceResourceProperties.
  9934  func (sdgsrp SQLDedicatedGatewayServiceResourceProperties) AsSQLDedicatedGatewayServiceResourceProperties() (*SQLDedicatedGatewayServiceResourceProperties, bool) {
  9935  	return &sdgsrp, true
  9936  }
  9937  
  9938  // AsServiceResourceProperties is the BasicServiceResourceProperties implementation for SQLDedicatedGatewayServiceResourceProperties.
  9939  func (sdgsrp SQLDedicatedGatewayServiceResourceProperties) AsServiceResourceProperties() (*ServiceResourceProperties, bool) {
  9940  	return nil, false
  9941  }
  9942  
  9943  // AsBasicServiceResourceProperties is the BasicServiceResourceProperties implementation for SQLDedicatedGatewayServiceResourceProperties.
  9944  func (sdgsrp SQLDedicatedGatewayServiceResourceProperties) AsBasicServiceResourceProperties() (BasicServiceResourceProperties, bool) {
  9945  	return &sdgsrp, true
  9946  }
  9947  
  9948  // UnmarshalJSON is the custom unmarshaler for SQLDedicatedGatewayServiceResourceProperties struct.
  9949  func (sdgsrp *SQLDedicatedGatewayServiceResourceProperties) UnmarshalJSON(body []byte) error {
  9950  	var m map[string]*json.RawMessage
  9951  	err := json.Unmarshal(body, &m)
  9952  	if err != nil {
  9953  		return err
  9954  	}
  9955  	for k, v := range m {
  9956  		switch k {
  9957  		case "sqlDedicatedGatewayEndpoint":
  9958  			if v != nil {
  9959  				var SQLDedicatedGatewayEndpoint string
  9960  				err = json.Unmarshal(*v, &SQLDedicatedGatewayEndpoint)
  9961  				if err != nil {
  9962  					return err
  9963  				}
  9964  				sdgsrp.SQLDedicatedGatewayEndpoint = &SQLDedicatedGatewayEndpoint
  9965  			}
  9966  		case "locations":
  9967  			if v != nil {
  9968  				var locations []SQLDedicatedGatewayRegionalServiceResource
  9969  				err = json.Unmarshal(*v, &locations)
  9970  				if err != nil {
  9971  					return err
  9972  				}
  9973  				sdgsrp.Locations = &locations
  9974  			}
  9975  		default:
  9976  			if v != nil {
  9977  				var additionalProperties interface{}
  9978  				err = json.Unmarshal(*v, &additionalProperties)
  9979  				if err != nil {
  9980  					return err
  9981  				}
  9982  				if sdgsrp.AdditionalProperties == nil {
  9983  					sdgsrp.AdditionalProperties = make(map[string]interface{})
  9984  				}
  9985  				sdgsrp.AdditionalProperties[k] = additionalProperties
  9986  			}
  9987  		case "creationTime":
  9988  			if v != nil {
  9989  				var creationTime date.Time
  9990  				err = json.Unmarshal(*v, &creationTime)
  9991  				if err != nil {
  9992  					return err
  9993  				}
  9994  				sdgsrp.CreationTime = &creationTime
  9995  			}
  9996  		case "instanceSize":
  9997  			if v != nil {
  9998  				var instanceSize ServiceSize
  9999  				err = json.Unmarshal(*v, &instanceSize)
 10000  				if err != nil {
 10001  					return err
 10002  				}
 10003  				sdgsrp.InstanceSize = instanceSize
 10004  			}
 10005  		case "instanceCount":
 10006  			if v != nil {
 10007  				var instanceCount int32
 10008  				err = json.Unmarshal(*v, &instanceCount)
 10009  				if err != nil {
 10010  					return err
 10011  				}
 10012  				sdgsrp.InstanceCount = &instanceCount
 10013  			}
 10014  		case "status":
 10015  			if v != nil {
 10016  				var status ServiceStatus
 10017  				err = json.Unmarshal(*v, &status)
 10018  				if err != nil {
 10019  					return err
 10020  				}
 10021  				sdgsrp.Status = status
 10022  			}
 10023  		case "serviceType":
 10024  			if v != nil {
 10025  				var serviceType ServiceTypeBasicServiceResourceProperties
 10026  				err = json.Unmarshal(*v, &serviceType)
 10027  				if err != nil {
 10028  					return err
 10029  				}
 10030  				sdgsrp.ServiceType = serviceType
 10031  			}
 10032  		}
 10033  	}
 10034  
 10035  	return nil
 10036  }
 10037  
 10038  // SQLResourcesCreateUpdateSQLContainerFuture an abstraction for monitoring and retrieving the results of a
 10039  // long-running operation.
 10040  type SQLResourcesCreateUpdateSQLContainerFuture struct {
 10041  	azure.FutureAPI
 10042  	// Result returns the result of the asynchronous operation.
 10043  	// If the operation has not completed it will return an error.
 10044  	Result func(SQLResourcesClient) (SQLContainerGetResults, error)
 10045  }
 10046  
 10047  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10048  func (future *SQLResourcesCreateUpdateSQLContainerFuture) UnmarshalJSON(body []byte) error {
 10049  	var azFuture azure.Future
 10050  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10051  		return err
 10052  	}
 10053  	future.FutureAPI = &azFuture
 10054  	future.Result = future.result
 10055  	return nil
 10056  }
 10057  
 10058  // result is the default implementation for SQLResourcesCreateUpdateSQLContainerFuture.Result.
 10059  func (future *SQLResourcesCreateUpdateSQLContainerFuture) result(client SQLResourcesClient) (scgr SQLContainerGetResults, err error) {
 10060  	var done bool
 10061  	done, err = future.DoneWithContext(context.Background(), client)
 10062  	if err != nil {
 10063  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLContainerFuture", "Result", future.Response(), "Polling failure")
 10064  		return
 10065  	}
 10066  	if !done {
 10067  		scgr.Response.Response = future.Response()
 10068  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLContainerFuture")
 10069  		return
 10070  	}
 10071  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10072  	if scgr.Response.Response, err = future.GetResult(sender); err == nil && scgr.Response.Response.StatusCode != http.StatusNoContent {
 10073  		scgr, err = client.CreateUpdateSQLContainerResponder(scgr.Response.Response)
 10074  		if err != nil {
 10075  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLContainerFuture", "Result", scgr.Response.Response, "Failure responding to request")
 10076  		}
 10077  	}
 10078  	return
 10079  }
 10080  
 10081  // SQLResourcesCreateUpdateSQLDatabaseFuture an abstraction for monitoring and retrieving the results of a
 10082  // long-running operation.
 10083  type SQLResourcesCreateUpdateSQLDatabaseFuture struct {
 10084  	azure.FutureAPI
 10085  	// Result returns the result of the asynchronous operation.
 10086  	// If the operation has not completed it will return an error.
 10087  	Result func(SQLResourcesClient) (SQLDatabaseGetResults, error)
 10088  }
 10089  
 10090  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10091  func (future *SQLResourcesCreateUpdateSQLDatabaseFuture) UnmarshalJSON(body []byte) error {
 10092  	var azFuture azure.Future
 10093  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10094  		return err
 10095  	}
 10096  	future.FutureAPI = &azFuture
 10097  	future.Result = future.result
 10098  	return nil
 10099  }
 10100  
 10101  // result is the default implementation for SQLResourcesCreateUpdateSQLDatabaseFuture.Result.
 10102  func (future *SQLResourcesCreateUpdateSQLDatabaseFuture) result(client SQLResourcesClient) (sdgr SQLDatabaseGetResults, err error) {
 10103  	var done bool
 10104  	done, err = future.DoneWithContext(context.Background(), client)
 10105  	if err != nil {
 10106  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLDatabaseFuture", "Result", future.Response(), "Polling failure")
 10107  		return
 10108  	}
 10109  	if !done {
 10110  		sdgr.Response.Response = future.Response()
 10111  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLDatabaseFuture")
 10112  		return
 10113  	}
 10114  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10115  	if sdgr.Response.Response, err = future.GetResult(sender); err == nil && sdgr.Response.Response.StatusCode != http.StatusNoContent {
 10116  		sdgr, err = client.CreateUpdateSQLDatabaseResponder(sdgr.Response.Response)
 10117  		if err != nil {
 10118  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLDatabaseFuture", "Result", sdgr.Response.Response, "Failure responding to request")
 10119  		}
 10120  	}
 10121  	return
 10122  }
 10123  
 10124  // SQLResourcesCreateUpdateSQLRoleAssignmentFuture an abstraction for monitoring and retrieving the results
 10125  // of a long-running operation.
 10126  type SQLResourcesCreateUpdateSQLRoleAssignmentFuture struct {
 10127  	azure.FutureAPI
 10128  	// Result returns the result of the asynchronous operation.
 10129  	// If the operation has not completed it will return an error.
 10130  	Result func(SQLResourcesClient) (SQLRoleAssignmentGetResults, error)
 10131  }
 10132  
 10133  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10134  func (future *SQLResourcesCreateUpdateSQLRoleAssignmentFuture) UnmarshalJSON(body []byte) error {
 10135  	var azFuture azure.Future
 10136  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10137  		return err
 10138  	}
 10139  	future.FutureAPI = &azFuture
 10140  	future.Result = future.result
 10141  	return nil
 10142  }
 10143  
 10144  // result is the default implementation for SQLResourcesCreateUpdateSQLRoleAssignmentFuture.Result.
 10145  func (future *SQLResourcesCreateUpdateSQLRoleAssignmentFuture) result(client SQLResourcesClient) (sragr SQLRoleAssignmentGetResults, err error) {
 10146  	var done bool
 10147  	done, err = future.DoneWithContext(context.Background(), client)
 10148  	if err != nil {
 10149  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLRoleAssignmentFuture", "Result", future.Response(), "Polling failure")
 10150  		return
 10151  	}
 10152  	if !done {
 10153  		sragr.Response.Response = future.Response()
 10154  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLRoleAssignmentFuture")
 10155  		return
 10156  	}
 10157  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10158  	if sragr.Response.Response, err = future.GetResult(sender); err == nil && sragr.Response.Response.StatusCode != http.StatusNoContent {
 10159  		sragr, err = client.CreateUpdateSQLRoleAssignmentResponder(sragr.Response.Response)
 10160  		if err != nil {
 10161  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLRoleAssignmentFuture", "Result", sragr.Response.Response, "Failure responding to request")
 10162  		}
 10163  	}
 10164  	return
 10165  }
 10166  
 10167  // SQLResourcesCreateUpdateSQLRoleDefinitionFuture an abstraction for monitoring and retrieving the results
 10168  // of a long-running operation.
 10169  type SQLResourcesCreateUpdateSQLRoleDefinitionFuture struct {
 10170  	azure.FutureAPI
 10171  	// Result returns the result of the asynchronous operation.
 10172  	// If the operation has not completed it will return an error.
 10173  	Result func(SQLResourcesClient) (SQLRoleDefinitionGetResults, error)
 10174  }
 10175  
 10176  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10177  func (future *SQLResourcesCreateUpdateSQLRoleDefinitionFuture) UnmarshalJSON(body []byte) error {
 10178  	var azFuture azure.Future
 10179  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10180  		return err
 10181  	}
 10182  	future.FutureAPI = &azFuture
 10183  	future.Result = future.result
 10184  	return nil
 10185  }
 10186  
 10187  // result is the default implementation for SQLResourcesCreateUpdateSQLRoleDefinitionFuture.Result.
 10188  func (future *SQLResourcesCreateUpdateSQLRoleDefinitionFuture) result(client SQLResourcesClient) (srdgr SQLRoleDefinitionGetResults, err error) {
 10189  	var done bool
 10190  	done, err = future.DoneWithContext(context.Background(), client)
 10191  	if err != nil {
 10192  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLRoleDefinitionFuture", "Result", future.Response(), "Polling failure")
 10193  		return
 10194  	}
 10195  	if !done {
 10196  		srdgr.Response.Response = future.Response()
 10197  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLRoleDefinitionFuture")
 10198  		return
 10199  	}
 10200  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10201  	if srdgr.Response.Response, err = future.GetResult(sender); err == nil && srdgr.Response.Response.StatusCode != http.StatusNoContent {
 10202  		srdgr, err = client.CreateUpdateSQLRoleDefinitionResponder(srdgr.Response.Response)
 10203  		if err != nil {
 10204  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLRoleDefinitionFuture", "Result", srdgr.Response.Response, "Failure responding to request")
 10205  		}
 10206  	}
 10207  	return
 10208  }
 10209  
 10210  // SQLResourcesCreateUpdateSQLStoredProcedureFuture an abstraction for monitoring and retrieving the
 10211  // results of a long-running operation.
 10212  type SQLResourcesCreateUpdateSQLStoredProcedureFuture struct {
 10213  	azure.FutureAPI
 10214  	// Result returns the result of the asynchronous operation.
 10215  	// If the operation has not completed it will return an error.
 10216  	Result func(SQLResourcesClient) (SQLStoredProcedureGetResults, error)
 10217  }
 10218  
 10219  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10220  func (future *SQLResourcesCreateUpdateSQLStoredProcedureFuture) UnmarshalJSON(body []byte) error {
 10221  	var azFuture azure.Future
 10222  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10223  		return err
 10224  	}
 10225  	future.FutureAPI = &azFuture
 10226  	future.Result = future.result
 10227  	return nil
 10228  }
 10229  
 10230  // result is the default implementation for SQLResourcesCreateUpdateSQLStoredProcedureFuture.Result.
 10231  func (future *SQLResourcesCreateUpdateSQLStoredProcedureFuture) result(client SQLResourcesClient) (sspgr SQLStoredProcedureGetResults, err error) {
 10232  	var done bool
 10233  	done, err = future.DoneWithContext(context.Background(), client)
 10234  	if err != nil {
 10235  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLStoredProcedureFuture", "Result", future.Response(), "Polling failure")
 10236  		return
 10237  	}
 10238  	if !done {
 10239  		sspgr.Response.Response = future.Response()
 10240  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLStoredProcedureFuture")
 10241  		return
 10242  	}
 10243  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10244  	if sspgr.Response.Response, err = future.GetResult(sender); err == nil && sspgr.Response.Response.StatusCode != http.StatusNoContent {
 10245  		sspgr, err = client.CreateUpdateSQLStoredProcedureResponder(sspgr.Response.Response)
 10246  		if err != nil {
 10247  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLStoredProcedureFuture", "Result", sspgr.Response.Response, "Failure responding to request")
 10248  		}
 10249  	}
 10250  	return
 10251  }
 10252  
 10253  // SQLResourcesCreateUpdateSQLTriggerFuture an abstraction for monitoring and retrieving the results of a
 10254  // long-running operation.
 10255  type SQLResourcesCreateUpdateSQLTriggerFuture struct {
 10256  	azure.FutureAPI
 10257  	// Result returns the result of the asynchronous operation.
 10258  	// If the operation has not completed it will return an error.
 10259  	Result func(SQLResourcesClient) (SQLTriggerGetResults, error)
 10260  }
 10261  
 10262  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10263  func (future *SQLResourcesCreateUpdateSQLTriggerFuture) UnmarshalJSON(body []byte) error {
 10264  	var azFuture azure.Future
 10265  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10266  		return err
 10267  	}
 10268  	future.FutureAPI = &azFuture
 10269  	future.Result = future.result
 10270  	return nil
 10271  }
 10272  
 10273  // result is the default implementation for SQLResourcesCreateUpdateSQLTriggerFuture.Result.
 10274  func (future *SQLResourcesCreateUpdateSQLTriggerFuture) result(client SQLResourcesClient) (stgr SQLTriggerGetResults, err error) {
 10275  	var done bool
 10276  	done, err = future.DoneWithContext(context.Background(), client)
 10277  	if err != nil {
 10278  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLTriggerFuture", "Result", future.Response(), "Polling failure")
 10279  		return
 10280  	}
 10281  	if !done {
 10282  		stgr.Response.Response = future.Response()
 10283  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLTriggerFuture")
 10284  		return
 10285  	}
 10286  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10287  	if stgr.Response.Response, err = future.GetResult(sender); err == nil && stgr.Response.Response.StatusCode != http.StatusNoContent {
 10288  		stgr, err = client.CreateUpdateSQLTriggerResponder(stgr.Response.Response)
 10289  		if err != nil {
 10290  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLTriggerFuture", "Result", stgr.Response.Response, "Failure responding to request")
 10291  		}
 10292  	}
 10293  	return
 10294  }
 10295  
 10296  // SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture an abstraction for monitoring and retrieving the
 10297  // results of a long-running operation.
 10298  type SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture struct {
 10299  	azure.FutureAPI
 10300  	// Result returns the result of the asynchronous operation.
 10301  	// If the operation has not completed it will return an error.
 10302  	Result func(SQLResourcesClient) (SQLUserDefinedFunctionGetResults, error)
 10303  }
 10304  
 10305  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10306  func (future *SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture) UnmarshalJSON(body []byte) error {
 10307  	var azFuture azure.Future
 10308  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10309  		return err
 10310  	}
 10311  	future.FutureAPI = &azFuture
 10312  	future.Result = future.result
 10313  	return nil
 10314  }
 10315  
 10316  // result is the default implementation for SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture.Result.
 10317  func (future *SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture) result(client SQLResourcesClient) (sudfgr SQLUserDefinedFunctionGetResults, err error) {
 10318  	var done bool
 10319  	done, err = future.DoneWithContext(context.Background(), client)
 10320  	if err != nil {
 10321  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture", "Result", future.Response(), "Polling failure")
 10322  		return
 10323  	}
 10324  	if !done {
 10325  		sudfgr.Response.Response = future.Response()
 10326  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture")
 10327  		return
 10328  	}
 10329  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10330  	if sudfgr.Response.Response, err = future.GetResult(sender); err == nil && sudfgr.Response.Response.StatusCode != http.StatusNoContent {
 10331  		sudfgr, err = client.CreateUpdateSQLUserDefinedFunctionResponder(sudfgr.Response.Response)
 10332  		if err != nil {
 10333  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture", "Result", sudfgr.Response.Response, "Failure responding to request")
 10334  		}
 10335  	}
 10336  	return
 10337  }
 10338  
 10339  // SQLResourcesDeleteSQLContainerFuture an abstraction for monitoring and retrieving the results of a
 10340  // long-running operation.
 10341  type SQLResourcesDeleteSQLContainerFuture struct {
 10342  	azure.FutureAPI
 10343  	// Result returns the result of the asynchronous operation.
 10344  	// If the operation has not completed it will return an error.
 10345  	Result func(SQLResourcesClient) (autorest.Response, error)
 10346  }
 10347  
 10348  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10349  func (future *SQLResourcesDeleteSQLContainerFuture) UnmarshalJSON(body []byte) error {
 10350  	var azFuture azure.Future
 10351  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10352  		return err
 10353  	}
 10354  	future.FutureAPI = &azFuture
 10355  	future.Result = future.result
 10356  	return nil
 10357  }
 10358  
 10359  // result is the default implementation for SQLResourcesDeleteSQLContainerFuture.Result.
 10360  func (future *SQLResourcesDeleteSQLContainerFuture) result(client SQLResourcesClient) (ar autorest.Response, err error) {
 10361  	var done bool
 10362  	done, err = future.DoneWithContext(context.Background(), client)
 10363  	if err != nil {
 10364  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLContainerFuture", "Result", future.Response(), "Polling failure")
 10365  		return
 10366  	}
 10367  	if !done {
 10368  		ar.Response = future.Response()
 10369  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLContainerFuture")
 10370  		return
 10371  	}
 10372  	ar.Response = future.Response()
 10373  	return
 10374  }
 10375  
 10376  // SQLResourcesDeleteSQLDatabaseFuture an abstraction for monitoring and retrieving the results of a
 10377  // long-running operation.
 10378  type SQLResourcesDeleteSQLDatabaseFuture struct {
 10379  	azure.FutureAPI
 10380  	// Result returns the result of the asynchronous operation.
 10381  	// If the operation has not completed it will return an error.
 10382  	Result func(SQLResourcesClient) (autorest.Response, error)
 10383  }
 10384  
 10385  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10386  func (future *SQLResourcesDeleteSQLDatabaseFuture) UnmarshalJSON(body []byte) error {
 10387  	var azFuture azure.Future
 10388  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10389  		return err
 10390  	}
 10391  	future.FutureAPI = &azFuture
 10392  	future.Result = future.result
 10393  	return nil
 10394  }
 10395  
 10396  // result is the default implementation for SQLResourcesDeleteSQLDatabaseFuture.Result.
 10397  func (future *SQLResourcesDeleteSQLDatabaseFuture) result(client SQLResourcesClient) (ar autorest.Response, err error) {
 10398  	var done bool
 10399  	done, err = future.DoneWithContext(context.Background(), client)
 10400  	if err != nil {
 10401  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLDatabaseFuture", "Result", future.Response(), "Polling failure")
 10402  		return
 10403  	}
 10404  	if !done {
 10405  		ar.Response = future.Response()
 10406  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLDatabaseFuture")
 10407  		return
 10408  	}
 10409  	ar.Response = future.Response()
 10410  	return
 10411  }
 10412  
 10413  // SQLResourcesDeleteSQLRoleAssignmentFuture an abstraction for monitoring and retrieving the results of a
 10414  // long-running operation.
 10415  type SQLResourcesDeleteSQLRoleAssignmentFuture struct {
 10416  	azure.FutureAPI
 10417  	// Result returns the result of the asynchronous operation.
 10418  	// If the operation has not completed it will return an error.
 10419  	Result func(SQLResourcesClient) (autorest.Response, error)
 10420  }
 10421  
 10422  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10423  func (future *SQLResourcesDeleteSQLRoleAssignmentFuture) UnmarshalJSON(body []byte) error {
 10424  	var azFuture azure.Future
 10425  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10426  		return err
 10427  	}
 10428  	future.FutureAPI = &azFuture
 10429  	future.Result = future.result
 10430  	return nil
 10431  }
 10432  
 10433  // result is the default implementation for SQLResourcesDeleteSQLRoleAssignmentFuture.Result.
 10434  func (future *SQLResourcesDeleteSQLRoleAssignmentFuture) result(client SQLResourcesClient) (ar autorest.Response, err error) {
 10435  	var done bool
 10436  	done, err = future.DoneWithContext(context.Background(), client)
 10437  	if err != nil {
 10438  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLRoleAssignmentFuture", "Result", future.Response(), "Polling failure")
 10439  		return
 10440  	}
 10441  	if !done {
 10442  		ar.Response = future.Response()
 10443  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLRoleAssignmentFuture")
 10444  		return
 10445  	}
 10446  	ar.Response = future.Response()
 10447  	return
 10448  }
 10449  
 10450  // SQLResourcesDeleteSQLRoleDefinitionFuture an abstraction for monitoring and retrieving the results of a
 10451  // long-running operation.
 10452  type SQLResourcesDeleteSQLRoleDefinitionFuture struct {
 10453  	azure.FutureAPI
 10454  	// Result returns the result of the asynchronous operation.
 10455  	// If the operation has not completed it will return an error.
 10456  	Result func(SQLResourcesClient) (autorest.Response, error)
 10457  }
 10458  
 10459  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10460  func (future *SQLResourcesDeleteSQLRoleDefinitionFuture) UnmarshalJSON(body []byte) error {
 10461  	var azFuture azure.Future
 10462  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10463  		return err
 10464  	}
 10465  	future.FutureAPI = &azFuture
 10466  	future.Result = future.result
 10467  	return nil
 10468  }
 10469  
 10470  // result is the default implementation for SQLResourcesDeleteSQLRoleDefinitionFuture.Result.
 10471  func (future *SQLResourcesDeleteSQLRoleDefinitionFuture) result(client SQLResourcesClient) (ar autorest.Response, err error) {
 10472  	var done bool
 10473  	done, err = future.DoneWithContext(context.Background(), client)
 10474  	if err != nil {
 10475  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLRoleDefinitionFuture", "Result", future.Response(), "Polling failure")
 10476  		return
 10477  	}
 10478  	if !done {
 10479  		ar.Response = future.Response()
 10480  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLRoleDefinitionFuture")
 10481  		return
 10482  	}
 10483  	ar.Response = future.Response()
 10484  	return
 10485  }
 10486  
 10487  // SQLResourcesDeleteSQLStoredProcedureFuture an abstraction for monitoring and retrieving the results of a
 10488  // long-running operation.
 10489  type SQLResourcesDeleteSQLStoredProcedureFuture struct {
 10490  	azure.FutureAPI
 10491  	// Result returns the result of the asynchronous operation.
 10492  	// If the operation has not completed it will return an error.
 10493  	Result func(SQLResourcesClient) (autorest.Response, error)
 10494  }
 10495  
 10496  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10497  func (future *SQLResourcesDeleteSQLStoredProcedureFuture) UnmarshalJSON(body []byte) error {
 10498  	var azFuture azure.Future
 10499  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10500  		return err
 10501  	}
 10502  	future.FutureAPI = &azFuture
 10503  	future.Result = future.result
 10504  	return nil
 10505  }
 10506  
 10507  // result is the default implementation for SQLResourcesDeleteSQLStoredProcedureFuture.Result.
 10508  func (future *SQLResourcesDeleteSQLStoredProcedureFuture) result(client SQLResourcesClient) (ar autorest.Response, err error) {
 10509  	var done bool
 10510  	done, err = future.DoneWithContext(context.Background(), client)
 10511  	if err != nil {
 10512  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLStoredProcedureFuture", "Result", future.Response(), "Polling failure")
 10513  		return
 10514  	}
 10515  	if !done {
 10516  		ar.Response = future.Response()
 10517  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLStoredProcedureFuture")
 10518  		return
 10519  	}
 10520  	ar.Response = future.Response()
 10521  	return
 10522  }
 10523  
 10524  // SQLResourcesDeleteSQLTriggerFuture an abstraction for monitoring and retrieving the results of a
 10525  // long-running operation.
 10526  type SQLResourcesDeleteSQLTriggerFuture struct {
 10527  	azure.FutureAPI
 10528  	// Result returns the result of the asynchronous operation.
 10529  	// If the operation has not completed it will return an error.
 10530  	Result func(SQLResourcesClient) (autorest.Response, error)
 10531  }
 10532  
 10533  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10534  func (future *SQLResourcesDeleteSQLTriggerFuture) UnmarshalJSON(body []byte) error {
 10535  	var azFuture azure.Future
 10536  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10537  		return err
 10538  	}
 10539  	future.FutureAPI = &azFuture
 10540  	future.Result = future.result
 10541  	return nil
 10542  }
 10543  
 10544  // result is the default implementation for SQLResourcesDeleteSQLTriggerFuture.Result.
 10545  func (future *SQLResourcesDeleteSQLTriggerFuture) result(client SQLResourcesClient) (ar autorest.Response, err error) {
 10546  	var done bool
 10547  	done, err = future.DoneWithContext(context.Background(), client)
 10548  	if err != nil {
 10549  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLTriggerFuture", "Result", future.Response(), "Polling failure")
 10550  		return
 10551  	}
 10552  	if !done {
 10553  		ar.Response = future.Response()
 10554  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLTriggerFuture")
 10555  		return
 10556  	}
 10557  	ar.Response = future.Response()
 10558  	return
 10559  }
 10560  
 10561  // SQLResourcesDeleteSQLUserDefinedFunctionFuture an abstraction for monitoring and retrieving the results
 10562  // of a long-running operation.
 10563  type SQLResourcesDeleteSQLUserDefinedFunctionFuture struct {
 10564  	azure.FutureAPI
 10565  	// Result returns the result of the asynchronous operation.
 10566  	// If the operation has not completed it will return an error.
 10567  	Result func(SQLResourcesClient) (autorest.Response, error)
 10568  }
 10569  
 10570  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10571  func (future *SQLResourcesDeleteSQLUserDefinedFunctionFuture) UnmarshalJSON(body []byte) error {
 10572  	var azFuture azure.Future
 10573  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10574  		return err
 10575  	}
 10576  	future.FutureAPI = &azFuture
 10577  	future.Result = future.result
 10578  	return nil
 10579  }
 10580  
 10581  // result is the default implementation for SQLResourcesDeleteSQLUserDefinedFunctionFuture.Result.
 10582  func (future *SQLResourcesDeleteSQLUserDefinedFunctionFuture) result(client SQLResourcesClient) (ar autorest.Response, err error) {
 10583  	var done bool
 10584  	done, err = future.DoneWithContext(context.Background(), client)
 10585  	if err != nil {
 10586  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLUserDefinedFunctionFuture", "Result", future.Response(), "Polling failure")
 10587  		return
 10588  	}
 10589  	if !done {
 10590  		ar.Response = future.Response()
 10591  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLUserDefinedFunctionFuture")
 10592  		return
 10593  	}
 10594  	ar.Response = future.Response()
 10595  	return
 10596  }
 10597  
 10598  // SQLResourcesMigrateSQLContainerToAutoscaleFuture an abstraction for monitoring and retrieving the
 10599  // results of a long-running operation.
 10600  type SQLResourcesMigrateSQLContainerToAutoscaleFuture struct {
 10601  	azure.FutureAPI
 10602  	// Result returns the result of the asynchronous operation.
 10603  	// If the operation has not completed it will return an error.
 10604  	Result func(SQLResourcesClient) (ThroughputSettingsGetResults, error)
 10605  }
 10606  
 10607  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10608  func (future *SQLResourcesMigrateSQLContainerToAutoscaleFuture) UnmarshalJSON(body []byte) error {
 10609  	var azFuture azure.Future
 10610  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10611  		return err
 10612  	}
 10613  	future.FutureAPI = &azFuture
 10614  	future.Result = future.result
 10615  	return nil
 10616  }
 10617  
 10618  // result is the default implementation for SQLResourcesMigrateSQLContainerToAutoscaleFuture.Result.
 10619  func (future *SQLResourcesMigrateSQLContainerToAutoscaleFuture) result(client SQLResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
 10620  	var done bool
 10621  	done, err = future.DoneWithContext(context.Background(), client)
 10622  	if err != nil {
 10623  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesMigrateSQLContainerToAutoscaleFuture", "Result", future.Response(), "Polling failure")
 10624  		return
 10625  	}
 10626  	if !done {
 10627  		tsgr.Response.Response = future.Response()
 10628  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesMigrateSQLContainerToAutoscaleFuture")
 10629  		return
 10630  	}
 10631  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10632  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
 10633  		tsgr, err = client.MigrateSQLContainerToAutoscaleResponder(tsgr.Response.Response)
 10634  		if err != nil {
 10635  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesMigrateSQLContainerToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
 10636  		}
 10637  	}
 10638  	return
 10639  }
 10640  
 10641  // SQLResourcesMigrateSQLContainerToManualThroughputFuture an abstraction for monitoring and retrieving the
 10642  // results of a long-running operation.
 10643  type SQLResourcesMigrateSQLContainerToManualThroughputFuture struct {
 10644  	azure.FutureAPI
 10645  	// Result returns the result of the asynchronous operation.
 10646  	// If the operation has not completed it will return an error.
 10647  	Result func(SQLResourcesClient) (ThroughputSettingsGetResults, error)
 10648  }
 10649  
 10650  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10651  func (future *SQLResourcesMigrateSQLContainerToManualThroughputFuture) UnmarshalJSON(body []byte) error {
 10652  	var azFuture azure.Future
 10653  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10654  		return err
 10655  	}
 10656  	future.FutureAPI = &azFuture
 10657  	future.Result = future.result
 10658  	return nil
 10659  }
 10660  
 10661  // result is the default implementation for SQLResourcesMigrateSQLContainerToManualThroughputFuture.Result.
 10662  func (future *SQLResourcesMigrateSQLContainerToManualThroughputFuture) result(client SQLResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
 10663  	var done bool
 10664  	done, err = future.DoneWithContext(context.Background(), client)
 10665  	if err != nil {
 10666  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesMigrateSQLContainerToManualThroughputFuture", "Result", future.Response(), "Polling failure")
 10667  		return
 10668  	}
 10669  	if !done {
 10670  		tsgr.Response.Response = future.Response()
 10671  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesMigrateSQLContainerToManualThroughputFuture")
 10672  		return
 10673  	}
 10674  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10675  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
 10676  		tsgr, err = client.MigrateSQLContainerToManualThroughputResponder(tsgr.Response.Response)
 10677  		if err != nil {
 10678  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesMigrateSQLContainerToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
 10679  		}
 10680  	}
 10681  	return
 10682  }
 10683  
 10684  // SQLResourcesMigrateSQLDatabaseToAutoscaleFuture an abstraction for monitoring and retrieving the results
 10685  // of a long-running operation.
 10686  type SQLResourcesMigrateSQLDatabaseToAutoscaleFuture struct {
 10687  	azure.FutureAPI
 10688  	// Result returns the result of the asynchronous operation.
 10689  	// If the operation has not completed it will return an error.
 10690  	Result func(SQLResourcesClient) (ThroughputSettingsGetResults, error)
 10691  }
 10692  
 10693  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10694  func (future *SQLResourcesMigrateSQLDatabaseToAutoscaleFuture) UnmarshalJSON(body []byte) error {
 10695  	var azFuture azure.Future
 10696  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10697  		return err
 10698  	}
 10699  	future.FutureAPI = &azFuture
 10700  	future.Result = future.result
 10701  	return nil
 10702  }
 10703  
 10704  // result is the default implementation for SQLResourcesMigrateSQLDatabaseToAutoscaleFuture.Result.
 10705  func (future *SQLResourcesMigrateSQLDatabaseToAutoscaleFuture) result(client SQLResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
 10706  	var done bool
 10707  	done, err = future.DoneWithContext(context.Background(), client)
 10708  	if err != nil {
 10709  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesMigrateSQLDatabaseToAutoscaleFuture", "Result", future.Response(), "Polling failure")
 10710  		return
 10711  	}
 10712  	if !done {
 10713  		tsgr.Response.Response = future.Response()
 10714  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesMigrateSQLDatabaseToAutoscaleFuture")
 10715  		return
 10716  	}
 10717  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10718  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
 10719  		tsgr, err = client.MigrateSQLDatabaseToAutoscaleResponder(tsgr.Response.Response)
 10720  		if err != nil {
 10721  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesMigrateSQLDatabaseToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
 10722  		}
 10723  	}
 10724  	return
 10725  }
 10726  
 10727  // SQLResourcesMigrateSQLDatabaseToManualThroughputFuture an abstraction for monitoring and retrieving the
 10728  // results of a long-running operation.
 10729  type SQLResourcesMigrateSQLDatabaseToManualThroughputFuture struct {
 10730  	azure.FutureAPI
 10731  	// Result returns the result of the asynchronous operation.
 10732  	// If the operation has not completed it will return an error.
 10733  	Result func(SQLResourcesClient) (ThroughputSettingsGetResults, error)
 10734  }
 10735  
 10736  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10737  func (future *SQLResourcesMigrateSQLDatabaseToManualThroughputFuture) UnmarshalJSON(body []byte) error {
 10738  	var azFuture azure.Future
 10739  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10740  		return err
 10741  	}
 10742  	future.FutureAPI = &azFuture
 10743  	future.Result = future.result
 10744  	return nil
 10745  }
 10746  
 10747  // result is the default implementation for SQLResourcesMigrateSQLDatabaseToManualThroughputFuture.Result.
 10748  func (future *SQLResourcesMigrateSQLDatabaseToManualThroughputFuture) result(client SQLResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
 10749  	var done bool
 10750  	done, err = future.DoneWithContext(context.Background(), client)
 10751  	if err != nil {
 10752  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesMigrateSQLDatabaseToManualThroughputFuture", "Result", future.Response(), "Polling failure")
 10753  		return
 10754  	}
 10755  	if !done {
 10756  		tsgr.Response.Response = future.Response()
 10757  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesMigrateSQLDatabaseToManualThroughputFuture")
 10758  		return
 10759  	}
 10760  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10761  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
 10762  		tsgr, err = client.MigrateSQLDatabaseToManualThroughputResponder(tsgr.Response.Response)
 10763  		if err != nil {
 10764  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesMigrateSQLDatabaseToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
 10765  		}
 10766  	}
 10767  	return
 10768  }
 10769  
 10770  // SQLResourcesRetrieveContinuousBackupInformationFuture an abstraction for monitoring and retrieving the
 10771  // results of a long-running operation.
 10772  type SQLResourcesRetrieveContinuousBackupInformationFuture struct {
 10773  	azure.FutureAPI
 10774  	// Result returns the result of the asynchronous operation.
 10775  	// If the operation has not completed it will return an error.
 10776  	Result func(SQLResourcesClient) (BackupInformation, error)
 10777  }
 10778  
 10779  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10780  func (future *SQLResourcesRetrieveContinuousBackupInformationFuture) UnmarshalJSON(body []byte) error {
 10781  	var azFuture azure.Future
 10782  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10783  		return err
 10784  	}
 10785  	future.FutureAPI = &azFuture
 10786  	future.Result = future.result
 10787  	return nil
 10788  }
 10789  
 10790  // result is the default implementation for SQLResourcesRetrieveContinuousBackupInformationFuture.Result.
 10791  func (future *SQLResourcesRetrieveContinuousBackupInformationFuture) result(client SQLResourcesClient) (bi BackupInformation, err error) {
 10792  	var done bool
 10793  	done, err = future.DoneWithContext(context.Background(), client)
 10794  	if err != nil {
 10795  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesRetrieveContinuousBackupInformationFuture", "Result", future.Response(), "Polling failure")
 10796  		return
 10797  	}
 10798  	if !done {
 10799  		bi.Response.Response = future.Response()
 10800  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesRetrieveContinuousBackupInformationFuture")
 10801  		return
 10802  	}
 10803  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10804  	if bi.Response.Response, err = future.GetResult(sender); err == nil && bi.Response.Response.StatusCode != http.StatusNoContent {
 10805  		bi, err = client.RetrieveContinuousBackupInformationResponder(bi.Response.Response)
 10806  		if err != nil {
 10807  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesRetrieveContinuousBackupInformationFuture", "Result", bi.Response.Response, "Failure responding to request")
 10808  		}
 10809  	}
 10810  	return
 10811  }
 10812  
 10813  // SQLResourcesUpdateSQLContainerThroughputFuture an abstraction for monitoring and retrieving the results
 10814  // of a long-running operation.
 10815  type SQLResourcesUpdateSQLContainerThroughputFuture struct {
 10816  	azure.FutureAPI
 10817  	// Result returns the result of the asynchronous operation.
 10818  	// If the operation has not completed it will return an error.
 10819  	Result func(SQLResourcesClient) (ThroughputSettingsGetResults, error)
 10820  }
 10821  
 10822  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10823  func (future *SQLResourcesUpdateSQLContainerThroughputFuture) UnmarshalJSON(body []byte) error {
 10824  	var azFuture azure.Future
 10825  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10826  		return err
 10827  	}
 10828  	future.FutureAPI = &azFuture
 10829  	future.Result = future.result
 10830  	return nil
 10831  }
 10832  
 10833  // result is the default implementation for SQLResourcesUpdateSQLContainerThroughputFuture.Result.
 10834  func (future *SQLResourcesUpdateSQLContainerThroughputFuture) result(client SQLResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
 10835  	var done bool
 10836  	done, err = future.DoneWithContext(context.Background(), client)
 10837  	if err != nil {
 10838  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesUpdateSQLContainerThroughputFuture", "Result", future.Response(), "Polling failure")
 10839  		return
 10840  	}
 10841  	if !done {
 10842  		tsgr.Response.Response = future.Response()
 10843  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesUpdateSQLContainerThroughputFuture")
 10844  		return
 10845  	}
 10846  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10847  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
 10848  		tsgr, err = client.UpdateSQLContainerThroughputResponder(tsgr.Response.Response)
 10849  		if err != nil {
 10850  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesUpdateSQLContainerThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
 10851  		}
 10852  	}
 10853  	return
 10854  }
 10855  
 10856  // SQLResourcesUpdateSQLDatabaseThroughputFuture an abstraction for monitoring and retrieving the results
 10857  // of a long-running operation.
 10858  type SQLResourcesUpdateSQLDatabaseThroughputFuture struct {
 10859  	azure.FutureAPI
 10860  	// Result returns the result of the asynchronous operation.
 10861  	// If the operation has not completed it will return an error.
 10862  	Result func(SQLResourcesClient) (ThroughputSettingsGetResults, error)
 10863  }
 10864  
 10865  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10866  func (future *SQLResourcesUpdateSQLDatabaseThroughputFuture) UnmarshalJSON(body []byte) error {
 10867  	var azFuture azure.Future
 10868  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10869  		return err
 10870  	}
 10871  	future.FutureAPI = &azFuture
 10872  	future.Result = future.result
 10873  	return nil
 10874  }
 10875  
 10876  // result is the default implementation for SQLResourcesUpdateSQLDatabaseThroughputFuture.Result.
 10877  func (future *SQLResourcesUpdateSQLDatabaseThroughputFuture) result(client SQLResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
 10878  	var done bool
 10879  	done, err = future.DoneWithContext(context.Background(), client)
 10880  	if err != nil {
 10881  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesUpdateSQLDatabaseThroughputFuture", "Result", future.Response(), "Polling failure")
 10882  		return
 10883  	}
 10884  	if !done {
 10885  		tsgr.Response.Response = future.Response()
 10886  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesUpdateSQLDatabaseThroughputFuture")
 10887  		return
 10888  	}
 10889  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10890  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
 10891  		tsgr, err = client.UpdateSQLDatabaseThroughputResponder(tsgr.Response.Response)
 10892  		if err != nil {
 10893  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesUpdateSQLDatabaseThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
 10894  		}
 10895  	}
 10896  	return
 10897  }
 10898  
 10899  // SQLRoleAssignmentCreateUpdateParameters parameters to create and update an Azure Cosmos DB SQL Role
 10900  // Assignment.
 10901  type SQLRoleAssignmentCreateUpdateParameters struct {
 10902  	// SQLRoleAssignmentResource - Properties to create and update an Azure Cosmos DB SQL Role Assignment.
 10903  	*SQLRoleAssignmentResource `json:"properties,omitempty"`
 10904  }
 10905  
 10906  // MarshalJSON is the custom marshaler for SQLRoleAssignmentCreateUpdateParameters.
 10907  func (sracup SQLRoleAssignmentCreateUpdateParameters) MarshalJSON() ([]byte, error) {
 10908  	objectMap := make(map[string]interface{})
 10909  	if sracup.SQLRoleAssignmentResource != nil {
 10910  		objectMap["properties"] = sracup.SQLRoleAssignmentResource
 10911  	}
 10912  	return json.Marshal(objectMap)
 10913  }
 10914  
 10915  // UnmarshalJSON is the custom unmarshaler for SQLRoleAssignmentCreateUpdateParameters struct.
 10916  func (sracup *SQLRoleAssignmentCreateUpdateParameters) UnmarshalJSON(body []byte) error {
 10917  	var m map[string]*json.RawMessage
 10918  	err := json.Unmarshal(body, &m)
 10919  	if err != nil {
 10920  		return err
 10921  	}
 10922  	for k, v := range m {
 10923  		switch k {
 10924  		case "properties":
 10925  			if v != nil {
 10926  				var SQLRoleAssignmentResource SQLRoleAssignmentResource
 10927  				err = json.Unmarshal(*v, &SQLRoleAssignmentResource)
 10928  				if err != nil {
 10929  					return err
 10930  				}
 10931  				sracup.SQLRoleAssignmentResource = &SQLRoleAssignmentResource
 10932  			}
 10933  		}
 10934  	}
 10935  
 10936  	return nil
 10937  }
 10938  
 10939  // SQLRoleAssignmentGetResults an Azure Cosmos DB Role Assignment
 10940  type SQLRoleAssignmentGetResults struct {
 10941  	autorest.Response `json:"-"`
 10942  	// SQLRoleAssignmentResource - Properties related to the Role Assignment.
 10943  	*SQLRoleAssignmentResource `json:"properties,omitempty"`
 10944  	// ID - READ-ONLY; The unique resource identifier of the database account.
 10945  	ID *string `json:"id,omitempty"`
 10946  	// Name - READ-ONLY; The name of the database account.
 10947  	Name *string `json:"name,omitempty"`
 10948  	// Type - READ-ONLY; The type of Azure resource.
 10949  	Type *string `json:"type,omitempty"`
 10950  }
 10951  
 10952  // MarshalJSON is the custom marshaler for SQLRoleAssignmentGetResults.
 10953  func (sragr SQLRoleAssignmentGetResults) MarshalJSON() ([]byte, error) {
 10954  	objectMap := make(map[string]interface{})
 10955  	if sragr.SQLRoleAssignmentResource != nil {
 10956  		objectMap["properties"] = sragr.SQLRoleAssignmentResource
 10957  	}
 10958  	return json.Marshal(objectMap)
 10959  }
 10960  
 10961  // UnmarshalJSON is the custom unmarshaler for SQLRoleAssignmentGetResults struct.
 10962  func (sragr *SQLRoleAssignmentGetResults) UnmarshalJSON(body []byte) error {
 10963  	var m map[string]*json.RawMessage
 10964  	err := json.Unmarshal(body, &m)
 10965  	if err != nil {
 10966  		return err
 10967  	}
 10968  	for k, v := range m {
 10969  		switch k {
 10970  		case "properties":
 10971  			if v != nil {
 10972  				var SQLRoleAssignmentResource SQLRoleAssignmentResource
 10973  				err = json.Unmarshal(*v, &SQLRoleAssignmentResource)
 10974  				if err != nil {
 10975  					return err
 10976  				}
 10977  				sragr.SQLRoleAssignmentResource = &SQLRoleAssignmentResource
 10978  			}
 10979  		case "id":
 10980  			if v != nil {
 10981  				var ID string
 10982  				err = json.Unmarshal(*v, &ID)
 10983  				if err != nil {
 10984  					return err
 10985  				}
 10986  				sragr.ID = &ID
 10987  			}
 10988  		case "name":
 10989  			if v != nil {
 10990  				var name string
 10991  				err = json.Unmarshal(*v, &name)
 10992  				if err != nil {
 10993  					return err
 10994  				}
 10995  				sragr.Name = &name
 10996  			}
 10997  		case "type":
 10998  			if v != nil {
 10999  				var typeVar string
 11000  				err = json.Unmarshal(*v, &typeVar)
 11001  				if err != nil {
 11002  					return err
 11003  				}
 11004  				sragr.Type = &typeVar
 11005  			}
 11006  		}
 11007  	}
 11008  
 11009  	return nil
 11010  }
 11011  
 11012  // SQLRoleAssignmentListResult the relevant Role Assignments.
 11013  type SQLRoleAssignmentListResult struct {
 11014  	autorest.Response `json:"-"`
 11015  	// Value - READ-ONLY; List of Role Assignments and their properties
 11016  	Value *[]SQLRoleAssignmentGetResults `json:"value,omitempty"`
 11017  }
 11018  
 11019  // MarshalJSON is the custom marshaler for SQLRoleAssignmentListResult.
 11020  func (sralr SQLRoleAssignmentListResult) MarshalJSON() ([]byte, error) {
 11021  	objectMap := make(map[string]interface{})
 11022  	return json.Marshal(objectMap)
 11023  }
 11024  
 11025  // SQLRoleAssignmentResource azure Cosmos DB SQL Role Assignment resource object.
 11026  type SQLRoleAssignmentResource struct {
 11027  	// RoleDefinitionID - The unique identifier for the associated Role Definition.
 11028  	RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
 11029  	// Scope - The data plane resource path for which access is being granted through this Role Assignment.
 11030  	Scope *string `json:"scope,omitempty"`
 11031  	// PrincipalID - The unique identifier for the associated AAD principal in the AAD graph to which access is being granted through this Role Assignment. Tenant ID for the principal is inferred using the tenant associated with the subscription.
 11032  	PrincipalID *string `json:"principalId,omitempty"`
 11033  }
 11034  
 11035  // SQLRoleDefinitionCreateUpdateParameters parameters to create and update an Azure Cosmos DB SQL Role
 11036  // Definition.
 11037  type SQLRoleDefinitionCreateUpdateParameters struct {
 11038  	// SQLRoleDefinitionResource - Properties to create and update an Azure Cosmos DB SQL Role Definition.
 11039  	*SQLRoleDefinitionResource `json:"properties,omitempty"`
 11040  }
 11041  
 11042  // MarshalJSON is the custom marshaler for SQLRoleDefinitionCreateUpdateParameters.
 11043  func (srdcup SQLRoleDefinitionCreateUpdateParameters) MarshalJSON() ([]byte, error) {
 11044  	objectMap := make(map[string]interface{})
 11045  	if srdcup.SQLRoleDefinitionResource != nil {
 11046  		objectMap["properties"] = srdcup.SQLRoleDefinitionResource
 11047  	}
 11048  	return json.Marshal(objectMap)
 11049  }
 11050  
 11051  // UnmarshalJSON is the custom unmarshaler for SQLRoleDefinitionCreateUpdateParameters struct.
 11052  func (srdcup *SQLRoleDefinitionCreateUpdateParameters) UnmarshalJSON(body []byte) error {
 11053  	var m map[string]*json.RawMessage
 11054  	err := json.Unmarshal(body, &m)
 11055  	if err != nil {
 11056  		return err
 11057  	}
 11058  	for k, v := range m {
 11059  		switch k {
 11060  		case "properties":
 11061  			if v != nil {
 11062  				var SQLRoleDefinitionResource SQLRoleDefinitionResource
 11063  				err = json.Unmarshal(*v, &SQLRoleDefinitionResource)
 11064  				if err != nil {
 11065  					return err
 11066  				}
 11067  				srdcup.SQLRoleDefinitionResource = &SQLRoleDefinitionResource
 11068  			}
 11069  		}
 11070  	}
 11071  
 11072  	return nil
 11073  }
 11074  
 11075  // SQLRoleDefinitionGetResults an Azure Cosmos DB SQL Role Definition.
 11076  type SQLRoleDefinitionGetResults struct {
 11077  	autorest.Response `json:"-"`
 11078  	// SQLRoleDefinitionResource - Properties related to the Role Definition.
 11079  	*SQLRoleDefinitionResource `json:"properties,omitempty"`
 11080  	// ID - READ-ONLY; The unique resource identifier of the database account.
 11081  	ID *string `json:"id,omitempty"`
 11082  	// Name - READ-ONLY; The name of the database account.
 11083  	Name *string `json:"name,omitempty"`
 11084  	// Type - READ-ONLY; The type of Azure resource.
 11085  	Type *string `json:"type,omitempty"`
 11086  }
 11087  
 11088  // MarshalJSON is the custom marshaler for SQLRoleDefinitionGetResults.
 11089  func (srdgr SQLRoleDefinitionGetResults) MarshalJSON() ([]byte, error) {
 11090  	objectMap := make(map[string]interface{})
 11091  	if srdgr.SQLRoleDefinitionResource != nil {
 11092  		objectMap["properties"] = srdgr.SQLRoleDefinitionResource
 11093  	}
 11094  	return json.Marshal(objectMap)
 11095  }
 11096  
 11097  // UnmarshalJSON is the custom unmarshaler for SQLRoleDefinitionGetResults struct.
 11098  func (srdgr *SQLRoleDefinitionGetResults) UnmarshalJSON(body []byte) error {
 11099  	var m map[string]*json.RawMessage
 11100  	err := json.Unmarshal(body, &m)
 11101  	if err != nil {
 11102  		return err
 11103  	}
 11104  	for k, v := range m {
 11105  		switch k {
 11106  		case "properties":
 11107  			if v != nil {
 11108  				var SQLRoleDefinitionResource SQLRoleDefinitionResource
 11109  				err = json.Unmarshal(*v, &SQLRoleDefinitionResource)
 11110  				if err != nil {
 11111  					return err
 11112  				}
 11113  				srdgr.SQLRoleDefinitionResource = &SQLRoleDefinitionResource
 11114  			}
 11115  		case "id":
 11116  			if v != nil {
 11117  				var ID string
 11118  				err = json.Unmarshal(*v, &ID)
 11119  				if err != nil {
 11120  					return err
 11121  				}
 11122  				srdgr.ID = &ID
 11123  			}
 11124  		case "name":
 11125  			if v != nil {
 11126  				var name string
 11127  				err = json.Unmarshal(*v, &name)
 11128  				if err != nil {
 11129  					return err
 11130  				}
 11131  				srdgr.Name = &name
 11132  			}
 11133  		case "type":
 11134  			if v != nil {
 11135  				var typeVar string
 11136  				err = json.Unmarshal(*v, &typeVar)
 11137  				if err != nil {
 11138  					return err
 11139  				}
 11140  				srdgr.Type = &typeVar
 11141  			}
 11142  		}
 11143  	}
 11144  
 11145  	return nil
 11146  }
 11147  
 11148  // SQLRoleDefinitionListResult the relevant Role Definitions.
 11149  type SQLRoleDefinitionListResult struct {
 11150  	autorest.Response `json:"-"`
 11151  	// Value - READ-ONLY; List of Role Definitions and their properties.
 11152  	Value *[]SQLRoleDefinitionGetResults `json:"value,omitempty"`
 11153  }
 11154  
 11155  // MarshalJSON is the custom marshaler for SQLRoleDefinitionListResult.
 11156  func (srdlr SQLRoleDefinitionListResult) MarshalJSON() ([]byte, error) {
 11157  	objectMap := make(map[string]interface{})
 11158  	return json.Marshal(objectMap)
 11159  }
 11160  
 11161  // SQLRoleDefinitionResource azure Cosmos DB SQL Role Definition resource object.
 11162  type SQLRoleDefinitionResource struct {
 11163  	// RoleName - A user-friendly name for the Role Definition. Must be unique for the database account.
 11164  	RoleName *string `json:"roleName,omitempty"`
 11165  	// Type - Indicates whether the Role Definition was built-in or user created. Possible values include: 'RoleDefinitionTypeBuiltInRole', 'RoleDefinitionTypeCustomRole'
 11166  	Type RoleDefinitionType `json:"type,omitempty"`
 11167  	// AssignableScopes - A set of fully qualified Scopes at or below which Role Assignments may be created using this Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Must have at least one element. Scopes higher than Database account are not enforceable as assignable Scopes. Note that resources referenced in assignable Scopes need not exist.
 11168  	AssignableScopes *[]string `json:"assignableScopes,omitempty"`
 11169  	// Permissions - The set of operations allowed through this Role Definition.
 11170  	Permissions *[]Permission `json:"permissions,omitempty"`
 11171  }
 11172  
 11173  // SQLStoredProcedureCreateUpdateParameters parameters to create and update Cosmos DB storedProcedure.
 11174  type SQLStoredProcedureCreateUpdateParameters struct {
 11175  	// SQLStoredProcedureCreateUpdateProperties - Properties to create and update Azure Cosmos DB storedProcedure.
 11176  	*SQLStoredProcedureCreateUpdateProperties `json:"properties,omitempty"`
 11177  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 11178  	ID *string `json:"id,omitempty"`
 11179  	// Name - READ-ONLY; The name of the ARM resource.
 11180  	Name *string `json:"name,omitempty"`
 11181  	// Type - READ-ONLY; The type of Azure resource.
 11182  	Type *string `json:"type,omitempty"`
 11183  	// Location - The location of the resource group to which the resource belongs.
 11184  	Location *string                 `json:"location,omitempty"`
 11185  	Tags     map[string]*string      `json:"tags"`
 11186  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
 11187  }
 11188  
 11189  // MarshalJSON is the custom marshaler for SQLStoredProcedureCreateUpdateParameters.
 11190  func (sspcup SQLStoredProcedureCreateUpdateParameters) MarshalJSON() ([]byte, error) {
 11191  	objectMap := make(map[string]interface{})
 11192  	if sspcup.SQLStoredProcedureCreateUpdateProperties != nil {
 11193  		objectMap["properties"] = sspcup.SQLStoredProcedureCreateUpdateProperties
 11194  	}
 11195  	if sspcup.Location != nil {
 11196  		objectMap["location"] = sspcup.Location
 11197  	}
 11198  	if sspcup.Tags != nil {
 11199  		objectMap["tags"] = sspcup.Tags
 11200  	}
 11201  	if sspcup.Identity != nil {
 11202  		objectMap["identity"] = sspcup.Identity
 11203  	}
 11204  	return json.Marshal(objectMap)
 11205  }
 11206  
 11207  // UnmarshalJSON is the custom unmarshaler for SQLStoredProcedureCreateUpdateParameters struct.
 11208  func (sspcup *SQLStoredProcedureCreateUpdateParameters) UnmarshalJSON(body []byte) error {
 11209  	var m map[string]*json.RawMessage
 11210  	err := json.Unmarshal(body, &m)
 11211  	if err != nil {
 11212  		return err
 11213  	}
 11214  	for k, v := range m {
 11215  		switch k {
 11216  		case "properties":
 11217  			if v != nil {
 11218  				var SQLStoredProcedureCreateUpdateProperties SQLStoredProcedureCreateUpdateProperties
 11219  				err = json.Unmarshal(*v, &SQLStoredProcedureCreateUpdateProperties)
 11220  				if err != nil {
 11221  					return err
 11222  				}
 11223  				sspcup.SQLStoredProcedureCreateUpdateProperties = &SQLStoredProcedureCreateUpdateProperties
 11224  			}
 11225  		case "id":
 11226  			if v != nil {
 11227  				var ID string
 11228  				err = json.Unmarshal(*v, &ID)
 11229  				if err != nil {
 11230  					return err
 11231  				}
 11232  				sspcup.ID = &ID
 11233  			}
 11234  		case "name":
 11235  			if v != nil {
 11236  				var name string
 11237  				err = json.Unmarshal(*v, &name)
 11238  				if err != nil {
 11239  					return err
 11240  				}
 11241  				sspcup.Name = &name
 11242  			}
 11243  		case "type":
 11244  			if v != nil {
 11245  				var typeVar string
 11246  				err = json.Unmarshal(*v, &typeVar)
 11247  				if err != nil {
 11248  					return err
 11249  				}
 11250  				sspcup.Type = &typeVar
 11251  			}
 11252  		case "location":
 11253  			if v != nil {
 11254  				var location string
 11255  				err = json.Unmarshal(*v, &location)
 11256  				if err != nil {
 11257  					return err
 11258  				}
 11259  				sspcup.Location = &location
 11260  			}
 11261  		case "tags":
 11262  			if v != nil {
 11263  				var tags map[string]*string
 11264  				err = json.Unmarshal(*v, &tags)
 11265  				if err != nil {
 11266  					return err
 11267  				}
 11268  				sspcup.Tags = tags
 11269  			}
 11270  		case "identity":
 11271  			if v != nil {
 11272  				var identity ManagedServiceIdentity
 11273  				err = json.Unmarshal(*v, &identity)
 11274  				if err != nil {
 11275  					return err
 11276  				}
 11277  				sspcup.Identity = &identity
 11278  			}
 11279  		}
 11280  	}
 11281  
 11282  	return nil
 11283  }
 11284  
 11285  // SQLStoredProcedureCreateUpdateProperties properties to create and update Azure Cosmos DB
 11286  // storedProcedure.
 11287  type SQLStoredProcedureCreateUpdateProperties struct {
 11288  	// Resource - The standard JSON format of a storedProcedure
 11289  	Resource *SQLStoredProcedureResource `json:"resource,omitempty"`
 11290  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
 11291  	Options *CreateUpdateOptions `json:"options,omitempty"`
 11292  }
 11293  
 11294  // SQLStoredProcedureGetProperties the properties of an Azure Cosmos DB StoredProcedure
 11295  type SQLStoredProcedureGetProperties struct {
 11296  	Resource *SQLStoredProcedureGetPropertiesResource `json:"resource,omitempty"`
 11297  }
 11298  
 11299  // SQLStoredProcedureGetPropertiesResource ...
 11300  type SQLStoredProcedureGetPropertiesResource struct {
 11301  	// ID - Name of the Cosmos DB SQL storedProcedure
 11302  	ID *string `json:"id,omitempty"`
 11303  	// Body - Body of the Stored Procedure
 11304  	Body *string `json:"body,omitempty"`
 11305  	// Rid - READ-ONLY; A system generated property. A unique identifier.
 11306  	Rid *string `json:"_rid,omitempty"`
 11307  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
 11308  	Ts *float64 `json:"_ts,omitempty"`
 11309  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
 11310  	Etag *string `json:"_etag,omitempty"`
 11311  }
 11312  
 11313  // MarshalJSON is the custom marshaler for SQLStoredProcedureGetPropertiesResource.
 11314  func (sspgp SQLStoredProcedureGetPropertiesResource) MarshalJSON() ([]byte, error) {
 11315  	objectMap := make(map[string]interface{})
 11316  	if sspgp.ID != nil {
 11317  		objectMap["id"] = sspgp.ID
 11318  	}
 11319  	if sspgp.Body != nil {
 11320  		objectMap["body"] = sspgp.Body
 11321  	}
 11322  	return json.Marshal(objectMap)
 11323  }
 11324  
 11325  // SQLStoredProcedureGetResults an Azure Cosmos DB storedProcedure.
 11326  type SQLStoredProcedureGetResults struct {
 11327  	autorest.Response `json:"-"`
 11328  	// SQLStoredProcedureGetProperties - The properties of an Azure Cosmos DB storedProcedure
 11329  	*SQLStoredProcedureGetProperties `json:"properties,omitempty"`
 11330  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 11331  	ID *string `json:"id,omitempty"`
 11332  	// Name - READ-ONLY; The name of the ARM resource.
 11333  	Name *string `json:"name,omitempty"`
 11334  	// Type - READ-ONLY; The type of Azure resource.
 11335  	Type *string `json:"type,omitempty"`
 11336  	// Location - The location of the resource group to which the resource belongs.
 11337  	Location *string                 `json:"location,omitempty"`
 11338  	Tags     map[string]*string      `json:"tags"`
 11339  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
 11340  }
 11341  
 11342  // MarshalJSON is the custom marshaler for SQLStoredProcedureGetResults.
 11343  func (sspgr SQLStoredProcedureGetResults) MarshalJSON() ([]byte, error) {
 11344  	objectMap := make(map[string]interface{})
 11345  	if sspgr.SQLStoredProcedureGetProperties != nil {
 11346  		objectMap["properties"] = sspgr.SQLStoredProcedureGetProperties
 11347  	}
 11348  	if sspgr.Location != nil {
 11349  		objectMap["location"] = sspgr.Location
 11350  	}
 11351  	if sspgr.Tags != nil {
 11352  		objectMap["tags"] = sspgr.Tags
 11353  	}
 11354  	if sspgr.Identity != nil {
 11355  		objectMap["identity"] = sspgr.Identity
 11356  	}
 11357  	return json.Marshal(objectMap)
 11358  }
 11359  
 11360  // UnmarshalJSON is the custom unmarshaler for SQLStoredProcedureGetResults struct.
 11361  func (sspgr *SQLStoredProcedureGetResults) UnmarshalJSON(body []byte) error {
 11362  	var m map[string]*json.RawMessage
 11363  	err := json.Unmarshal(body, &m)
 11364  	if err != nil {
 11365  		return err
 11366  	}
 11367  	for k, v := range m {
 11368  		switch k {
 11369  		case "properties":
 11370  			if v != nil {
 11371  				var SQLStoredProcedureGetProperties SQLStoredProcedureGetProperties
 11372  				err = json.Unmarshal(*v, &SQLStoredProcedureGetProperties)
 11373  				if err != nil {
 11374  					return err
 11375  				}
 11376  				sspgr.SQLStoredProcedureGetProperties = &SQLStoredProcedureGetProperties
 11377  			}
 11378  		case "id":
 11379  			if v != nil {
 11380  				var ID string
 11381  				err = json.Unmarshal(*v, &ID)
 11382  				if err != nil {
 11383  					return err
 11384  				}
 11385  				sspgr.ID = &ID
 11386  			}
 11387  		case "name":
 11388  			if v != nil {
 11389  				var name string
 11390  				err = json.Unmarshal(*v, &name)
 11391  				if err != nil {
 11392  					return err
 11393  				}
 11394  				sspgr.Name = &name
 11395  			}
 11396  		case "type":
 11397  			if v != nil {
 11398  				var typeVar string
 11399  				err = json.Unmarshal(*v, &typeVar)
 11400  				if err != nil {
 11401  					return err
 11402  				}
 11403  				sspgr.Type = &typeVar
 11404  			}
 11405  		case "location":
 11406  			if v != nil {
 11407  				var location string
 11408  				err = json.Unmarshal(*v, &location)
 11409  				if err != nil {
 11410  					return err
 11411  				}
 11412  				sspgr.Location = &location
 11413  			}
 11414  		case "tags":
 11415  			if v != nil {
 11416  				var tags map[string]*string
 11417  				err = json.Unmarshal(*v, &tags)
 11418  				if err != nil {
 11419  					return err
 11420  				}
 11421  				sspgr.Tags = tags
 11422  			}
 11423  		case "identity":
 11424  			if v != nil {
 11425  				var identity ManagedServiceIdentity
 11426  				err = json.Unmarshal(*v, &identity)
 11427  				if err != nil {
 11428  					return err
 11429  				}
 11430  				sspgr.Identity = &identity
 11431  			}
 11432  		}
 11433  	}
 11434  
 11435  	return nil
 11436  }
 11437  
 11438  // SQLStoredProcedureListResult the List operation response, that contains the storedProcedures and their
 11439  // properties.
 11440  type SQLStoredProcedureListResult struct {
 11441  	autorest.Response `json:"-"`
 11442  	// Value - READ-ONLY; List of storedProcedures and their properties.
 11443  	Value *[]SQLStoredProcedureGetResults `json:"value,omitempty"`
 11444  }
 11445  
 11446  // MarshalJSON is the custom marshaler for SQLStoredProcedureListResult.
 11447  func (ssplr SQLStoredProcedureListResult) MarshalJSON() ([]byte, error) {
 11448  	objectMap := make(map[string]interface{})
 11449  	return json.Marshal(objectMap)
 11450  }
 11451  
 11452  // SQLStoredProcedureResource cosmos DB SQL storedProcedure resource object
 11453  type SQLStoredProcedureResource struct {
 11454  	// ID - Name of the Cosmos DB SQL storedProcedure
 11455  	ID *string `json:"id,omitempty"`
 11456  	// Body - Body of the Stored Procedure
 11457  	Body *string `json:"body,omitempty"`
 11458  }
 11459  
 11460  // SQLTriggerCreateUpdateParameters parameters to create and update Cosmos DB trigger.
 11461  type SQLTriggerCreateUpdateParameters struct {
 11462  	// SQLTriggerCreateUpdateProperties - Properties to create and update Azure Cosmos DB trigger.
 11463  	*SQLTriggerCreateUpdateProperties `json:"properties,omitempty"`
 11464  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 11465  	ID *string `json:"id,omitempty"`
 11466  	// Name - READ-ONLY; The name of the ARM resource.
 11467  	Name *string `json:"name,omitempty"`
 11468  	// Type - READ-ONLY; The type of Azure resource.
 11469  	Type *string `json:"type,omitempty"`
 11470  	// Location - The location of the resource group to which the resource belongs.
 11471  	Location *string                 `json:"location,omitempty"`
 11472  	Tags     map[string]*string      `json:"tags"`
 11473  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
 11474  }
 11475  
 11476  // MarshalJSON is the custom marshaler for SQLTriggerCreateUpdateParameters.
 11477  func (stcup SQLTriggerCreateUpdateParameters) MarshalJSON() ([]byte, error) {
 11478  	objectMap := make(map[string]interface{})
 11479  	if stcup.SQLTriggerCreateUpdateProperties != nil {
 11480  		objectMap["properties"] = stcup.SQLTriggerCreateUpdateProperties
 11481  	}
 11482  	if stcup.Location != nil {
 11483  		objectMap["location"] = stcup.Location
 11484  	}
 11485  	if stcup.Tags != nil {
 11486  		objectMap["tags"] = stcup.Tags
 11487  	}
 11488  	if stcup.Identity != nil {
 11489  		objectMap["identity"] = stcup.Identity
 11490  	}
 11491  	return json.Marshal(objectMap)
 11492  }
 11493  
 11494  // UnmarshalJSON is the custom unmarshaler for SQLTriggerCreateUpdateParameters struct.
 11495  func (stcup *SQLTriggerCreateUpdateParameters) UnmarshalJSON(body []byte) error {
 11496  	var m map[string]*json.RawMessage
 11497  	err := json.Unmarshal(body, &m)
 11498  	if err != nil {
 11499  		return err
 11500  	}
 11501  	for k, v := range m {
 11502  		switch k {
 11503  		case "properties":
 11504  			if v != nil {
 11505  				var SQLTriggerCreateUpdateProperties SQLTriggerCreateUpdateProperties
 11506  				err = json.Unmarshal(*v, &SQLTriggerCreateUpdateProperties)
 11507  				if err != nil {
 11508  					return err
 11509  				}
 11510  				stcup.SQLTriggerCreateUpdateProperties = &SQLTriggerCreateUpdateProperties
 11511  			}
 11512  		case "id":
 11513  			if v != nil {
 11514  				var ID string
 11515  				err = json.Unmarshal(*v, &ID)
 11516  				if err != nil {
 11517  					return err
 11518  				}
 11519  				stcup.ID = &ID
 11520  			}
 11521  		case "name":
 11522  			if v != nil {
 11523  				var name string
 11524  				err = json.Unmarshal(*v, &name)
 11525  				if err != nil {
 11526  					return err
 11527  				}
 11528  				stcup.Name = &name
 11529  			}
 11530  		case "type":
 11531  			if v != nil {
 11532  				var typeVar string
 11533  				err = json.Unmarshal(*v, &typeVar)
 11534  				if err != nil {
 11535  					return err
 11536  				}
 11537  				stcup.Type = &typeVar
 11538  			}
 11539  		case "location":
 11540  			if v != nil {
 11541  				var location string
 11542  				err = json.Unmarshal(*v, &location)
 11543  				if err != nil {
 11544  					return err
 11545  				}
 11546  				stcup.Location = &location
 11547  			}
 11548  		case "tags":
 11549  			if v != nil {
 11550  				var tags map[string]*string
 11551  				err = json.Unmarshal(*v, &tags)
 11552  				if err != nil {
 11553  					return err
 11554  				}
 11555  				stcup.Tags = tags
 11556  			}
 11557  		case "identity":
 11558  			if v != nil {
 11559  				var identity ManagedServiceIdentity
 11560  				err = json.Unmarshal(*v, &identity)
 11561  				if err != nil {
 11562  					return err
 11563  				}
 11564  				stcup.Identity = &identity
 11565  			}
 11566  		}
 11567  	}
 11568  
 11569  	return nil
 11570  }
 11571  
 11572  // SQLTriggerCreateUpdateProperties properties to create and update Azure Cosmos DB trigger.
 11573  type SQLTriggerCreateUpdateProperties struct {
 11574  	// Resource - The standard JSON format of a trigger
 11575  	Resource *SQLTriggerResource `json:"resource,omitempty"`
 11576  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
 11577  	Options *CreateUpdateOptions `json:"options,omitempty"`
 11578  }
 11579  
 11580  // SQLTriggerGetProperties the properties of an Azure Cosmos DB trigger
 11581  type SQLTriggerGetProperties struct {
 11582  	Resource *SQLTriggerGetPropertiesResource `json:"resource,omitempty"`
 11583  }
 11584  
 11585  // SQLTriggerGetPropertiesResource ...
 11586  type SQLTriggerGetPropertiesResource struct {
 11587  	// ID - Name of the Cosmos DB SQL trigger
 11588  	ID *string `json:"id,omitempty"`
 11589  	// Body - Body of the Trigger
 11590  	Body *string `json:"body,omitempty"`
 11591  	// TriggerType - Type of the Trigger. Possible values include: 'TriggerTypePre', 'TriggerTypePost'
 11592  	TriggerType TriggerType `json:"triggerType,omitempty"`
 11593  	// TriggerOperation - The operation the trigger is associated with. Possible values include: 'TriggerOperationAll', 'TriggerOperationCreate', 'TriggerOperationUpdate', 'TriggerOperationDelete', 'TriggerOperationReplace'
 11594  	TriggerOperation TriggerOperation `json:"triggerOperation,omitempty"`
 11595  	// Rid - READ-ONLY; A system generated property. A unique identifier.
 11596  	Rid *string `json:"_rid,omitempty"`
 11597  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
 11598  	Ts *float64 `json:"_ts,omitempty"`
 11599  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
 11600  	Etag *string `json:"_etag,omitempty"`
 11601  }
 11602  
 11603  // MarshalJSON is the custom marshaler for SQLTriggerGetPropertiesResource.
 11604  func (stgp SQLTriggerGetPropertiesResource) MarshalJSON() ([]byte, error) {
 11605  	objectMap := make(map[string]interface{})
 11606  	if stgp.ID != nil {
 11607  		objectMap["id"] = stgp.ID
 11608  	}
 11609  	if stgp.Body != nil {
 11610  		objectMap["body"] = stgp.Body
 11611  	}
 11612  	if stgp.TriggerType != "" {
 11613  		objectMap["triggerType"] = stgp.TriggerType
 11614  	}
 11615  	if stgp.TriggerOperation != "" {
 11616  		objectMap["triggerOperation"] = stgp.TriggerOperation
 11617  	}
 11618  	return json.Marshal(objectMap)
 11619  }
 11620  
 11621  // SQLTriggerGetResults an Azure Cosmos DB trigger.
 11622  type SQLTriggerGetResults struct {
 11623  	autorest.Response `json:"-"`
 11624  	// SQLTriggerGetProperties - The properties of an Azure Cosmos DB trigger
 11625  	*SQLTriggerGetProperties `json:"properties,omitempty"`
 11626  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 11627  	ID *string `json:"id,omitempty"`
 11628  	// Name - READ-ONLY; The name of the ARM resource.
 11629  	Name *string `json:"name,omitempty"`
 11630  	// Type - READ-ONLY; The type of Azure resource.
 11631  	Type *string `json:"type,omitempty"`
 11632  	// Location - The location of the resource group to which the resource belongs.
 11633  	Location *string                 `json:"location,omitempty"`
 11634  	Tags     map[string]*string      `json:"tags"`
 11635  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
 11636  }
 11637  
 11638  // MarshalJSON is the custom marshaler for SQLTriggerGetResults.
 11639  func (stgr SQLTriggerGetResults) MarshalJSON() ([]byte, error) {
 11640  	objectMap := make(map[string]interface{})
 11641  	if stgr.SQLTriggerGetProperties != nil {
 11642  		objectMap["properties"] = stgr.SQLTriggerGetProperties
 11643  	}
 11644  	if stgr.Location != nil {
 11645  		objectMap["location"] = stgr.Location
 11646  	}
 11647  	if stgr.Tags != nil {
 11648  		objectMap["tags"] = stgr.Tags
 11649  	}
 11650  	if stgr.Identity != nil {
 11651  		objectMap["identity"] = stgr.Identity
 11652  	}
 11653  	return json.Marshal(objectMap)
 11654  }
 11655  
 11656  // UnmarshalJSON is the custom unmarshaler for SQLTriggerGetResults struct.
 11657  func (stgr *SQLTriggerGetResults) UnmarshalJSON(body []byte) error {
 11658  	var m map[string]*json.RawMessage
 11659  	err := json.Unmarshal(body, &m)
 11660  	if err != nil {
 11661  		return err
 11662  	}
 11663  	for k, v := range m {
 11664  		switch k {
 11665  		case "properties":
 11666  			if v != nil {
 11667  				var SQLTriggerGetProperties SQLTriggerGetProperties
 11668  				err = json.Unmarshal(*v, &SQLTriggerGetProperties)
 11669  				if err != nil {
 11670  					return err
 11671  				}
 11672  				stgr.SQLTriggerGetProperties = &SQLTriggerGetProperties
 11673  			}
 11674  		case "id":
 11675  			if v != nil {
 11676  				var ID string
 11677  				err = json.Unmarshal(*v, &ID)
 11678  				if err != nil {
 11679  					return err
 11680  				}
 11681  				stgr.ID = &ID
 11682  			}
 11683  		case "name":
 11684  			if v != nil {
 11685  				var name string
 11686  				err = json.Unmarshal(*v, &name)
 11687  				if err != nil {
 11688  					return err
 11689  				}
 11690  				stgr.Name = &name
 11691  			}
 11692  		case "type":
 11693  			if v != nil {
 11694  				var typeVar string
 11695  				err = json.Unmarshal(*v, &typeVar)
 11696  				if err != nil {
 11697  					return err
 11698  				}
 11699  				stgr.Type = &typeVar
 11700  			}
 11701  		case "location":
 11702  			if v != nil {
 11703  				var location string
 11704  				err = json.Unmarshal(*v, &location)
 11705  				if err != nil {
 11706  					return err
 11707  				}
 11708  				stgr.Location = &location
 11709  			}
 11710  		case "tags":
 11711  			if v != nil {
 11712  				var tags map[string]*string
 11713  				err = json.Unmarshal(*v, &tags)
 11714  				if err != nil {
 11715  					return err
 11716  				}
 11717  				stgr.Tags = tags
 11718  			}
 11719  		case "identity":
 11720  			if v != nil {
 11721  				var identity ManagedServiceIdentity
 11722  				err = json.Unmarshal(*v, &identity)
 11723  				if err != nil {
 11724  					return err
 11725  				}
 11726  				stgr.Identity = &identity
 11727  			}
 11728  		}
 11729  	}
 11730  
 11731  	return nil
 11732  }
 11733  
 11734  // SQLTriggerListResult the List operation response, that contains the triggers and their properties.
 11735  type SQLTriggerListResult struct {
 11736  	autorest.Response `json:"-"`
 11737  	// Value - READ-ONLY; List of triggers and their properties.
 11738  	Value *[]SQLTriggerGetResults `json:"value,omitempty"`
 11739  }
 11740  
 11741  // MarshalJSON is the custom marshaler for SQLTriggerListResult.
 11742  func (stlr SQLTriggerListResult) MarshalJSON() ([]byte, error) {
 11743  	objectMap := make(map[string]interface{})
 11744  	return json.Marshal(objectMap)
 11745  }
 11746  
 11747  // SQLTriggerResource cosmos DB SQL trigger resource object
 11748  type SQLTriggerResource struct {
 11749  	// ID - Name of the Cosmos DB SQL trigger
 11750  	ID *string `json:"id,omitempty"`
 11751  	// Body - Body of the Trigger
 11752  	Body *string `json:"body,omitempty"`
 11753  	// TriggerType - Type of the Trigger. Possible values include: 'TriggerTypePre', 'TriggerTypePost'
 11754  	TriggerType TriggerType `json:"triggerType,omitempty"`
 11755  	// TriggerOperation - The operation the trigger is associated with. Possible values include: 'TriggerOperationAll', 'TriggerOperationCreate', 'TriggerOperationUpdate', 'TriggerOperationDelete', 'TriggerOperationReplace'
 11756  	TriggerOperation TriggerOperation `json:"triggerOperation,omitempty"`
 11757  }
 11758  
 11759  // SQLUserDefinedFunctionCreateUpdateParameters parameters to create and update Cosmos DB
 11760  // userDefinedFunction.
 11761  type SQLUserDefinedFunctionCreateUpdateParameters struct {
 11762  	// SQLUserDefinedFunctionCreateUpdateProperties - Properties to create and update Azure Cosmos DB userDefinedFunction.
 11763  	*SQLUserDefinedFunctionCreateUpdateProperties `json:"properties,omitempty"`
 11764  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 11765  	ID *string `json:"id,omitempty"`
 11766  	// Name - READ-ONLY; The name of the ARM resource.
 11767  	Name *string `json:"name,omitempty"`
 11768  	// Type - READ-ONLY; The type of Azure resource.
 11769  	Type *string `json:"type,omitempty"`
 11770  	// Location - The location of the resource group to which the resource belongs.
 11771  	Location *string                 `json:"location,omitempty"`
 11772  	Tags     map[string]*string      `json:"tags"`
 11773  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
 11774  }
 11775  
 11776  // MarshalJSON is the custom marshaler for SQLUserDefinedFunctionCreateUpdateParameters.
 11777  func (sudfcup SQLUserDefinedFunctionCreateUpdateParameters) MarshalJSON() ([]byte, error) {
 11778  	objectMap := make(map[string]interface{})
 11779  	if sudfcup.SQLUserDefinedFunctionCreateUpdateProperties != nil {
 11780  		objectMap["properties"] = sudfcup.SQLUserDefinedFunctionCreateUpdateProperties
 11781  	}
 11782  	if sudfcup.Location != nil {
 11783  		objectMap["location"] = sudfcup.Location
 11784  	}
 11785  	if sudfcup.Tags != nil {
 11786  		objectMap["tags"] = sudfcup.Tags
 11787  	}
 11788  	if sudfcup.Identity != nil {
 11789  		objectMap["identity"] = sudfcup.Identity
 11790  	}
 11791  	return json.Marshal(objectMap)
 11792  }
 11793  
 11794  // UnmarshalJSON is the custom unmarshaler for SQLUserDefinedFunctionCreateUpdateParameters struct.
 11795  func (sudfcup *SQLUserDefinedFunctionCreateUpdateParameters) UnmarshalJSON(body []byte) error {
 11796  	var m map[string]*json.RawMessage
 11797  	err := json.Unmarshal(body, &m)
 11798  	if err != nil {
 11799  		return err
 11800  	}
 11801  	for k, v := range m {
 11802  		switch k {
 11803  		case "properties":
 11804  			if v != nil {
 11805  				var SQLUserDefinedFunctionCreateUpdateProperties SQLUserDefinedFunctionCreateUpdateProperties
 11806  				err = json.Unmarshal(*v, &SQLUserDefinedFunctionCreateUpdateProperties)
 11807  				if err != nil {
 11808  					return err
 11809  				}
 11810  				sudfcup.SQLUserDefinedFunctionCreateUpdateProperties = &SQLUserDefinedFunctionCreateUpdateProperties
 11811  			}
 11812  		case "id":
 11813  			if v != nil {
 11814  				var ID string
 11815  				err = json.Unmarshal(*v, &ID)
 11816  				if err != nil {
 11817  					return err
 11818  				}
 11819  				sudfcup.ID = &ID
 11820  			}
 11821  		case "name":
 11822  			if v != nil {
 11823  				var name string
 11824  				err = json.Unmarshal(*v, &name)
 11825  				if err != nil {
 11826  					return err
 11827  				}
 11828  				sudfcup.Name = &name
 11829  			}
 11830  		case "type":
 11831  			if v != nil {
 11832  				var typeVar string
 11833  				err = json.Unmarshal(*v, &typeVar)
 11834  				if err != nil {
 11835  					return err
 11836  				}
 11837  				sudfcup.Type = &typeVar
 11838  			}
 11839  		case "location":
 11840  			if v != nil {
 11841  				var location string
 11842  				err = json.Unmarshal(*v, &location)
 11843  				if err != nil {
 11844  					return err
 11845  				}
 11846  				sudfcup.Location = &location
 11847  			}
 11848  		case "tags":
 11849  			if v != nil {
 11850  				var tags map[string]*string
 11851  				err = json.Unmarshal(*v, &tags)
 11852  				if err != nil {
 11853  					return err
 11854  				}
 11855  				sudfcup.Tags = tags
 11856  			}
 11857  		case "identity":
 11858  			if v != nil {
 11859  				var identity ManagedServiceIdentity
 11860  				err = json.Unmarshal(*v, &identity)
 11861  				if err != nil {
 11862  					return err
 11863  				}
 11864  				sudfcup.Identity = &identity
 11865  			}
 11866  		}
 11867  	}
 11868  
 11869  	return nil
 11870  }
 11871  
 11872  // SQLUserDefinedFunctionCreateUpdateProperties properties to create and update Azure Cosmos DB
 11873  // userDefinedFunction.
 11874  type SQLUserDefinedFunctionCreateUpdateProperties struct {
 11875  	// Resource - The standard JSON format of a userDefinedFunction
 11876  	Resource *SQLUserDefinedFunctionResource `json:"resource,omitempty"`
 11877  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
 11878  	Options *CreateUpdateOptions `json:"options,omitempty"`
 11879  }
 11880  
 11881  // SQLUserDefinedFunctionGetProperties the properties of an Azure Cosmos DB userDefinedFunction
 11882  type SQLUserDefinedFunctionGetProperties struct {
 11883  	Resource *SQLUserDefinedFunctionGetPropertiesResource `json:"resource,omitempty"`
 11884  }
 11885  
 11886  // SQLUserDefinedFunctionGetPropertiesResource ...
 11887  type SQLUserDefinedFunctionGetPropertiesResource struct {
 11888  	// ID - Name of the Cosmos DB SQL userDefinedFunction
 11889  	ID *string `json:"id,omitempty"`
 11890  	// Body - Body of the User Defined Function
 11891  	Body *string `json:"body,omitempty"`
 11892  	// Rid - READ-ONLY; A system generated property. A unique identifier.
 11893  	Rid *string `json:"_rid,omitempty"`
 11894  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
 11895  	Ts *float64 `json:"_ts,omitempty"`
 11896  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
 11897  	Etag *string `json:"_etag,omitempty"`
 11898  }
 11899  
 11900  // MarshalJSON is the custom marshaler for SQLUserDefinedFunctionGetPropertiesResource.
 11901  func (sudfgp SQLUserDefinedFunctionGetPropertiesResource) MarshalJSON() ([]byte, error) {
 11902  	objectMap := make(map[string]interface{})
 11903  	if sudfgp.ID != nil {
 11904  		objectMap["id"] = sudfgp.ID
 11905  	}
 11906  	if sudfgp.Body != nil {
 11907  		objectMap["body"] = sudfgp.Body
 11908  	}
 11909  	return json.Marshal(objectMap)
 11910  }
 11911  
 11912  // SQLUserDefinedFunctionGetResults an Azure Cosmos DB userDefinedFunction.
 11913  type SQLUserDefinedFunctionGetResults struct {
 11914  	autorest.Response `json:"-"`
 11915  	// SQLUserDefinedFunctionGetProperties - The properties of an Azure Cosmos DB userDefinedFunction
 11916  	*SQLUserDefinedFunctionGetProperties `json:"properties,omitempty"`
 11917  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 11918  	ID *string `json:"id,omitempty"`
 11919  	// Name - READ-ONLY; The name of the ARM resource.
 11920  	Name *string `json:"name,omitempty"`
 11921  	// Type - READ-ONLY; The type of Azure resource.
 11922  	Type *string `json:"type,omitempty"`
 11923  	// Location - The location of the resource group to which the resource belongs.
 11924  	Location *string                 `json:"location,omitempty"`
 11925  	Tags     map[string]*string      `json:"tags"`
 11926  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
 11927  }
 11928  
 11929  // MarshalJSON is the custom marshaler for SQLUserDefinedFunctionGetResults.
 11930  func (sudfgr SQLUserDefinedFunctionGetResults) MarshalJSON() ([]byte, error) {
 11931  	objectMap := make(map[string]interface{})
 11932  	if sudfgr.SQLUserDefinedFunctionGetProperties != nil {
 11933  		objectMap["properties"] = sudfgr.SQLUserDefinedFunctionGetProperties
 11934  	}
 11935  	if sudfgr.Location != nil {
 11936  		objectMap["location"] = sudfgr.Location
 11937  	}
 11938  	if sudfgr.Tags != nil {
 11939  		objectMap["tags"] = sudfgr.Tags
 11940  	}
 11941  	if sudfgr.Identity != nil {
 11942  		objectMap["identity"] = sudfgr.Identity
 11943  	}
 11944  	return json.Marshal(objectMap)
 11945  }
 11946  
 11947  // UnmarshalJSON is the custom unmarshaler for SQLUserDefinedFunctionGetResults struct.
 11948  func (sudfgr *SQLUserDefinedFunctionGetResults) UnmarshalJSON(body []byte) error {
 11949  	var m map[string]*json.RawMessage
 11950  	err := json.Unmarshal(body, &m)
 11951  	if err != nil {
 11952  		return err
 11953  	}
 11954  	for k, v := range m {
 11955  		switch k {
 11956  		case "properties":
 11957  			if v != nil {
 11958  				var SQLUserDefinedFunctionGetProperties SQLUserDefinedFunctionGetProperties
 11959  				err = json.Unmarshal(*v, &SQLUserDefinedFunctionGetProperties)
 11960  				if err != nil {
 11961  					return err
 11962  				}
 11963  				sudfgr.SQLUserDefinedFunctionGetProperties = &SQLUserDefinedFunctionGetProperties
 11964  			}
 11965  		case "id":
 11966  			if v != nil {
 11967  				var ID string
 11968  				err = json.Unmarshal(*v, &ID)
 11969  				if err != nil {
 11970  					return err
 11971  				}
 11972  				sudfgr.ID = &ID
 11973  			}
 11974  		case "name":
 11975  			if v != nil {
 11976  				var name string
 11977  				err = json.Unmarshal(*v, &name)
 11978  				if err != nil {
 11979  					return err
 11980  				}
 11981  				sudfgr.Name = &name
 11982  			}
 11983  		case "type":
 11984  			if v != nil {
 11985  				var typeVar string
 11986  				err = json.Unmarshal(*v, &typeVar)
 11987  				if err != nil {
 11988  					return err
 11989  				}
 11990  				sudfgr.Type = &typeVar
 11991  			}
 11992  		case "location":
 11993  			if v != nil {
 11994  				var location string
 11995  				err = json.Unmarshal(*v, &location)
 11996  				if err != nil {
 11997  					return err
 11998  				}
 11999  				sudfgr.Location = &location
 12000  			}
 12001  		case "tags":
 12002  			if v != nil {
 12003  				var tags map[string]*string
 12004  				err = json.Unmarshal(*v, &tags)
 12005  				if err != nil {
 12006  					return err
 12007  				}
 12008  				sudfgr.Tags = tags
 12009  			}
 12010  		case "identity":
 12011  			if v != nil {
 12012  				var identity ManagedServiceIdentity
 12013  				err = json.Unmarshal(*v, &identity)
 12014  				if err != nil {
 12015  					return err
 12016  				}
 12017  				sudfgr.Identity = &identity
 12018  			}
 12019  		}
 12020  	}
 12021  
 12022  	return nil
 12023  }
 12024  
 12025  // SQLUserDefinedFunctionListResult the List operation response, that contains the userDefinedFunctions and
 12026  // their properties.
 12027  type SQLUserDefinedFunctionListResult struct {
 12028  	autorest.Response `json:"-"`
 12029  	// Value - READ-ONLY; List of userDefinedFunctions and their properties.
 12030  	Value *[]SQLUserDefinedFunctionGetResults `json:"value,omitempty"`
 12031  }
 12032  
 12033  // MarshalJSON is the custom marshaler for SQLUserDefinedFunctionListResult.
 12034  func (sudflr SQLUserDefinedFunctionListResult) MarshalJSON() ([]byte, error) {
 12035  	objectMap := make(map[string]interface{})
 12036  	return json.Marshal(objectMap)
 12037  }
 12038  
 12039  // SQLUserDefinedFunctionResource cosmos DB SQL userDefinedFunction resource object
 12040  type SQLUserDefinedFunctionResource struct {
 12041  	// ID - Name of the Cosmos DB SQL userDefinedFunction
 12042  	ID *string `json:"id,omitempty"`
 12043  	// Body - Body of the User Defined Function
 12044  	Body *string `json:"body,omitempty"`
 12045  }
 12046  
 12047  // SystemData metadata pertaining to creation and last modification of the resource.
 12048  type SystemData struct {
 12049  	// CreatedBy - The identity that created the resource.
 12050  	CreatedBy *string `json:"createdBy,omitempty"`
 12051  	// CreatedByType - The type of identity that created the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'
 12052  	CreatedByType CreatedByType `json:"createdByType,omitempty"`
 12053  	// CreatedAt - The timestamp of resource creation (UTC).
 12054  	CreatedAt *date.Time `json:"createdAt,omitempty"`
 12055  	// LastModifiedBy - The identity that last modified the resource.
 12056  	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
 12057  	// LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'
 12058  	LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"`
 12059  	// LastModifiedAt - The timestamp of resource last modification (UTC)
 12060  	LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"`
 12061  }
 12062  
 12063  // TableCreateUpdateParameters parameters to create and update Cosmos DB Table.
 12064  type TableCreateUpdateParameters struct {
 12065  	// TableCreateUpdateProperties - Properties to create and update Azure Cosmos DB Table.
 12066  	*TableCreateUpdateProperties `json:"properties,omitempty"`
 12067  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 12068  	ID *string `json:"id,omitempty"`
 12069  	// Name - READ-ONLY; The name of the ARM resource.
 12070  	Name *string `json:"name,omitempty"`
 12071  	// Type - READ-ONLY; The type of Azure resource.
 12072  	Type *string `json:"type,omitempty"`
 12073  	// Location - The location of the resource group to which the resource belongs.
 12074  	Location *string                 `json:"location,omitempty"`
 12075  	Tags     map[string]*string      `json:"tags"`
 12076  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
 12077  }
 12078  
 12079  // MarshalJSON is the custom marshaler for TableCreateUpdateParameters.
 12080  func (tcup TableCreateUpdateParameters) MarshalJSON() ([]byte, error) {
 12081  	objectMap := make(map[string]interface{})
 12082  	if tcup.TableCreateUpdateProperties != nil {
 12083  		objectMap["properties"] = tcup.TableCreateUpdateProperties
 12084  	}
 12085  	if tcup.Location != nil {
 12086  		objectMap["location"] = tcup.Location
 12087  	}
 12088  	if tcup.Tags != nil {
 12089  		objectMap["tags"] = tcup.Tags
 12090  	}
 12091  	if tcup.Identity != nil {
 12092  		objectMap["identity"] = tcup.Identity
 12093  	}
 12094  	return json.Marshal(objectMap)
 12095  }
 12096  
 12097  // UnmarshalJSON is the custom unmarshaler for TableCreateUpdateParameters struct.
 12098  func (tcup *TableCreateUpdateParameters) UnmarshalJSON(body []byte) error {
 12099  	var m map[string]*json.RawMessage
 12100  	err := json.Unmarshal(body, &m)
 12101  	if err != nil {
 12102  		return err
 12103  	}
 12104  	for k, v := range m {
 12105  		switch k {
 12106  		case "properties":
 12107  			if v != nil {
 12108  				var tableCreateUpdateProperties TableCreateUpdateProperties
 12109  				err = json.Unmarshal(*v, &tableCreateUpdateProperties)
 12110  				if err != nil {
 12111  					return err
 12112  				}
 12113  				tcup.TableCreateUpdateProperties = &tableCreateUpdateProperties
 12114  			}
 12115  		case "id":
 12116  			if v != nil {
 12117  				var ID string
 12118  				err = json.Unmarshal(*v, &ID)
 12119  				if err != nil {
 12120  					return err
 12121  				}
 12122  				tcup.ID = &ID
 12123  			}
 12124  		case "name":
 12125  			if v != nil {
 12126  				var name string
 12127  				err = json.Unmarshal(*v, &name)
 12128  				if err != nil {
 12129  					return err
 12130  				}
 12131  				tcup.Name = &name
 12132  			}
 12133  		case "type":
 12134  			if v != nil {
 12135  				var typeVar string
 12136  				err = json.Unmarshal(*v, &typeVar)
 12137  				if err != nil {
 12138  					return err
 12139  				}
 12140  				tcup.Type = &typeVar
 12141  			}
 12142  		case "location":
 12143  			if v != nil {
 12144  				var location string
 12145  				err = json.Unmarshal(*v, &location)
 12146  				if err != nil {
 12147  					return err
 12148  				}
 12149  				tcup.Location = &location
 12150  			}
 12151  		case "tags":
 12152  			if v != nil {
 12153  				var tags map[string]*string
 12154  				err = json.Unmarshal(*v, &tags)
 12155  				if err != nil {
 12156  					return err
 12157  				}
 12158  				tcup.Tags = tags
 12159  			}
 12160  		case "identity":
 12161  			if v != nil {
 12162  				var identity ManagedServiceIdentity
 12163  				err = json.Unmarshal(*v, &identity)
 12164  				if err != nil {
 12165  					return err
 12166  				}
 12167  				tcup.Identity = &identity
 12168  			}
 12169  		}
 12170  	}
 12171  
 12172  	return nil
 12173  }
 12174  
 12175  // TableCreateUpdateProperties properties to create and update Azure Cosmos DB Table.
 12176  type TableCreateUpdateProperties struct {
 12177  	// Resource - The standard JSON format of a Table
 12178  	Resource *TableResource `json:"resource,omitempty"`
 12179  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
 12180  	Options *CreateUpdateOptions `json:"options,omitempty"`
 12181  }
 12182  
 12183  // TableGetProperties the properties of an Azure Cosmos Table
 12184  type TableGetProperties struct {
 12185  	Resource *TableGetPropertiesResource `json:"resource,omitempty"`
 12186  	Options  *TableGetPropertiesOptions  `json:"options,omitempty"`
 12187  }
 12188  
 12189  // TableGetPropertiesOptions ...
 12190  type TableGetPropertiesOptions struct {
 12191  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
 12192  	Throughput *int32 `json:"throughput,omitempty"`
 12193  	// AutoscaleSettings - Specifies the Autoscale settings.
 12194  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
 12195  }
 12196  
 12197  // TableGetPropertiesResource ...
 12198  type TableGetPropertiesResource struct {
 12199  	// ID - Name of the Cosmos DB table
 12200  	ID *string `json:"id,omitempty"`
 12201  	// Rid - READ-ONLY; A system generated property. A unique identifier.
 12202  	Rid *string `json:"_rid,omitempty"`
 12203  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
 12204  	Ts *float64 `json:"_ts,omitempty"`
 12205  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
 12206  	Etag *string `json:"_etag,omitempty"`
 12207  }
 12208  
 12209  // MarshalJSON is the custom marshaler for TableGetPropertiesResource.
 12210  func (tgp TableGetPropertiesResource) MarshalJSON() ([]byte, error) {
 12211  	objectMap := make(map[string]interface{})
 12212  	if tgp.ID != nil {
 12213  		objectMap["id"] = tgp.ID
 12214  	}
 12215  	return json.Marshal(objectMap)
 12216  }
 12217  
 12218  // TableGetResults an Azure Cosmos DB Table.
 12219  type TableGetResults struct {
 12220  	autorest.Response `json:"-"`
 12221  	// TableGetProperties - The properties of an Azure Cosmos DB Table
 12222  	*TableGetProperties `json:"properties,omitempty"`
 12223  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 12224  	ID *string `json:"id,omitempty"`
 12225  	// Name - READ-ONLY; The name of the ARM resource.
 12226  	Name *string `json:"name,omitempty"`
 12227  	// Type - READ-ONLY; The type of Azure resource.
 12228  	Type *string `json:"type,omitempty"`
 12229  	// Location - The location of the resource group to which the resource belongs.
 12230  	Location *string                 `json:"location,omitempty"`
 12231  	Tags     map[string]*string      `json:"tags"`
 12232  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
 12233  }
 12234  
 12235  // MarshalJSON is the custom marshaler for TableGetResults.
 12236  func (tgr TableGetResults) MarshalJSON() ([]byte, error) {
 12237  	objectMap := make(map[string]interface{})
 12238  	if tgr.TableGetProperties != nil {
 12239  		objectMap["properties"] = tgr.TableGetProperties
 12240  	}
 12241  	if tgr.Location != nil {
 12242  		objectMap["location"] = tgr.Location
 12243  	}
 12244  	if tgr.Tags != nil {
 12245  		objectMap["tags"] = tgr.Tags
 12246  	}
 12247  	if tgr.Identity != nil {
 12248  		objectMap["identity"] = tgr.Identity
 12249  	}
 12250  	return json.Marshal(objectMap)
 12251  }
 12252  
 12253  // UnmarshalJSON is the custom unmarshaler for TableGetResults struct.
 12254  func (tgr *TableGetResults) UnmarshalJSON(body []byte) error {
 12255  	var m map[string]*json.RawMessage
 12256  	err := json.Unmarshal(body, &m)
 12257  	if err != nil {
 12258  		return err
 12259  	}
 12260  	for k, v := range m {
 12261  		switch k {
 12262  		case "properties":
 12263  			if v != nil {
 12264  				var tableGetProperties TableGetProperties
 12265  				err = json.Unmarshal(*v, &tableGetProperties)
 12266  				if err != nil {
 12267  					return err
 12268  				}
 12269  				tgr.TableGetProperties = &tableGetProperties
 12270  			}
 12271  		case "id":
 12272  			if v != nil {
 12273  				var ID string
 12274  				err = json.Unmarshal(*v, &ID)
 12275  				if err != nil {
 12276  					return err
 12277  				}
 12278  				tgr.ID = &ID
 12279  			}
 12280  		case "name":
 12281  			if v != nil {
 12282  				var name string
 12283  				err = json.Unmarshal(*v, &name)
 12284  				if err != nil {
 12285  					return err
 12286  				}
 12287  				tgr.Name = &name
 12288  			}
 12289  		case "type":
 12290  			if v != nil {
 12291  				var typeVar string
 12292  				err = json.Unmarshal(*v, &typeVar)
 12293  				if err != nil {
 12294  					return err
 12295  				}
 12296  				tgr.Type = &typeVar
 12297  			}
 12298  		case "location":
 12299  			if v != nil {
 12300  				var location string
 12301  				err = json.Unmarshal(*v, &location)
 12302  				if err != nil {
 12303  					return err
 12304  				}
 12305  				tgr.Location = &location
 12306  			}
 12307  		case "tags":
 12308  			if v != nil {
 12309  				var tags map[string]*string
 12310  				err = json.Unmarshal(*v, &tags)
 12311  				if err != nil {
 12312  					return err
 12313  				}
 12314  				tgr.Tags = tags
 12315  			}
 12316  		case "identity":
 12317  			if v != nil {
 12318  				var identity ManagedServiceIdentity
 12319  				err = json.Unmarshal(*v, &identity)
 12320  				if err != nil {
 12321  					return err
 12322  				}
 12323  				tgr.Identity = &identity
 12324  			}
 12325  		}
 12326  	}
 12327  
 12328  	return nil
 12329  }
 12330  
 12331  // TableListResult the List operation response, that contains the Table and their properties.
 12332  type TableListResult struct {
 12333  	autorest.Response `json:"-"`
 12334  	// Value - READ-ONLY; List of Table and their properties.
 12335  	Value *[]TableGetResults `json:"value,omitempty"`
 12336  }
 12337  
 12338  // MarshalJSON is the custom marshaler for TableListResult.
 12339  func (tlr TableListResult) MarshalJSON() ([]byte, error) {
 12340  	objectMap := make(map[string]interface{})
 12341  	return json.Marshal(objectMap)
 12342  }
 12343  
 12344  // TableResource cosmos DB table resource object
 12345  type TableResource struct {
 12346  	// ID - Name of the Cosmos DB table
 12347  	ID *string `json:"id,omitempty"`
 12348  }
 12349  
 12350  // TableResourcesCreateUpdateTableFuture an abstraction for monitoring and retrieving the results of a
 12351  // long-running operation.
 12352  type TableResourcesCreateUpdateTableFuture struct {
 12353  	azure.FutureAPI
 12354  	// Result returns the result of the asynchronous operation.
 12355  	// If the operation has not completed it will return an error.
 12356  	Result func(TableResourcesClient) (TableGetResults, error)
 12357  }
 12358  
 12359  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 12360  func (future *TableResourcesCreateUpdateTableFuture) UnmarshalJSON(body []byte) error {
 12361  	var azFuture azure.Future
 12362  	if err := json.Unmarshal(body, &azFuture); err != nil {
 12363  		return err
 12364  	}
 12365  	future.FutureAPI = &azFuture
 12366  	future.Result = future.result
 12367  	return nil
 12368  }
 12369  
 12370  // result is the default implementation for TableResourcesCreateUpdateTableFuture.Result.
 12371  func (future *TableResourcesCreateUpdateTableFuture) result(client TableResourcesClient) (tgr TableGetResults, err error) {
 12372  	var done bool
 12373  	done, err = future.DoneWithContext(context.Background(), client)
 12374  	if err != nil {
 12375  		err = autorest.NewErrorWithError(err, "documentdb.TableResourcesCreateUpdateTableFuture", "Result", future.Response(), "Polling failure")
 12376  		return
 12377  	}
 12378  	if !done {
 12379  		tgr.Response.Response = future.Response()
 12380  		err = azure.NewAsyncOpIncompleteError("documentdb.TableResourcesCreateUpdateTableFuture")
 12381  		return
 12382  	}
 12383  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 12384  	if tgr.Response.Response, err = future.GetResult(sender); err == nil && tgr.Response.Response.StatusCode != http.StatusNoContent {
 12385  		tgr, err = client.CreateUpdateTableResponder(tgr.Response.Response)
 12386  		if err != nil {
 12387  			err = autorest.NewErrorWithError(err, "documentdb.TableResourcesCreateUpdateTableFuture", "Result", tgr.Response.Response, "Failure responding to request")
 12388  		}
 12389  	}
 12390  	return
 12391  }
 12392  
 12393  // TableResourcesDeleteTableFuture an abstraction for monitoring and retrieving the results of a
 12394  // long-running operation.
 12395  type TableResourcesDeleteTableFuture struct {
 12396  	azure.FutureAPI
 12397  	// Result returns the result of the asynchronous operation.
 12398  	// If the operation has not completed it will return an error.
 12399  	Result func(TableResourcesClient) (autorest.Response, error)
 12400  }
 12401  
 12402  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 12403  func (future *TableResourcesDeleteTableFuture) UnmarshalJSON(body []byte) error {
 12404  	var azFuture azure.Future
 12405  	if err := json.Unmarshal(body, &azFuture); err != nil {
 12406  		return err
 12407  	}
 12408  	future.FutureAPI = &azFuture
 12409  	future.Result = future.result
 12410  	return nil
 12411  }
 12412  
 12413  // result is the default implementation for TableResourcesDeleteTableFuture.Result.
 12414  func (future *TableResourcesDeleteTableFuture) result(client TableResourcesClient) (ar autorest.Response, err error) {
 12415  	var done bool
 12416  	done, err = future.DoneWithContext(context.Background(), client)
 12417  	if err != nil {
 12418  		err = autorest.NewErrorWithError(err, "documentdb.TableResourcesDeleteTableFuture", "Result", future.Response(), "Polling failure")
 12419  		return
 12420  	}
 12421  	if !done {
 12422  		ar.Response = future.Response()
 12423  		err = azure.NewAsyncOpIncompleteError("documentdb.TableResourcesDeleteTableFuture")
 12424  		return
 12425  	}
 12426  	ar.Response = future.Response()
 12427  	return
 12428  }
 12429  
 12430  // TableResourcesMigrateTableToAutoscaleFuture an abstraction for monitoring and retrieving the results of
 12431  // a long-running operation.
 12432  type TableResourcesMigrateTableToAutoscaleFuture struct {
 12433  	azure.FutureAPI
 12434  	// Result returns the result of the asynchronous operation.
 12435  	// If the operation has not completed it will return an error.
 12436  	Result func(TableResourcesClient) (ThroughputSettingsGetResults, error)
 12437  }
 12438  
 12439  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 12440  func (future *TableResourcesMigrateTableToAutoscaleFuture) UnmarshalJSON(body []byte) error {
 12441  	var azFuture azure.Future
 12442  	if err := json.Unmarshal(body, &azFuture); err != nil {
 12443  		return err
 12444  	}
 12445  	future.FutureAPI = &azFuture
 12446  	future.Result = future.result
 12447  	return nil
 12448  }
 12449  
 12450  // result is the default implementation for TableResourcesMigrateTableToAutoscaleFuture.Result.
 12451  func (future *TableResourcesMigrateTableToAutoscaleFuture) result(client TableResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
 12452  	var done bool
 12453  	done, err = future.DoneWithContext(context.Background(), client)
 12454  	if err != nil {
 12455  		err = autorest.NewErrorWithError(err, "documentdb.TableResourcesMigrateTableToAutoscaleFuture", "Result", future.Response(), "Polling failure")
 12456  		return
 12457  	}
 12458  	if !done {
 12459  		tsgr.Response.Response = future.Response()
 12460  		err = azure.NewAsyncOpIncompleteError("documentdb.TableResourcesMigrateTableToAutoscaleFuture")
 12461  		return
 12462  	}
 12463  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 12464  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
 12465  		tsgr, err = client.MigrateTableToAutoscaleResponder(tsgr.Response.Response)
 12466  		if err != nil {
 12467  			err = autorest.NewErrorWithError(err, "documentdb.TableResourcesMigrateTableToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
 12468  		}
 12469  	}
 12470  	return
 12471  }
 12472  
 12473  // TableResourcesMigrateTableToManualThroughputFuture an abstraction for monitoring and retrieving the
 12474  // results of a long-running operation.
 12475  type TableResourcesMigrateTableToManualThroughputFuture struct {
 12476  	azure.FutureAPI
 12477  	// Result returns the result of the asynchronous operation.
 12478  	// If the operation has not completed it will return an error.
 12479  	Result func(TableResourcesClient) (ThroughputSettingsGetResults, error)
 12480  }
 12481  
 12482  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 12483  func (future *TableResourcesMigrateTableToManualThroughputFuture) UnmarshalJSON(body []byte) error {
 12484  	var azFuture azure.Future
 12485  	if err := json.Unmarshal(body, &azFuture); err != nil {
 12486  		return err
 12487  	}
 12488  	future.FutureAPI = &azFuture
 12489  	future.Result = future.result
 12490  	return nil
 12491  }
 12492  
 12493  // result is the default implementation for TableResourcesMigrateTableToManualThroughputFuture.Result.
 12494  func (future *TableResourcesMigrateTableToManualThroughputFuture) result(client TableResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
 12495  	var done bool
 12496  	done, err = future.DoneWithContext(context.Background(), client)
 12497  	if err != nil {
 12498  		err = autorest.NewErrorWithError(err, "documentdb.TableResourcesMigrateTableToManualThroughputFuture", "Result", future.Response(), "Polling failure")
 12499  		return
 12500  	}
 12501  	if !done {
 12502  		tsgr.Response.Response = future.Response()
 12503  		err = azure.NewAsyncOpIncompleteError("documentdb.TableResourcesMigrateTableToManualThroughputFuture")
 12504  		return
 12505  	}
 12506  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 12507  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
 12508  		tsgr, err = client.MigrateTableToManualThroughputResponder(tsgr.Response.Response)
 12509  		if err != nil {
 12510  			err = autorest.NewErrorWithError(err, "documentdb.TableResourcesMigrateTableToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
 12511  		}
 12512  	}
 12513  	return
 12514  }
 12515  
 12516  // TableResourcesUpdateTableThroughputFuture an abstraction for monitoring and retrieving the results of a
 12517  // long-running operation.
 12518  type TableResourcesUpdateTableThroughputFuture struct {
 12519  	azure.FutureAPI
 12520  	// Result returns the result of the asynchronous operation.
 12521  	// If the operation has not completed it will return an error.
 12522  	Result func(TableResourcesClient) (ThroughputSettingsGetResults, error)
 12523  }
 12524  
 12525  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 12526  func (future *TableResourcesUpdateTableThroughputFuture) UnmarshalJSON(body []byte) error {
 12527  	var azFuture azure.Future
 12528  	if err := json.Unmarshal(body, &azFuture); err != nil {
 12529  		return err
 12530  	}
 12531  	future.FutureAPI = &azFuture
 12532  	future.Result = future.result
 12533  	return nil
 12534  }
 12535  
 12536  // result is the default implementation for TableResourcesUpdateTableThroughputFuture.Result.
 12537  func (future *TableResourcesUpdateTableThroughputFuture) result(client TableResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
 12538  	var done bool
 12539  	done, err = future.DoneWithContext(context.Background(), client)
 12540  	if err != nil {
 12541  		err = autorest.NewErrorWithError(err, "documentdb.TableResourcesUpdateTableThroughputFuture", "Result", future.Response(), "Polling failure")
 12542  		return
 12543  	}
 12544  	if !done {
 12545  		tsgr.Response.Response = future.Response()
 12546  		err = azure.NewAsyncOpIncompleteError("documentdb.TableResourcesUpdateTableThroughputFuture")
 12547  		return
 12548  	}
 12549  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 12550  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
 12551  		tsgr, err = client.UpdateTableThroughputResponder(tsgr.Response.Response)
 12552  		if err != nil {
 12553  			err = autorest.NewErrorWithError(err, "documentdb.TableResourcesUpdateTableThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
 12554  		}
 12555  	}
 12556  	return
 12557  }
 12558  
 12559  // ThroughputPolicyResource cosmos DB resource throughput policy
 12560  type ThroughputPolicyResource struct {
 12561  	// IsEnabled - Determines whether the ThroughputPolicy is active or not
 12562  	IsEnabled *bool `json:"isEnabled,omitempty"`
 12563  	// IncrementPercent - Represents the percentage by which throughput can increase every time throughput policy kicks in.
 12564  	IncrementPercent *int32 `json:"incrementPercent,omitempty"`
 12565  }
 12566  
 12567  // ThroughputSettingsGetProperties the properties of an Azure Cosmos DB resource throughput
 12568  type ThroughputSettingsGetProperties struct {
 12569  	Resource *ThroughputSettingsGetPropertiesResource `json:"resource,omitempty"`
 12570  }
 12571  
 12572  // ThroughputSettingsGetPropertiesResource ...
 12573  type ThroughputSettingsGetPropertiesResource struct {
 12574  	// Throughput - Value of the Cosmos DB resource throughput. Either throughput is required or autoscaleSettings is required, but not both.
 12575  	Throughput *int32 `json:"throughput,omitempty"`
 12576  	// AutoscaleSettings - Cosmos DB resource for autoscale settings. Either throughput is required or autoscaleSettings is required, but not both.
 12577  	AutoscaleSettings *AutoscaleSettingsResource `json:"autoscaleSettings,omitempty"`
 12578  	// MinimumThroughput - READ-ONLY; The minimum throughput of the resource
 12579  	MinimumThroughput *string `json:"minimumThroughput,omitempty"`
 12580  	// OfferReplacePending - READ-ONLY; The throughput replace is pending
 12581  	OfferReplacePending *string `json:"offerReplacePending,omitempty"`
 12582  	// Rid - READ-ONLY; A system generated property. A unique identifier.
 12583  	Rid *string `json:"_rid,omitempty"`
 12584  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
 12585  	Ts *float64 `json:"_ts,omitempty"`
 12586  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
 12587  	Etag *string `json:"_etag,omitempty"`
 12588  }
 12589  
 12590  // MarshalJSON is the custom marshaler for ThroughputSettingsGetPropertiesResource.
 12591  func (tsgp ThroughputSettingsGetPropertiesResource) MarshalJSON() ([]byte, error) {
 12592  	objectMap := make(map[string]interface{})
 12593  	if tsgp.Throughput != nil {
 12594  		objectMap["throughput"] = tsgp.Throughput
 12595  	}
 12596  	if tsgp.AutoscaleSettings != nil {
 12597  		objectMap["autoscaleSettings"] = tsgp.AutoscaleSettings
 12598  	}
 12599  	return json.Marshal(objectMap)
 12600  }
 12601  
 12602  // ThroughputSettingsGetResults an Azure Cosmos DB resource throughput.
 12603  type ThroughputSettingsGetResults struct {
 12604  	autorest.Response `json:"-"`
 12605  	// ThroughputSettingsGetProperties - The properties of an Azure Cosmos DB resource throughput
 12606  	*ThroughputSettingsGetProperties `json:"properties,omitempty"`
 12607  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 12608  	ID *string `json:"id,omitempty"`
 12609  	// Name - READ-ONLY; The name of the ARM resource.
 12610  	Name *string `json:"name,omitempty"`
 12611  	// Type - READ-ONLY; The type of Azure resource.
 12612  	Type *string `json:"type,omitempty"`
 12613  	// Location - The location of the resource group to which the resource belongs.
 12614  	Location *string                 `json:"location,omitempty"`
 12615  	Tags     map[string]*string      `json:"tags"`
 12616  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
 12617  }
 12618  
 12619  // MarshalJSON is the custom marshaler for ThroughputSettingsGetResults.
 12620  func (tsgr ThroughputSettingsGetResults) MarshalJSON() ([]byte, error) {
 12621  	objectMap := make(map[string]interface{})
 12622  	if tsgr.ThroughputSettingsGetProperties != nil {
 12623  		objectMap["properties"] = tsgr.ThroughputSettingsGetProperties
 12624  	}
 12625  	if tsgr.Location != nil {
 12626  		objectMap["location"] = tsgr.Location
 12627  	}
 12628  	if tsgr.Tags != nil {
 12629  		objectMap["tags"] = tsgr.Tags
 12630  	}
 12631  	if tsgr.Identity != nil {
 12632  		objectMap["identity"] = tsgr.Identity
 12633  	}
 12634  	return json.Marshal(objectMap)
 12635  }
 12636  
 12637  // UnmarshalJSON is the custom unmarshaler for ThroughputSettingsGetResults struct.
 12638  func (tsgr *ThroughputSettingsGetResults) UnmarshalJSON(body []byte) error {
 12639  	var m map[string]*json.RawMessage
 12640  	err := json.Unmarshal(body, &m)
 12641  	if err != nil {
 12642  		return err
 12643  	}
 12644  	for k, v := range m {
 12645  		switch k {
 12646  		case "properties":
 12647  			if v != nil {
 12648  				var throughputSettingsGetProperties ThroughputSettingsGetProperties
 12649  				err = json.Unmarshal(*v, &throughputSettingsGetProperties)
 12650  				if err != nil {
 12651  					return err
 12652  				}
 12653  				tsgr.ThroughputSettingsGetProperties = &throughputSettingsGetProperties
 12654  			}
 12655  		case "id":
 12656  			if v != nil {
 12657  				var ID string
 12658  				err = json.Unmarshal(*v, &ID)
 12659  				if err != nil {
 12660  					return err
 12661  				}
 12662  				tsgr.ID = &ID
 12663  			}
 12664  		case "name":
 12665  			if v != nil {
 12666  				var name string
 12667  				err = json.Unmarshal(*v, &name)
 12668  				if err != nil {
 12669  					return err
 12670  				}
 12671  				tsgr.Name = &name
 12672  			}
 12673  		case "type":
 12674  			if v != nil {
 12675  				var typeVar string
 12676  				err = json.Unmarshal(*v, &typeVar)
 12677  				if err != nil {
 12678  					return err
 12679  				}
 12680  				tsgr.Type = &typeVar
 12681  			}
 12682  		case "location":
 12683  			if v != nil {
 12684  				var location string
 12685  				err = json.Unmarshal(*v, &location)
 12686  				if err != nil {
 12687  					return err
 12688  				}
 12689  				tsgr.Location = &location
 12690  			}
 12691  		case "tags":
 12692  			if v != nil {
 12693  				var tags map[string]*string
 12694  				err = json.Unmarshal(*v, &tags)
 12695  				if err != nil {
 12696  					return err
 12697  				}
 12698  				tsgr.Tags = tags
 12699  			}
 12700  		case "identity":
 12701  			if v != nil {
 12702  				var identity ManagedServiceIdentity
 12703  				err = json.Unmarshal(*v, &identity)
 12704  				if err != nil {
 12705  					return err
 12706  				}
 12707  				tsgr.Identity = &identity
 12708  			}
 12709  		}
 12710  	}
 12711  
 12712  	return nil
 12713  }
 12714  
 12715  // ThroughputSettingsResource cosmos DB resource throughput object. Either throughput is required or
 12716  // autoscaleSettings is required, but not both.
 12717  type ThroughputSettingsResource struct {
 12718  	// Throughput - Value of the Cosmos DB resource throughput. Either throughput is required or autoscaleSettings is required, but not both.
 12719  	Throughput *int32 `json:"throughput,omitempty"`
 12720  	// AutoscaleSettings - Cosmos DB resource for autoscale settings. Either throughput is required or autoscaleSettings is required, but not both.
 12721  	AutoscaleSettings *AutoscaleSettingsResource `json:"autoscaleSettings,omitempty"`
 12722  	// MinimumThroughput - READ-ONLY; The minimum throughput of the resource
 12723  	MinimumThroughput *string `json:"minimumThroughput,omitempty"`
 12724  	// OfferReplacePending - READ-ONLY; The throughput replace is pending
 12725  	OfferReplacePending *string `json:"offerReplacePending,omitempty"`
 12726  }
 12727  
 12728  // MarshalJSON is the custom marshaler for ThroughputSettingsResource.
 12729  func (tsr ThroughputSettingsResource) MarshalJSON() ([]byte, error) {
 12730  	objectMap := make(map[string]interface{})
 12731  	if tsr.Throughput != nil {
 12732  		objectMap["throughput"] = tsr.Throughput
 12733  	}
 12734  	if tsr.AutoscaleSettings != nil {
 12735  		objectMap["autoscaleSettings"] = tsr.AutoscaleSettings
 12736  	}
 12737  	return json.Marshal(objectMap)
 12738  }
 12739  
 12740  // ThroughputSettingsUpdateParameters parameters to update Cosmos DB resource throughput.
 12741  type ThroughputSettingsUpdateParameters struct {
 12742  	// ThroughputSettingsUpdateProperties - Properties to update Azure Cosmos DB resource throughput.
 12743  	*ThroughputSettingsUpdateProperties `json:"properties,omitempty"`
 12744  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 12745  	ID *string `json:"id,omitempty"`
 12746  	// Name - READ-ONLY; The name of the ARM resource.
 12747  	Name *string `json:"name,omitempty"`
 12748  	// Type - READ-ONLY; The type of Azure resource.
 12749  	Type *string `json:"type,omitempty"`
 12750  	// Location - The location of the resource group to which the resource belongs.
 12751  	Location *string                 `json:"location,omitempty"`
 12752  	Tags     map[string]*string      `json:"tags"`
 12753  	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
 12754  }
 12755  
 12756  // MarshalJSON is the custom marshaler for ThroughputSettingsUpdateParameters.
 12757  func (tsup ThroughputSettingsUpdateParameters) MarshalJSON() ([]byte, error) {
 12758  	objectMap := make(map[string]interface{})
 12759  	if tsup.ThroughputSettingsUpdateProperties != nil {
 12760  		objectMap["properties"] = tsup.ThroughputSettingsUpdateProperties
 12761  	}
 12762  	if tsup.Location != nil {
 12763  		objectMap["location"] = tsup.Location
 12764  	}
 12765  	if tsup.Tags != nil {
 12766  		objectMap["tags"] = tsup.Tags
 12767  	}
 12768  	if tsup.Identity != nil {
 12769  		objectMap["identity"] = tsup.Identity
 12770  	}
 12771  	return json.Marshal(objectMap)
 12772  }
 12773  
 12774  // UnmarshalJSON is the custom unmarshaler for ThroughputSettingsUpdateParameters struct.
 12775  func (tsup *ThroughputSettingsUpdateParameters) UnmarshalJSON(body []byte) error {
 12776  	var m map[string]*json.RawMessage
 12777  	err := json.Unmarshal(body, &m)
 12778  	if err != nil {
 12779  		return err
 12780  	}
 12781  	for k, v := range m {
 12782  		switch k {
 12783  		case "properties":
 12784  			if v != nil {
 12785  				var throughputSettingsUpdateProperties ThroughputSettingsUpdateProperties
 12786  				err = json.Unmarshal(*v, &throughputSettingsUpdateProperties)
 12787  				if err != nil {
 12788  					return err
 12789  				}
 12790  				tsup.ThroughputSettingsUpdateProperties = &throughputSettingsUpdateProperties
 12791  			}
 12792  		case "id":
 12793  			if v != nil {
 12794  				var ID string
 12795  				err = json.Unmarshal(*v, &ID)
 12796  				if err != nil {
 12797  					return err
 12798  				}
 12799  				tsup.ID = &ID
 12800  			}
 12801  		case "name":
 12802  			if v != nil {
 12803  				var name string
 12804  				err = json.Unmarshal(*v, &name)
 12805  				if err != nil {
 12806  					return err
 12807  				}
 12808  				tsup.Name = &name
 12809  			}
 12810  		case "type":
 12811  			if v != nil {
 12812  				var typeVar string
 12813  				err = json.Unmarshal(*v, &typeVar)
 12814  				if err != nil {
 12815  					return err
 12816  				}
 12817  				tsup.Type = &typeVar
 12818  			}
 12819  		case "location":
 12820  			if v != nil {
 12821  				var location string
 12822  				err = json.Unmarshal(*v, &location)
 12823  				if err != nil {
 12824  					return err
 12825  				}
 12826  				tsup.Location = &location
 12827  			}
 12828  		case "tags":
 12829  			if v != nil {
 12830  				var tags map[string]*string
 12831  				err = json.Unmarshal(*v, &tags)
 12832  				if err != nil {
 12833  					return err
 12834  				}
 12835  				tsup.Tags = tags
 12836  			}
 12837  		case "identity":
 12838  			if v != nil {
 12839  				var identity ManagedServiceIdentity
 12840  				err = json.Unmarshal(*v, &identity)
 12841  				if err != nil {
 12842  					return err
 12843  				}
 12844  				tsup.Identity = &identity
 12845  			}
 12846  		}
 12847  	}
 12848  
 12849  	return nil
 12850  }
 12851  
 12852  // ThroughputSettingsUpdateProperties properties to update Azure Cosmos DB resource throughput.
 12853  type ThroughputSettingsUpdateProperties struct {
 12854  	// Resource - The standard JSON format of a resource throughput
 12855  	Resource *ThroughputSettingsResource `json:"resource,omitempty"`
 12856  }
 12857  
 12858  // TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource
 12859  // which has 'tags' and a 'location'
 12860  type TrackedResource struct {
 12861  	// Tags - Resource tags.
 12862  	Tags map[string]*string `json:"tags"`
 12863  	// Location - The geo-location where the resource lives
 12864  	Location *string `json:"location,omitempty"`
 12865  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
 12866  	ID *string `json:"id,omitempty"`
 12867  	// Name - READ-ONLY; The name of the resource
 12868  	Name *string `json:"name,omitempty"`
 12869  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
 12870  	Type *string `json:"type,omitempty"`
 12871  }
 12872  
 12873  // MarshalJSON is the custom marshaler for TrackedResource.
 12874  func (tr TrackedResource) MarshalJSON() ([]byte, error) {
 12875  	objectMap := make(map[string]interface{})
 12876  	if tr.Tags != nil {
 12877  		objectMap["tags"] = tr.Tags
 12878  	}
 12879  	if tr.Location != nil {
 12880  		objectMap["location"] = tr.Location
 12881  	}
 12882  	return json.Marshal(objectMap)
 12883  }
 12884  
 12885  // UniqueKey the unique key on that enforces uniqueness constraint on documents in the collection in the
 12886  // Azure Cosmos DB service.
 12887  type UniqueKey struct {
 12888  	// Paths - List of paths must be unique for each document in the Azure Cosmos DB service
 12889  	Paths *[]string `json:"paths,omitempty"`
 12890  }
 12891  
 12892  // UniqueKeyPolicy the unique key policy configuration for specifying uniqueness constraints on documents
 12893  // in the collection in the Azure Cosmos DB service.
 12894  type UniqueKeyPolicy struct {
 12895  	// UniqueKeys - List of unique keys on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service.
 12896  	UniqueKeys *[]UniqueKey `json:"uniqueKeys,omitempty"`
 12897  }
 12898  
 12899  // Usage the usage data for a usage request.
 12900  type Usage struct {
 12901  	// Unit - The unit of the metric. Possible values include: 'UnitTypeCount', 'UnitTypeBytes', 'UnitTypeSeconds', 'UnitTypePercent', 'UnitTypeCountPerSecond', 'UnitTypeBytesPerSecond', 'UnitTypeMilliseconds'
 12902  	Unit UnitType `json:"unit,omitempty"`
 12903  	// Name - READ-ONLY; The name information for the metric.
 12904  	Name *MetricName `json:"name,omitempty"`
 12905  	// QuotaPeriod - READ-ONLY; The quota period used to summarize the usage values.
 12906  	QuotaPeriod *string `json:"quotaPeriod,omitempty"`
 12907  	// Limit - READ-ONLY; Maximum value for this metric
 12908  	Limit *int64 `json:"limit,omitempty"`
 12909  	// CurrentValue - READ-ONLY; Current value for this metric
 12910  	CurrentValue *int64 `json:"currentValue,omitempty"`
 12911  }
 12912  
 12913  // MarshalJSON is the custom marshaler for Usage.
 12914  func (u Usage) MarshalJSON() ([]byte, error) {
 12915  	objectMap := make(map[string]interface{})
 12916  	if u.Unit != "" {
 12917  		objectMap["unit"] = u.Unit
 12918  	}
 12919  	return json.Marshal(objectMap)
 12920  }
 12921  
 12922  // UsagesResult the response to a list usage request.
 12923  type UsagesResult struct {
 12924  	autorest.Response `json:"-"`
 12925  	// Value - READ-ONLY; The list of usages for the database. A usage is a point in time metric
 12926  	Value *[]Usage `json:"value,omitempty"`
 12927  }
 12928  
 12929  // MarshalJSON is the custom marshaler for UsagesResult.
 12930  func (ur UsagesResult) MarshalJSON() ([]byte, error) {
 12931  	objectMap := make(map[string]interface{})
 12932  	return json.Marshal(objectMap)
 12933  }
 12934  
 12935  // VirtualNetworkRule virtual Network ACL Rule object
 12936  type VirtualNetworkRule struct {
 12937  	// ID - Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}.
 12938  	ID *string `json:"id,omitempty"`
 12939  	// IgnoreMissingVNetServiceEndpoint - Create firewall rule before the virtual network has vnet service endpoint enabled.
 12940  	IgnoreMissingVNetServiceEndpoint *bool `json:"ignoreMissingVNetServiceEndpoint,omitempty"`
 12941  }
 12942  

View as plain text